MFEM v4.7.0
Finite element discretization library
|
A simple singleton class that calls MPI_Init() at construction and MPI_Finalize() at destruction. It also provides easy access to MPI_COMM_WORLD's rank and size. More...
#include <communication.hpp>
Static Public Member Functions | |
static void | Init (int &argc, char **&argv, int required=default_thread_required, int *provided=nullptr) |
Singleton creation with Mpi::Init(argc, argv). | |
static void | Init (int *argc=nullptr, char ***argv=nullptr, int required=default_thread_required, int *provided=nullptr) |
Singleton creation with Mpi::Init(). | |
static void | Finalize () |
Finalize MPI (if it has been initialized and not yet already finalized). | |
static bool | IsInitialized () |
Return true if MPI has been initialized. | |
static bool | IsFinalized () |
Return true if MPI has been finalized. | |
static int | WorldRank () |
Return the MPI rank in MPI_COMM_WORLD. | |
static int | WorldSize () |
Return the size of MPI_COMM_WORLD. | |
static bool | Root () |
Return true if the rank in MPI_COMM_WORLD is zero. | |
Static Public Attributes | |
static MFEM_EXPORT int | default_thread_required = MPI_THREAD_MULTIPLE |
Default level of thread support for MPI_Init_thread. | |
A simple singleton class that calls MPI_Init() at construction and MPI_Finalize() at destruction. It also provides easy access to MPI_COMM_WORLD's rank and size.
Definition at line 31 of file communication.hpp.
|
inlinestatic |
Finalize MPI (if it has been initialized and not yet already finalized).
Definition at line 63 of file communication.hpp.
|
inlinestatic |
Singleton creation with Mpi::Init(argc, argv).
Definition at line 35 of file communication.hpp.
|
inlinestatic |
Singleton creation with Mpi::Init().
Definition at line 40 of file communication.hpp.
|
inlinestatic |
Return true if MPI has been finalized.
Definition at line 75 of file communication.hpp.
|
inlinestatic |
Return true if MPI has been initialized.
Definition at line 68 of file communication.hpp.
|
inlinestatic |
Return true if the rank in MPI_COMM_WORLD is zero.
Definition at line 96 of file communication.hpp.
|
inlinestatic |
Return the MPI rank in MPI_COMM_WORLD.
Definition at line 82 of file communication.hpp.
|
inlinestatic |
Return the size of MPI_COMM_WORLD.
Definition at line 89 of file communication.hpp.
|
static |
Default level of thread support for MPI_Init_thread.
Definition at line 98 of file communication.hpp.