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

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

Files

file  EventSet.h
 Declaration of the class EventSet.
 
file  LocalData.h
 Declaration of the class LocalData.
 
file  MpiCancelled_rep.h
 Declaration of the class MpiCancelled_rep.
 
file  MpiCollBegin_rep.h
 Declaration of the class MpiCollBegin_rep.
 
file  MpiCollEnd_rep.h
 Declaration of the class MpiCollEnd_rep.
 
file  MpiComm.h
 Declaration of the class MpiComm.
 
file  MpiGroup.h
 Declaration of the class MpiGroup.
 
file  MpiMessage.h
 Declaration of the class MpiMessage.
 
file  MpiReceive_rep.h
 Declaration of the class MpiReceive_rep.
 
file  MpiReceiveComplete_rep.h
 Declaration of the class MpiReceiveComplete_rep.
 
file  MpiReceiveRequest_rep.h
 Declaration of the class MpiReceiveRequest_rep.
 
file  MpiRequestTested_rep.h
 Declaration of the class MpiRequestTested_rep.
 
file  MpiRmaCollBegin_rep.h
 Declaration of the class MpiRmaCollBegin_rep.
 
file  MpiRmaCollEnd_rep.h
 Declaration of the class MpiRmaCollEnd_rep.
 
file  MpiRmaGats_rep.h
 Declaration of the class MpiRmaGats_rep.
 
file  MpiRmaGetEnd_rep.h
 Declaration of the class MpiRmaGetEnd_rep.
 
file  MpiRmaGetStart_rep.h
 Declaration of the class MpiRmaGetStart_rep.
 
file  MpiRmaLock_rep.h
 Declaration of the class MpiRmaLock_rep.
 
file  MpiRmaPutEnd_rep.h
 Declaration of the class MpiRmaPutEnd_rep.
 
file  MpiRmaPutStart_rep.h
 Declaration of the class MpiRmaPutStart_rep.
 
file  MpiRmaUnlock_rep.h
 Declaration of the class MpiRmaUnlock_rep.
 
file  MpiSend_rep.h
 Declaration of the class MpiSend_rep.
 
file  MpiSendComplete_rep.h
 Declaration of the class MpiSendComplete_rep.
 
file  MpiSendRequest_rep.h
 Declaration of the class MpiSendRequest_rep.
 
file  MpiWindow.h
 Declaration of the class MpiWindow.
 
file  pearl.h
 Declarations of global library functions.
 
file  RemoteData.h
 Declaration of the class RemoteData.
 
file  RemoteEventSet.h
 Declaration of the class RemoteEventSet.
 

Classes

class  pearl::EventSet
 Container class for a set of local events with associated roles. More...
 
class  pearl::LocalData
 Container class for a set of local events with associated roles. More...
 
class  pearl::MpiCancelled_rep
 Event representation for MPI_CANCELLED events. More...
 
class  pearl::MpiCollBegin_rep
 Event representation for the begin of MPI collective operations. More...
 
class  pearl::MpiCollEnd_rep
 Event representation for end of MPI collective operations. More...
 
class  pearl::MpiComm
 Communicator definition representation for multi-process communicators. More...
 
class  pearl::MpiGroup
 Grouping set definition representation for a multi-process communication set. More...
 
class  pearl::MpiMessage
 Abstraction layer for MPI messages. More...
 
class  pearl::MpiReceive_rep
 Event representation for MPI_RECV events. More...
 
class  pearl::MpiReceiveComplete_rep
 Event representation for MPI_RECV events. More...
 
class  pearl::MpiReceiveRequest_rep
 Event representation for MPI_RECV_REQUEST events. More...
 
class  pearl::MpiRequestTested_rep
 Event representation for MPI_SEND_COMPLETE events. More...
 
class  pearl::MpiRmaCollBegin_rep
 Event representation for the begin of MPI RMA collective operations. More...
 
class  pearl::MpiRmaCollEnd_rep
 Event representation for the end of MPI RMA collective operations. More...
 
class  pearl::MpiRmaGats_rep
 Event representation for MPI_RMAGATS events representing group-based synchronization. More...
 
class  pearl::MpiRmaGetEnd_rep
 Event representation for RMA_GET_END events. More...
 
class  pearl::MpiRmaGetStart_rep
 Event representation for RMA_GET_START events. More...
 
class  pearl::MpiRmaLock_rep
 Class for MPI RMA lock events. More...
 
class  pearl::MpiRmaPutEnd_rep
 Event representation for RMA_PUT_END events. More...
 
class  pearl::MpiRmaPutStart_rep
 Event representation for MPI_RMA_PUT_START events. More...
 
class  pearl::MpiRmaUnlock_rep
 Class for MPI RMA unlock events. More...
 
class  pearl::MpiSend_rep
 Event representation for MPI_SEND events. More...
 
class  pearl::MpiSendComplete_rep
 Event representation for MPI_SEND_COMPLETE events. More...
 
class  pearl::MpiSendRequest_rep
 Event representation for MPI_SEND events. More...
 
class  pearl::MpiWindow
 Stores information related to an MPI-2 remote memory access window. More...
 
class  pearl::RemoteData
 Container class for a set of remote events with associated roles. More...
 
class  pearl::RemoteEventSet
 Container class for a set of remote events with associated roles. More...
 

Detailed Description

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

The following code snippet shows the basic steps required to load and set up the PEARL data structures to handle MPI traces. To handle traces of multi-threaded MPI applications, the steps between loading and freeing the trace data can be executed in parallel by multiple analysis threads, except for PEARL_mpi_unify_calltree() which must be executed by the master thread only. For information on how to handle serial or pure multi-threaded traces, see the PEARL.base part of PEARL.

using namespace pearl;
// Initialize MPI, etc.
...
// Initialize PEARL
PEARL_mpi_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(mpi_rank);
archive->openTraceContainer(process);
// Load trace data of the master thread
const Location& location = process.getLocation(0);
LocalTrace* trace = archive->getTrace(*defs, location);
// Preprocessing
PEARL_verify_calltree(*defs, *trace);
PEARL_preprocess_trace(*defs, *trace);
// Process trace data
...
// Free trace data
delete trace;
// Close trace container & archive
delete archive;
// Free definition data
delete defs;
// Finalize PEARL
// Finalize MPI
...

Note that the trace container can be closed immediately after all trace data has been loaded. However, this operation must only be performed by the master thread in a multi-threaded context. We therefore deliberately moved this function call near the end of the code snippet to simplify the description of how to handle traces in a multi-threaded context.

Also, all of the aforementioned PEARL API calls may throw exceptions in case of errors. This has to be taken into account to avoid deadlocks, for example, if one process or thread is failing with an exception while the other processes/threads wait in an MPI communication or thread synchronization operation.

pearl::TraceArchive::openTraceContainer
void openTraceContainer(const LocationGroup &locGroup)
Open trace data container.
pearl::LocalTrace
Container class for local event traces.
Definition: LocalTrace.h:58
pearl::LocationGroup
Interface of location group definition representations.
Definition: LocationGroup.h:66
pearl::Location
Representation of a location definition.
Definition: Location.h:66
pearl
Namespace of the PEARL library.
Definition: AmHandler.h:38
pearl::GlobalDefs::getLocationGroup
const LocationGroup & getLocationGroup(LocationGroup::IdType id) const
LocationGroup lookup by identifier.
pearl::PEARL_preprocess_trace
void PEARL_preprocess_trace(const GlobalDefs &defs, const LocalTrace &trace)
pearl::PEARL_mpi_unify_calltree
void PEARL_mpi_unify_calltree(GlobalDefs &defs)
pearl::TraceArchive::open
static TraceArchive * open(const std::string &anchorName)
Open an experiment archive.
pearl::PEARL_finalize
void PEARL_finalize()
pearl::PEARL_verify_calltree
void PEARL_verify_calltree(GlobalDefs &defs, LocalTrace &trace)
pearl::GlobalDefs
Stores the global definitions of a tracing experiment.
Definition: GlobalDefs.h:63
pearl::LocationGroup::getLocation
const Location & getLocation(uint32_t index) const
Get location.
pearl::TraceArchive
Abstract representation of a trace experiment archive.
Definition: TraceArchive.h:132
pearl::TraceArchive::closeTraceContainer
void closeTraceContainer()
Close trace data container.
pearl::TraceArchive::getDefinitions
GlobalDefs * getDefinitions()
Get global definitions.
pearl::TraceArchive::getTrace
LocalTrace * getTrace(const GlobalDefs &defs, const Location &location, LocalIdMaps *idMaps=0)
Get trace data.

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