PEARL
Parallel Event Access and Replay Library
Classes | Files
PEARL.omp

OpenMP-related part of the PEARL library. More...

Classes

class  pearl::OmpAcquireLock_rep
 Event representation for OMP_ACQUIRE_LOCK events. More...
class  pearl::OmpFork_rep
 Event representation for OMP_FORK events. More...
class  pearl::OmpJoin_rep
 Event representation for OMP_JOIN events. More...
class  pearl::OmpReleaseLock_rep
 Event representation for OMP_RELEASE_LOCK events. More...
class  pearl::OmpTaskComplete_rep
 Event representation for OMP_TASK_COMPLETE events. More...
class  pearl::OmpTaskCreate_rep
 Event representation for OMP_TASK_CREATE events. More...
class  pearl::OmpTaskSwitch_rep
 Event representation for OMP_TASK_SWITCH events. More...

Files

file  OmpAcquireLock_rep.h
 

Declaration of the class OmpAcquireLock_rep.


file  OmpFork_rep.h
 

Declaration of the class OmpFork_rep.


file  OmpJoin_rep.h
 

Declaration of the class OmpJoin_rep.


file  OmpReleaseLock_rep.h
 

Declaration of the class OmpReleaseLock_rep.


file  OmpTaskComplete_rep.h
 

Declaration of the class OmpTaskComplete_rep.


file  OmpTaskCreate_rep.h
 

Declaration of the class OmpTaskCreate_rep.


file  OmpTaskSwitch_rep.h
 

Declaration of the class OmpTaskSwitch_rep.


file  pearl.h
 

Declarations of global library functions.



Detailed Description

This part of the PEARL library provides all functions and classes that are specific to the handling traces of OpenMP-based programs, including traces of hybrid OpenMP/MPI applications.

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).

  using namespace pearl;

  ...

  // Initialize PEARL
  PEARL_omp_init();

  // Open trace archive
  TraceArchive* archive = TraceArchive::open(archive_name);

  // Load global definitions
  GlobalDefs* defs = archive->getDefinitions();

  // Open trace container
  const LocationGroup& process = defs->getLocationGroup(0);
  archive->openTraceContainer(process);

  // Create thread team
  #pragma omp parallel
  {
    // Load trace data
    const Location& location = process.getLocation(omp_get_thread_num());
    LocalTrace*     trace    = archive->getTrace(*defs, location);

    // Preprocessing
    PEARL_verify_calltree(*defs, *trace);
    PEARL_preprocess_trace(*defs, *trace);

    ...

    // Free trace data
    delete trace;
  }

  // Close trace container & archive
  archive->closeTraceContainer();
  delete archive;

  // Free definition data
  delete defs;

  // Finalize PEARL
  PEARL_finalize();

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).

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Scalasca    Copyright © 1998–2014 Forschungszentrum Jülich GmbH, Jülich Supercomputing Centre
Copyright © 2009–2014 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming