MADNESS
version 0.9
|
MPI singleton that manages MPI setup and teardown for MADNESS. More...
#include <worldmpi.h>
Public Member Functions | |
~WorldMpi () | |
WorldMpi destructor. More... | |
Static Public Member Functions | |
static void | initialize (int &argc, char **&argv, int requested) |
Initialize the MPI runtime. More... | |
static void | finalize () |
Finalize the MPI runtime. More... | |
Friends | |
class | WorldMpiRuntime |
MPI singleton that manages MPI setup and teardown for MADNESS.
MADNESS will call WorldMpi::initialize
and WorldMpi::finalize
to setup and teardown the MPI runtime.
|
inline |
WorldMpi destructor.
This will teardown the MPI, SafeMPI
References SafeMPI::Detach_buffer(), SafeMPI::Finalize(), MPI_Error_string(), MPI_MAX_ERROR_STRING, MPI_SUCCESS, and strncpy().
|
inlinestatic |
Finalize the MPI runtime.
This function starts the teardown process of the MPI runtime. The actual MPI_Finalize will only be called when all the objects using MPI have been destroyed.
References madness::tr1::shptr::shared_ptr< T >::reset().
Referenced by madness::finalize().
|
inlinestatic |
Initialize the MPI runtime.
This function starts the MPI runtime. If MPI is already running, then MADNESS delegate responsibility for MPI to the user. In either case, MPI thread support is checked to make sure MPI will play nice with MADNESS.
argc | The number of command line arguments |
argv | The values of command line arguments |
requested | The requested thread support for MPI runtime |
madness::Exception | When MADNESS has already been initialized. |
madness::Exception | When MPI has already been finalized. |
SafeMPI::Exception | When an MPI error occurs. |
References SafeMPI::COMM_WORLD, SafeMPI::Intracomm::Get_rank(), SafeMPI::Is_finalized(), SafeMPI::Is_initialized(), MPI_Abort(), MPI_COMM_WORLD, MPI_THREAD_STRING, SafeMPI::Query_thread(), and madness::tr1::shptr::shared_ptr< T >::reset().
Referenced by madness::initialize().
|
friend |