OGS
BaseLib::MPI::Mpi Struct Reference

Detailed Description

Definition at line 32 of file MPI.h.

#include <MPI.h>

Public Member Functions

 Mpi (MPI_Comm const communicator=OGS_COMM_WORLD)

Public Attributes

MPI_Comm communicator
int size
int rank

Constructor & Destructor Documentation

◆ Mpi()

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

Definition at line 34 of file MPI.h.

36 {
37 int mpi_init;
38 MPI_Initialized(&mpi_init);
39 if (mpi_init != 1)
40 {
41 OGS_FATAL("MPI is not initialized.");
42 }
43 MPI_Comm_size(communicator, &size);
44 MPI_Comm_rank(communicator, &rank);
45 }
#define OGS_FATAL(...)
Definition Error.h:19
MPI_Comm communicator
Definition MPI.h:47

References communicator, BaseLib::MPI::OGS_COMM_WORLD, OGS_FATAL, rank, and size.

Member Data Documentation

◆ communicator

◆ rank

◆ size


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