Files | |
file | pearl.h |
Declarations of global library functions. |
The following code snippet shows the basic steps required to load and set up the PEARL data structures to handle pure OpenMP traces (for information on how to handle serial, pure MPI or hybrid OpenMP/MPI traces, see the PEARL.base, PEARL.mpi, and PEARL.hybrid parts of PEARL).
... // Initialize PEARL PEARL_omp_init(); // Load global definitions GlobalDefs defs(archive_name); // Create thread team #pragma omp parallel { // Load trace data LocalTrace trace(archive_name, 0, omp_get_thread_num()); // Preprocessing PEARL_omp_verify_calltree(defs, trace); PEARL_omp_preprocess_trace(defs, trace); ... }
Note that all of the aforementioned function calls except PEARL_omp_init() throw exceptions in case of errors. This has to be taken into account to avoid deadlocks (e.g., one process failing with an exception while the other processes wait in an OpenMP barrier).
![]() |
Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre |