4.2 Creating Custom Routine, Action and Instance Name

HPF uses a hierarchical model to group benchmark programs. The model has three levels of abstraction - routine, action and instance. One routine can have one or more actions and each action can have one or more instances. Thus, to write a custom benchmark program, the first thing you'll need to do is to decide at least 3 names for each level.

For example, if you are interested in measuring "write" performance, you may name it as a "write" routine. Then, you may name two actions like "write groups" and "write datasets" under the "write" routine. Finally, you can add two instances like "write 1,000 groups" under the "write groups" action and "write 100 datasets" under the "write datasets" action.

Figure 1. An example HPF hierarchical benchmark model

Once you've decided your names for routine, action and instance, it's time to modify the part of example code with your custom names. At the beginning of examples/c/write.c program, you can find the main() function. Below the main() function declaration, there are character array variables dedicated for the custom names as shown below:

int
main (int argc,char *argv[])
{
  /* BEGIN: Modify the following variables with your own names. */
  /* Names for Test Routine */
  char TestRoutine_Name[] = "Write";
  char TestRoutine_Desc[] = "A tutorial benchmark program";
  char TestRoutine_Version[] = "1.0";
  /* Names for Test Action */
  char TestAction_Name[] = "Write Dataset";
  char TestAction_Desc[] = "H5D Write function test";
  /* Names for Test Instance */
  char DatasetName[] = "Write 10000 Data";	/* This must be less than 50 characters. */
  char DatasetDesc[] = "Writing an array of 10000 integers"; /* This must be less than 250 characters. */
  /* END  */

You are welcome to modify the content of the variables like TestRoutine_Name(TestRoutine_Desc), TestAction_Name(TestAction_Desc) and DatasetName(DatasetDesc). The TestRoutine_Version can be anything you want it to be since it does not play any significant role in HPF system.