MPI singleton that manages MPI setup and teardown for MADNESS.
More...
#include <worldmpi.h>
|
static void | finalize () |
| Finalize the MPI runtime.
|
|
static void | initialize (int &argc, char **&argv, int requested) |
| Initialize the MPI runtime.
|
|
|
static bool | own_mpi = false |
| Flag storing if MADNESS is responsible for MPI.
|
|
static std::shared_ptr< WorldMpi > | world_mpi |
| Pointer to help MADNESS manage MPI.
|
|
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.
◆ WorldMpi() [1/2]
madness::detail::WorldMpi::WorldMpi |
( |
int & |
argc, |
|
|
char **& |
argv, |
|
|
int |
requested |
|
) |
| |
|
inlineprivate |
◆ WorldMpi() [2/2]
madness::detail::WorldMpi::WorldMpi |
( |
const WorldMpi & |
| ) |
|
|
privatedelete |
◆ ~WorldMpi()
madness::detail::WorldMpi::~WorldMpi |
( |
| ) |
|
|
inline |
◆ finalize()
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 world_mpi.
◆ initialize()
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.
- Exceptions
-
madness::Exception | When MADNESS has already been initialized. |
madness::Exception | When MPI has already been finalized. |
SafeMPI::Exception | When an MPI error occurs. |
- Parameters
-
[in,out] | argc | The number of command line arguments. |
[in,out] | argv | The values of command line arguments. |
[in] | requested | The requested thread support for MPI runtime. |
References SafeMPI::COMM_WORLD, SafeMPI::Intracomm::Get_rank(), SafeMPI::Is_finalized(), SafeMPI::Is_initialized(), MADNESS_ASSERT, MPI_Abort(), MPI_COMM_WORLD, MPI_THREAD_STRING, own_mpi, SafeMPI::Query_thread(), and world_mpi.
◆ operator=()
◆ WorldMpiRuntime
The documentation for this class was generated from the following files: