next up previous
Next: Conditional / Selective Up: Proposed OpenMP Performance Previous: Context Descriptors

Conditional Compilation

 

We also propose to support user source code lines to be compiled conditionally if POMP instrumentation is requested. If the OpenMP compiler or POMP transformation tool supports a macro preprocessor (e.g. cpp for C, C++, and sometimes Fortran), it must define the symbol _POMP to be used for conditional compilation. Following OpenMP standard conventions, this symbol is defined to have the decimal value YYYYMM where YYYY and MM are the year and month designations of the version of the POMP API that the implementation supports. This allows users to define and use application-, user-, or site-specific extensions to POMP by writing:

The !P$ sentinel can be used for conditional compilation in Fortran compilation or transformation systems. In addition, CP$ and *P$ sentinels are accepted only when instrumenting Fortran fixed source form. During POMP instrumentation, these sentinels are replaced by three spaces, and the rest of the line is treated as a normal Fortran line. These sentinels also have to comply with the specifications defined in the Sections 2.1.3.1 and 2.1.3.2 of the OpenMP Fortran Application Program Interface, Version 2.0, November 2000.



Sameer Suresh Shende
Thu Aug 23 11:13:47 PDT 2001