MADNESS  version 0.9
Namespaces | Classes | Functions | Variables
SafeMPI Namespace Reference

Namespaces

 detail
 

Classes

class  Exception
 SafeMPI exception object. More...
 
class  Group
 
class  Intracomm
 Wrapper around MPI_Comm. Has a shallow copy constructor; use Create(Get_group()) for deep copy. More...
 
class  Request
 
class  Status
 

Functions

int Finalize ()
 Analogous to MPI_Finalize. More...
 
bool Is_initialized ()
 Check MPI initialization status. More...
 
bool Is_finalized ()
 Check MPI finalization status. More...
 
int Init_thread (int &argc, char **&argv, int requested)
 Analogous to MPI_Init_thread. More...
 
int Init_thread (int requested)
 Analogous to MPI_Init_thread. More...
 
void Init (int &argc, char **&argv)
 Analogous to MPI_Init. More...
 
void Init ()
 Analogous to MPI_Init. More...
 
int Query_thread ()
 Analogous to MPI_Query_thread. More...
 
double Wtime ()
 Wall time. More...
 
void Attach_buffer (void *buffer, int size)
 Set buffer for Bsend . More...
 
int Detach_buffer (void *&buffer)
 Unset the Bsend buffer. More...
 

Variables

Intracomm COMM_WORLD = Intracomm::WorldInitObject()
 
madness::SCALABLE_MUTEX_TYPE charon
 

Function Documentation

void SafeMPI::Attach_buffer ( void *  buffer,
int  size 
)
inline

Set buffer for Bsend .

Parameters
bufferThe buffer to be used by Bsend
sizeThe size of the buffer in Bytes

References MADNESS_MPI_TEST, and MPI_Buffer_attach().

int SafeMPI::Detach_buffer ( void *&  buffer)
inline

Unset the Bsend buffer.

Parameters
[out]bufferThe buffer that was used by Bsend

References MPI_Buffer_detach().

Referenced by madness::detail::WorldMpi::~WorldMpi().

int SafeMPI::Finalize ( )
inline

Analogous to MPI_Finalize.

This returns status rather than throw an exception upon failure because this is a "destructor", and throwing from destructors is evil.

Returns
0 if successful, nonzero otherwise (see MPI_Finalize() for the return codes).

References COMM_WORLD, MPI_Finalize(), and madness::tr1::shptr::shared_ptr< T >::reset().

Referenced by madness::finalize(), main(), and madness::detail::WorldMpi::~WorldMpi().

void SafeMPI::Init ( int &  argc,
char **&  argv 
)
inline

Analogous to MPI_Init.

Parameters
argcThe number of arguments in argv
argvThe vector of command-line arguments

References SafeMPI::detail::init_comm_world(), MADNESS_MPI_TEST, and MPI_Init().

Referenced by Init(), main(), testing::internal::NativeArray< Element >::NativeArray(), and testing::internal::RE::RE().

void SafeMPI::Init ( )
inline

Analogous to MPI_Init.

References Init().

int SafeMPI::Init_thread ( int &  argc,
char **&  argv,
int  requested 
)
inline

Analogous to MPI_Init_thread.

Parameters
argcthe number of arguments in argv
argvthe vector of command-line arguments
requestedthe desired thread level
Returns
provided thread level

References SafeMPI::detail::init_comm_world(), MADNESS_MPI_TEST, and MPI_Init_thread().

Referenced by Init_thread().

int SafeMPI::Init_thread ( int  requested)
inline

Analogous to MPI_Init_thread.

Parameters
requestedthe desired thread level
Returns
provided thread level

References Init_thread().

bool SafeMPI::Is_finalized ( )
inline

Check MPI finalization status.

Returns
true if MPI has been finalized, false otherwise.

References MPI_Finalized().

Referenced by madness::detail::WorldMpi::initialize(), and madness::WorldAmInterface::~WorldAmInterface().

bool SafeMPI::Is_initialized ( )
inline

Check MPI initialization status.

Returns
true if MPI has been initialized, false otherwise.

References madness::initialized(), and MPI_Initialized().

Referenced by madness::detail::WorldMpi::initialize(), and SafeMPI::Intracomm::Intracomm().

int SafeMPI::Query_thread ( )
inline

Analogous to MPI_Query_thread.

Returns
the MPI thread level provided by SafeMPI::Init_thread()

References MADNESS_MPI_TEST, and MPI_Query_thread().

Referenced by madness::detail::WorldMpi::initialize().

double SafeMPI::Wtime ( )
inline

Wall time.

Returns
The current wall time

References MPI_Wtime().

Variable Documentation

Intracomm SafeMPI::COMM_WORLD = Intracomm::WorldInitObject()