AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::utilities::raii::MPIWrapper Class Reference

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/core/utilities/RAII.hpp>

Public Member Functions

 MPIWrapper (int argc, char **argv)
 Initialize MPI when Axom is configured with MPI, else no-op. More...
 
 ~MPIWrapper ()
 Finalize MPI when Axom is configured with MPI, else no-op. More...
 
int num_ranks () const
 Returns number of MPI ranks (1 when Axom not configured with MPI) More...
 
int my_rank () const
 Returns id of current of MPI rank (0 when Axom not configured with MPI) More...
 
bool is_initialized () const
 

Detailed Description

RAII wrapper class to initialize and finalize MPI Can also be used when Axom is not configured with MPI

Constructor & Destructor Documentation

◆ MPIWrapper()

axom::utilities::raii::MPIWrapper::MPIWrapper ( int  argc,
char **  argv 
)
inline

Initialize MPI when Axom is configured with MPI, else no-op.

References AXOM_UNUSED_VAR.

◆ ~MPIWrapper()

axom::utilities::raii::MPIWrapper::~MPIWrapper ( )
inline

Finalize MPI when Axom is configured with MPI, else no-op.

References is_initialized().

Member Function Documentation

◆ num_ranks()

int axom::utilities::raii::MPIWrapper::num_ranks ( ) const
inline

Returns number of MPI ranks (1 when Axom not configured with MPI)

◆ my_rank()

int axom::utilities::raii::MPIWrapper::my_rank ( ) const
inline

Returns id of current of MPI rank (0 when Axom not configured with MPI)

◆ is_initialized()

bool axom::utilities::raii::MPIWrapper::is_initialized ( ) const
inline

The documentation for this class was generated from the following file: