|
TRIQS/mpi 2.0.0
C++ interface to MPI
|
#include <mpi/environment.hpp>
RAII class to initialize and finalize MPI.
Calls MPI_Init upon construction and MPI_Finalize upon destruction i.e. when the environment object goes out of scope. If mpi::has_env is false, this struct does nothing.
Definition at line 79 of file environment.hpp.
Public Member Functions | |
| environment (int argc, char *argv[]) | |
| Construct a new mpi environment object by calling MPI_Init. | |
| ~environment () | |
| Destroy the mpi environment object by calling MPI_Finalize. | |
|
inline |
Construct a new mpi environment object by calling MPI_Init.
Checks first if the program is run with an MPI runtime environment and if it has not been initialized before to avoid errors.
Direct calls the MPI C API are checked for success with mpi::check_mpi_call.
| argc | Number of command line arguments. |
| argv | Command line arguments. |
Definition at line 91 of file environment.hpp.
|
inline |
Destroy the mpi environment object by calling MPI_Finalize.
Checks first if the program is run with an MPI runtime environment and if it has not been finalized before to avoid errors.
Definition at line 101 of file environment.hpp.