ALPSCore reference
Public Member Functions | Static Public Member Functions | List of all members
alps::mpi::environment Class Reference

MPI environment RAII class. More...

#include <mpi.hpp>

Collaboration diagram for alps::mpi::environment:
Collaboration graph

Public Member Functions

 environment (int &argc, char **&argv, bool abort_on_exception=true)
 Initializes MPI environment unless it's already active. More...
 
 environment (bool abort_on_exception=true)
 Initializes MPI environment unless it's already active. More...
 
 ~environment ()
 Finalizes MPI unless already finalized or was already initilaized when ctor was called. More...
 

Static Public Member Functions

static void abort (int rc=0)
 Call MPI_Abort() More...
 
static bool initialized ()
 Returns initialized status of MPI. More...
 
static bool finalized ()
 Returns finalized status of MPI. More...
 

Detailed Description

MPI environment RAII class.

Definition at line 182 of file mpi.hpp.

Constructor & Destructor Documentation

alps::mpi::environment::environment ( int &  argc,
char **&  argv,
bool  abort_on_exception = true 
)
inline

Initializes MPI environment unless it's already active.

Parameters
argcargc argument from main(argc, argv)
argvargv argument from main(argc, argv)
abort_on_exceptionIf true and MPI environment object is getting destroyed while an exception is being handled, call MPI_Abort()

Definition at line 217 of file mpi.hpp.

alps::mpi::environment::environment ( bool  abort_on_exception = true)
inline

Initializes MPI environment unless it's already active.

This ctor does not pass argc and argv.

Parameters
abort_on_exceptionIf true and MPI environment object is getting destroyed while an exception is being handled, call MPI_Abort()

Definition at line 231 of file mpi.hpp.

alps::mpi::environment::~environment ( )
inline

Finalizes MPI unless already finalized or was already initilaized when ctor was called.

If called during an exception unwinding, may call MPI_Abort() (see the corresponding ctors)

Definition at line 244 of file mpi.hpp.

Member Function Documentation

static void alps::mpi::environment::abort ( int  rc = 0)
inlinestatic

Call MPI_Abort()

Definition at line 188 of file mpi.hpp.

static bool alps::mpi::environment::finalized ( )
inlinestatic

Returns finalized status of MPI.

Definition at line 202 of file mpi.hpp.

static bool alps::mpi::environment::initialized ( )
inlinestatic

Returns initialized status of MPI.

Definition at line 194 of file mpi.hpp.


The documentation for this class was generated from the following file: