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 hybrid OpenMP/MPI traces (for information on how to handle serial, pure OpenMP or pure MPI traces, see the PEARL.base, PEARL.omp, and PEARL.mpi parts of PEARL).
// Initialize MPI, etc. ... // Initialize PEARL PEARL_hybrid_init(); // Load global definitions GlobalDefs defs(archive_name); // Create thread team #pragma omp parallel { // Load trace data LocalTrace trace(archive_name, mpi_rank, omp_get_thread_num()); // Preprocessing PEARL_omp_verify_calltree(defs, trace); #pragma omp master { PEARL_mpi_unify_calltree(defs, trace); } PEARL_omp_preprocess_trace(defs, trace); ... }
Note that all of the aforementioned function calls except PEARL_hybrid_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 MPI communication operation or OpenMP barrier).
![]() |
Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre |