In addition to the performance library interface, we propose to add a new directive to OpenMP to give the programmer control over when the performance collection is done:
!$OMP INST [INIT|FINALIZE|ON|OFF]
For normal OpenMP compilation this directive is ignored. Otherwise, it is translated into pomp_init(), pomp_finalize(), pomp_on(), and pomp_off() calls when performance instrumentation is requested. Another approach (which does not extend the set of OpenMP directives) would be to have the programmer add the performance tool interface calls directly, but this then requires either stub routines, conditional compilation, or the removal of the instrumentation to be used when performance monitoring is not desired. Our proposed new directive approach is more portable, effective, and easier to maintain.
Table 2: Proposed OpenMP Combined Parallel Work-sharing Directive Transformations.