2.2 (revision 4737)
Macros | Functions
OTF2_MPI_Collectives.h File Reference

MPI collectives for OTF2. More...

#include <otf2/otf2.h>
#include <mpi.h>

Go to the source code of this file.

Macros

#define OTF2_MPI_USE_PMPI
 If you want that the collectives call the PMPI interface, define this macro before including the header.
 
#define OTF2_MPI_UINT8_T   MPI_UNSIGNED_CHAR
 Define this macro to a suitable MPI datatype to be used for uint8_t before including the header. MPI_UNSIGNED_CHAR or MPI_UINT8_T are used as proper default value. The latter in case of a MPI 3.0 conforming implementation.
 
#define OTF2_MPI_INT8_T   MPI_CHAR
 Define this macro to a suitable MPI datatype to be used for int8_t before including the header. MPI_CHAR or MPI_INT8_T are used as proper default value. The latter in case of a MPI 3.0 conforming implementation.
 
#define OTF2_MPI_UINT16_T   MPI_UNSIGNED_SHORT
 Define this macro to a suitable MPI datatype to be used for uint16_t before including the header. MPI_UNSIGNED_SHORT or MPI_UINT16_T are used as proper default value. The latter in case of a MPI 3.0 conforming implementation.
 
#define OTF2_MPI_INT16_T   MPI_SHORT
 Define this macro to a suitable MPI datatype to be used for int32_t before including the header. MPI_SHORT or MPI_INT32_T are used as proper default value. The latter in case of a MPI 3.0 conforming implementation.
 
#define OTF2_MPI_UINT32_T   MPI_UNSIGNED
 Define this macro to a suitable MPI datatype to be used for uint32_t before including the header. MPI_UNSIGNED or MPI_UINT32_T are used as proper default value. The latter in case of a MPI 3.0 conforming implementation.
 
#define OTF2_MPI_INT32_T   MPI_INT
 Define this macro to a suitable MPI datatype to be used for int32_t before including the header. MPI_INT or MPI_INT32_T are used as proper default value. The latter in case of a MPI 3.0 conforming implementation.
 
#define OTF2_MPI_UINT64_T   MPI_UINT64_T
 Define this macro to a suitable MPI datatype to be used for uint64_t before including the header. MPI_UINT64_T is used as proper default value in case of a MPI 3.0 conforming implementation.
 
#define OTF2_MPI_INT64_T   MPI_INT64_T
 Define this macro to a suitable MPI datatype to be used for int64_t before including the header. MPI_INT64_T is used as proper default value in case of a MPI 3.0 conforming implementation.
 
#define OTF2_MPI_FLOAT   MPI_FLOAT
 Define this macro to a suitable MPI datatype to be used for float before including the header. MPI_FLOAT is used as proper default value.
 
#define OTF2_MPI_DOUBLE   MPI_DOUBLE
 Define this macro to a suitable MPI datatype to be used for double before including the header. MPI_DOUBLE is used as proper default value.
 

Functions

static OTF2_ErrorCode OTF2_MPI_Archive_SetCollectiveCallbacks (OTF2_Archive *archive, MPI_Comm globalComm, MPI_Comm localComm)
 Register a MPI collective context to an OTF2 archive. More...
 
static OTF2_ErrorCode OTF2_MPI_Archive_SetCollectiveCallbacksSplit (OTF2_Archive *archive, MPI_Comm globalComm, uint32_t numberOfFiles)
 Register a MPI collective context to an OTF2 archive. More...
 
static OTF2_ErrorCode OTF2_MPI_Reader_SetCollectiveCallbacks (OTF2_Reader *reader, MPI_Comm globalComm)
 Register a MPI collective context to an OTF2 reader. More...
 

Detailed Description

MPI collectives for OTF2.

See Usage in reading mode - MPI example and Usage in writing mode - MPI example for instruction how to use.

Function Documentation

static OTF2_ErrorCode OTF2_MPI_Archive_SetCollectiveCallbacks ( OTF2_Archive archive,
MPI_Comm  globalComm,
MPI_Comm  localComm 
)
static

Register a MPI collective context to an OTF2 archive.

Parameters
archiveThe archive handle.
globalCommThe global communicator to use. Will be duplicated.
localCommThe local communicator to use. Maybe MPI_COMM_NULL, otherwise all localComm must be disjoint and join to globalComm. Will be duplicated.
Returns
Success or error code.
Examples:
otf2_mpi_writer_example.c.
static OTF2_ErrorCode OTF2_MPI_Archive_SetCollectiveCallbacksSplit ( OTF2_Archive archive,
MPI_Comm  globalComm,
uint32_t  numberOfFiles 
)
static

Register a MPI collective context to an OTF2 archive.

Parameters
archiveThe archive handle.
globalCommThe global communicator to use. Will be duplicated.
numberOfFilesSplits the globalComm into numberOfFiles disjoint sub-communicators and evenly distribute the ranks among them.
Returns
Success or error code.
static OTF2_ErrorCode OTF2_MPI_Reader_SetCollectiveCallbacks ( OTF2_Reader reader,
MPI_Comm  globalComm 
)
static

Register a MPI collective context to an OTF2 reader.

Parameters
readerThe reader handle.
globalCommThe global communicator to use. Will be duplicated.
Returns
Success or error code.
Examples:
otf2_mpi_reader_example.c, and otf2_mpi_reader_example.cc.