Writing Custom Benchmark Program

In this chapter, we provide a detailed instruction about creating a custom benchmark program. Writing a custom benchmark program requires some knowledge about HPF C-API.

4.1 Overview

To write a custom benchmark program, the following steps are needed:

  1. Create a directory mytest under hdf5perflib source tree.

  2. Copy files under examples/* into mytest using cp -r examples/* mytest.

  3. Review mytest/c/write.c and make your own program by modifying benchmark names.

  4. Make sure that your functions are wrapped around the H5Perf_startTimer(& start) and the H5Perf_endTimer() in your program.

  5. If you've renamed write.c or created another file, please update mytest/c/Makefile.am file to include your source codes.

  6. Modify configure.ac to include mytest/Makefile and mytest/c/Makefile and run autoreconf.

You may skip step 1, 2, 5, and 6 if you are in a real hurry and minimize the hassle of modifying several makefiles. In that case, you need to modify examples/c/write.c file directly. In the next two subsections, we'll focus on step 3 and 4 only since the rest of steps are more relevant to GNU autoconf/automake topic.