OGS
BaseLib::MPI::Mpi Struct Reference

Detailed Description

Definition at line 43 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 45 of file MPI.h.

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

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: