Multi-ApplicationOnlineProfiling  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Instrumentation

This module contains the Instrumentation part of MALP. More...

Modules

 Sync Time
 This module is in charge of synchronizing time between MPI processes.
 

Data Structures

struct  Event_Packer
 This is the struct used to send events throuh a stream. More...
 
struct  Stream_Manager
 Struct defining a stream manager. More...
 
struct  Stream_Infos
 Structure describing a stream. More...
 

Macros

#define MAX_PENDING_EVENT   4096
 Defines the maximum pending events. More...
 

Functions

static struct Event_PackerEvent_Packer ()
 Getter on the current event packer. More...
 
void Event_Packer_init ()
 Initializes the event packer, maps current process to existing Analyser or IO_WRITE partition and initializes the streams. More...
 
void Event_Packer_release ()
 Releases the event packer. More...
 
void Event_Packer_push (struct MALP_Trace_Event *event)
 Sends an event. More...
 
void Event_Packer_flush ()
 Processes the send of all events present in the internal FIFO. More...
 
static struct Stream_ManagerStream_Manager ()
 A getter for the stream manager. More...
 
void Stream_Manager_init ()
 Initialises the manager for current MPI process. More...
 
void Stream_Manager_release ()
 Releases the manager for current MPI process (including all streams ) More...
 
struct Stream_InfosStream_MGR_new_stream (struct Stream_Descriptor *parent, Stream_type type)
 Adds a stream into the current stream manager. More...
 
void Stream_MGR_end_stream ()
 Signals end of stream. More...
 
void Stream_Infos_init (struct Stream_Infos *info)
 Initializes a Stream_Infos. More...
 
void Stream_Infos_release (struct Stream_Infos *info)
 Releases a Stream_Infos. More...
 
static struct Stream_InfosStream_infos_get ()
 Getter on the current Stream_Infos. More...
 
static void Stream_infos_set (struct Stream_Infos *sd)
 Setter on the current Stream_Infos. More...
 
static struct Stream_DescriptorStream_desc_get ()
 Getter on the current Stream_Descriptor. More...
 
static void Stream_Infos_enter_mpi ()
 Indicates to the current Stream_Infos (if any) that we are enterning a MPI call. More...
 
static void Stream_Infos_leave_mpi ()
 Indicates to the current Stream_Infos (if any) that we are leaving a MPI call. More...
 
static int Stream_Infos_is_in_mpi ()
 Checks if we are currently inside a MPI call. More...
 
static void MALP_Trace_Event_fill (struct MALP_Trace_Event *event, MALP_Trace_event_type type, uint64_t timestamp, uint64_t duration)
 
static MPI_Comm Trace_Comm_get ()
 Getter on the sync communicator. More...
 
void Trace_Comm_init ()
 Initializes the trace communicator. More...
 
void Trace_Comm_release ()
 Releases the trace communicator. More...
 

Variables

struct Event_Packer _malp_e_packer
 The event packer of the current MPI rank. More...
 
struct Stream_Manager __stream_Stream_Manager
 The stream manager for current MPI process. More...
 
struct Stream_Infos__trace_module
 This is a global Stream_Infos (not shared between threads) More...
 
MPI_Comm __trace_comm
 This is the MPI communicator used for interprocess time synchronization. More...
 

Detailed Description

This module contains the Instrumentation part of MALP.

This part offers an instrumentation interface to programs. As it is done in Virtual MPI, all the MPI functions are wrapped to do things before/after the actual call, and so are a (large) set of POSIX functions.

The wrapping consists basicaly in replacing the MPI Communicator (as in Virtual MPI), computing the time spent within the function and sending the created event into the event system (see Event_Packer_push()).

The MPI functions are wrapped using the Wrapper and POSIX functions are manually wrapped.

Macro Definition Documentation

#define MAX_PENDING_EVENT   4096

Defines the maximum pending events.

Definition at line 93 of file Stream_MGR.h.

Function Documentation

static struct Event_Packer* Event_Packer ( )
static

Getter on the current event packer.

Returns
the current event packer

Definition at line 54 of file Event_Pack.h.

Here is the caller graph for this function:

void Event_Packer_flush ( )

Processes the send of all events present in the internal FIFO.

Definition at line 164 of file Event_Pack.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void Event_Packer_init ( )

Initializes the event packer, maps current process to existing Analyser or IO_WRITE partition and initializes the streams.

Definition at line 30 of file Event_Pack.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void Event_Packer_push ( struct MALP_Trace_Event event)

Sends an event.

the event is stored into an internal FIFO until it gets full.

Parameters
eventthe event to send

Definition at line 141 of file Event_Pack.c.

Here is the call graph for this function:

void Event_Packer_release ( )

Releases the event packer.

Definition at line 74 of file Event_Pack.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void MALP_Trace_Event_fill ( struct MALP_Trace_Event event,
MALP_Trace_event_type  type,
uint64_t  timestamp,
uint64_t  duration 
)
inlinestatic

Definition at line 186 of file Stream_MGR.h.

Here is the call graph for this function:

static struct Stream_Descriptor* Stream_desc_get ( )
static

Getter on the current Stream_Descriptor.

Returns
the current Stream_Descriptor

Definition at line 147 of file Stream_MGR.h.

static void Stream_Infos_enter_mpi ( )
inlinestatic

Indicates to the current Stream_Infos (if any) that we are enterning a MPI call.

Definition at line 155 of file Stream_MGR.h.

static struct Stream_Infos* Stream_infos_get ( )
static

Getter on the current Stream_Infos.

Returns
the current Stream_Infos

Definition at line 129 of file Stream_MGR.h.

Here is the caller graph for this function:

void Stream_Infos_init ( struct Stream_Infos info)

Initializes a Stream_Infos.

Parameters
infothe Stream_Infos to initialize

Definition at line 76 of file Stream_MGR.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int Stream_Infos_is_in_mpi ( )
inlinestatic

Checks if we are currently inside a MPI call.

Returns
1 if we are inside a MPI call, 0 otherwise

Definition at line 178 of file Stream_MGR.h.

Here is the caller graph for this function:

static void Stream_Infos_leave_mpi ( )
inlinestatic

Indicates to the current Stream_Infos (if any) that we are leaving a MPI call.

Definition at line 166 of file Stream_MGR.h.

void Stream_Infos_release ( struct Stream_Infos info)

Releases a Stream_Infos.

Parameters
infothe Stream_Infos to release

Definition at line 82 of file Stream_MGR.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void Stream_infos_set ( struct Stream_Infos sd)
inlinestatic

Setter on the current Stream_Infos.

Parameters
sdthe new Stream_Infos

Definition at line 138 of file Stream_MGR.h.

Here is the caller graph for this function:

static struct Stream_Manager* Stream_Manager ( )
static

A getter for the stream manager.

Returns
the current manager

Definition at line 60 of file Stream_MGR.h.

Here is the caller graph for this function:

void Stream_Manager_init ( )

Initialises the manager for current MPI process.

Definition at line 56 of file Stream_MGR.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void Stream_Manager_release ( )

Releases the manager for current MPI process (including all streams )

Definition at line 66 of file Stream_MGR.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void Stream_MGR_end_stream ( )

Signals end of stream.

Definition at line 138 of file Stream_MGR.c.

Here is the call graph for this function:

Here is the caller graph for this function:

struct Stream_Infos* Stream_MGR_new_stream ( struct Stream_Descriptor parent,
Stream_type  type 
)

Adds a stream into the current stream manager.

Parameters
parentDescriptor of wanted parent stream
typethe stream type
Returns
descriptor of the newly added stream
Todo:
Within MALP, parent is alwayse NULL and type is alwayse MALP_PROCESS

Definition at line 89 of file Stream_MGR.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static MPI_Comm Trace_Comm_get ( )
inlinestatic

Getter on the sync communicator.

Returns
The current sync communicator

Definition at line 40 of file Trace_Comm.h.

Here is the caller graph for this function:

void Trace_Comm_init ( )

Initializes the trace communicator.

Basically PMPI_Comm_dup of current partition communicator

Definition at line 30 of file Trace_Comm.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void Trace_Comm_release ( )

Releases the trace communicator.

Basically PMPI_Comm_free of current partition communicator

Definition at line 39 of file Trace_Comm.c.

Here is the caller graph for this function:

Variable Documentation

struct Stream_Manager __stream_Stream_Manager

The stream manager for current MPI process.

Definition at line 35 of file Stream_MGR.c.

MPI_Comm __trace_comm

This is the MPI communicator used for interprocess time synchronization.

Definition at line 27 of file Trace_Comm.c.

struct Stream_Infos* __trace_module

This is a global Stream_Infos (not shared between threads)

Definition at line 33 of file Stream_MGR.c.

struct Event_Packer _malp_e_packer

The event packer of the current MPI rank.

Definition at line 27 of file Event_Pack.c.