OGS
BaseLib::MPI::Mpi Struct Reference

Detailed Description

Definition at line 45 of file MPI.h.

#include <MPI.h>

Public Member Functions

 Mpi (MPI_Comm const communicator=MPI_COMM_WORLD)
 

Public Attributes

MPI_Comm communicator
 
int size
 
int rank
 

Constructor & Destructor Documentation

◆ Mpi()

BaseLib::MPI::Mpi::Mpi ( MPI_Comm const communicator = MPI_COMM_WORLD)
inline

Definition at line 47 of file MPI.h.

49 {
50 int mpi_init;
51 MPI_Initialized(&mpi_init);
52 if (mpi_init != 1)
53 {
54 OGS_FATAL("MPI is not initialized.");
55 }
56 MPI_Comm_size(communicator, &size);
57 MPI_Comm_rank(communicator, &rank);
58 }
#define OGS_FATAL(...)
Definition Error.h:26
MPI_Comm communicator
Definition MPI.h:60

References communicator, OGS_FATAL, rank, and size.

Member Data Documentation

◆ communicator

◆ rank

◆ size


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