MADNESS  0.10.1
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

void Attach_buffer (void *buffer, int size)
 Set buffer for Bsend . More...
 
int Detach_buffer (void *&buffer)
 Unset the Bsend buffer. More...
 
int Finalize ()
 Analogous to MPI_Finalize. More...
 
void Init ()
 Analogous to MPI_Init. More...
 
void Init (int &argc, char **&argv)
 Analogous to MPI_Init. 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...
 
bool Is_finalized ()
 Check MPI finalization status. More...
 
bool Is_initialized ()
 Check MPI initialization status. More...
 
MPI_Op Op_create (MPI_User_function *user_fn, int commute)
 Analogous to MPI_Op_create. More...
 
void Op_free (MPI_Op op)
 Analogous to MPI_Op_free. More...
 
int Query_thread ()
 Analogous to MPI_Query_thread. More...
 
double Wtime ()
 Wall time. More...
 

Variables

madness::SCALABLE_MUTEX_TYPE charon
 
Intracomm COMM_WORLD = Intracomm::WorldInitObject()
 
static const int DEFAULT_SEND_RECV_TAG = 1000
 
static const int MPIAR_TAG = 1001
 
static const int RMI_TAG = 1023
 

Function Documentation

◆ Attach_buffer()

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().

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

◆ Detach_buffer()

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().

◆ Finalize()

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).

Referenced by madness::detail::WorldMpi::~WorldMpi(), main(), test_he(), test_hydro(), and testPeriodicCoulomb3d().

◆ Init() [1/2]

void SafeMPI::Init ( )
inline

Analogous to MPI_Init.

References Init().

◆ Init() [2/2]

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(), test_he(), and testPeriodicCoulomb3d().

◆ Init_thread() [1/2]

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 madness::detail::WorldMpi::WorldMpi(), Init_thread(), and main().

◆ Init_thread() [2/2]

int SafeMPI::Init_thread ( int  requested)
inline

Analogous to MPI_Init_thread.

Parameters
requestedthe desired thread level
Returns
provided thread level

References Init_thread().

◆ Is_finalized()

bool SafeMPI::Is_finalized ( )
inline

Check MPI finalization status.

Returns
true if MPI has been finalized, false otherwise.

References MPI_Finalized().

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

◆ Is_initialized()

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 SafeMPI::Intracomm::Intracomm(), SafeMPI::Group::Impl::~Impl(), SafeMPI::Intracomm::Impl::~Impl(), and madness::detail::WorldMpi::initialize().

◆ Op_create()

MPI_Op SafeMPI::Op_create ( MPI_User_function user_fn,
int  commute 
)
inline

Analogous to MPI_Op_create.

References MADNESS_MPI_TEST, and MPI_Op_create().

Referenced by madness::RMI::assert_aslr_off().

◆ Op_free()

void SafeMPI::Op_free ( MPI_Op  op)
inline

Analogous to MPI_Op_free.

References MADNESS_MPI_TEST, MPI_Op_free(), and op().

Referenced by madness::RMI::assert_aslr_off().

◆ Query_thread()

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().

◆ Wtime()

double SafeMPI::Wtime ( )
inline

Wall time.

Returns
The current wall time

References MPI_Wtime().

Referenced by timer(), and trantimer().

Variable Documentation

◆ charon

◆ COMM_WORLD

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

◆ DEFAULT_SEND_RECV_TAG

const int SafeMPI::DEFAULT_SEND_RECV_TAG = 1000
static

◆ MPIAR_TAG

const int SafeMPI::MPIAR_TAG = 1001
static

◆ RMI_TAG

const int SafeMPI::RMI_TAG = 1023
static

tags in [1,999] ... allocated once by unique_reserved_tag

tags in [1000,1023] ... statically assigned here

tags in [1024,4095] ... allocated round-robin by unique_tag

tags in [4096,8191] ... reserved for huge msg exchange by RMI

tags in [8192,MPI::TAG_UB] ... not used/managed by madness

Referenced by madness::RMI::RmiTask::post_recv_buf().