MADNESS  version 0.9
Public Member Functions | Static Public Member Functions | Friends | List of all members
madness::detail::WorldMpi Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

madness::detail::WorldMpi::~WorldMpi ( )
inline

Member Function Documentation

static void madness::detail::WorldMpi::finalize ( )
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().

static void madness::detail::WorldMpi::initialize ( int &  argc,
char **&  argv,
int  requested 
)
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.

Parameters
argcThe number of command line arguments
argvThe values of command line arguments
requestedThe requested thread support for MPI runtime
Exceptions
madness::ExceptionWhen MADNESS has already been initialized.
madness::ExceptionWhen MPI has already been finalized.
SafeMPI::ExceptionWhen 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().

Friends And Related Function Documentation

friend class WorldMpiRuntime
friend

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