MADNESS  0.10.1
Classes | Namespaces | Macros | Functions | Variables
safempi.h File Reference

Serializes calls to MPI in case it does not support THREAD_MULTIPLE. More...

#include <madness/madness_config.h>
#include <mpi.h>
#include <madness/world/worldmutex.h>
#include <madness/world/type_traits.h>
#include <iostream>
#include <csignal>
#include <cstdlib>
#include <cstring>
#include <memory>
#include <sstream>
Include dependency graph for safempi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

 SafeMPI
 
 SafeMPI::detail
 

Macros

#define MADNESS_MPI_TEST(condition)
 
#define MADNESS_SERIALIZES_MPI
 
#define SAFE_MPI_GLOBAL_MUTEX   madness::ScopedMutex<madness::SCALABLE_MUTEX_TYPE> obolus(SafeMPI::charon);
 

Functions

void SafeMPI::Attach_buffer (void *buffer, int size)
 Set buffer for Bsend . More...
 
int SafeMPI::Detach_buffer (void *&buffer)
 Unset the Bsend buffer. More...
 
int SafeMPI::Finalize ()
 Analogous to MPI_Finalize. More...
 
void SafeMPI::Init ()
 Analogous to MPI_Init. More...
 
void SafeMPI::Init (int &argc, char **&argv)
 Analogous to MPI_Init. More...
 
void SafeMPI::detail::init_comm_world ()
 Initialize SafeMPI::COMM_WORLD. More...
 
int SafeMPI::Init_thread (int &argc, char **&argv, int requested)
 Analogous to MPI_Init_thread. More...
 
int SafeMPI::Init_thread (int requested)
 Analogous to MPI_Init_thread. More...
 
bool SafeMPI::Is_finalized ()
 Check MPI finalization status. More...
 
bool SafeMPI::Is_initialized ()
 Check MPI initialization status. More...
 
MPI_Op SafeMPI::Op_create (MPI_User_function *user_fn, int commute)
 Analogous to MPI_Op_create. More...
 
void SafeMPI::Op_free (MPI_Op op)
 Analogous to MPI_Op_free. More...
 
void SafeMPI::detail::print_mpi_error (const int rc, const char *function, const int line, const char *file)
 
int SafeMPI::Query_thread ()
 Analogous to MPI_Query_thread. More...
 
double SafeMPI::Wtime ()
 Wall time. More...
 

Variables

static const int SafeMPI::DEFAULT_SEND_RECV_TAG = 1000
 
static const int SafeMPI::MPIAR_TAG = 1001
 
static const int SafeMPI::RMI_TAG = 1023
 

Detailed Description

Serializes calls to MPI in case it does not support THREAD_MULTIPLE.

Macro Definition Documentation

◆ MADNESS_MPI_TEST

#define MADNESS_MPI_TEST (   condition)
Value:
{ \
int mpi_error_code = condition; \
if(mpi_error_code != MPI_SUCCESS) throw ::SafeMPI::Exception(mpi_error_code); \
}
#define MPI_SUCCESS
Definition: stubmpi.h:33

◆ MADNESS_SERIALIZES_MPI

#define MADNESS_SERIALIZES_MPI

◆ SAFE_MPI_GLOBAL_MUTEX

#define SAFE_MPI_GLOBAL_MUTEX   madness::ScopedMutex<madness::SCALABLE_MUTEX_TYPE> obolus(SafeMPI::charon);