OPARI2 - Introduction and Contents

OPARI2 is a tool to automatically instrument C, C++ and Fortran source code files in which pragmas (C/C++) or directives (Fortran) are used. Currently OpenMP and POMP user instrumentation are supported. Function calls to the pomp2_lib.h and pomp2_user_lib.h are inserted around or as replacement for supported directives. By implementing the respective APIs, detailed measurements regarding the runtime behavior of an applications can be made. A conforming implementation needs to implement all functions associated with the supported programming model. The original OPARI was developed to perform source-to-source instrumentation of OpenMP programs. Therefore the main focus of this document still lies on support for OpenMP.

OpenMP 3.0 introduced tasking to OpenMP. To support this feature the POMP2 adapter needs to do some bookkeeping in regard to specific task IDs. The pomp2_lib.c provided with this package includes the necessary code so it is strongly advised to use it as a basis for writing an adapter to your own tool.

A detailed description of the first OPARI version has been published by Mohr et al. in "Design and prototype of a performance tool interface for OpenMP" (Journal of supercomputing, 23, 2002).

# User documentation contents

- Installation
- Basic Usage
- CTC-String Decoding
- Linking to a Measurement System
- POMP User Instrumentation
- Example Code
- Latest Release News

# SUMMARY

The typical usage of OPARI2 consists of the following steps:

1. Call OPARI2 for each input source file

           % opari2 file1.f90
           ...
           % opari2 fileN.f90

2. Compile all modified output files *.mod.* using the OpenMP compiler
3. Generate the initialization file

       % `opari2-config --nm` <objs_and_libs> |            \
         `opari2-config --region-initialization` > pomp2_init_file.c

4. Link the resulting object files against the pomp2 runtime measurement library.