criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
criptic::MPIUtil Namespace Reference

A namespace to hold variables and functions related to MPI. More...

Classes

struct  fillRequest
 Struture to hold data representing a search request. More...
 
struct  fillResponse
 Struture to hold data representing a response to a request. More...
 

Enumerations

enum  mpiTags { tagHDF5IO , tagWorkDone , tagFillReq = 8192 , tagFillResp = 16384 }
 Tag numbers for different types of MPI messages. More...
 

Functions

void setup (int *argc, char **argv[])
 Initial MPI setup.
 
void haltRun (std::string msg, errCodes errcode)
 Halt a run because an error has occurred.
 
void barrier ()
 Barrier between MPI ranks.
 
void shutdown ()
 Shut down communications for normal exit.
 

Variables

int nRank
 
int myRank
 
bool IOProc
 
int log2nRank
 
MPI_Datatype MPI_Real
 
MPI_Datatype MPI_RealVec
 
MPI_Datatype MPI_RealTensor2
 
MPI_Datatype MPI_Idx
 
MPI_Datatype MPI_CRPacket
 
MPI_Datatype MPI_CRSource
 
MPI_Datatype MPI_FieldQty
 
MPI_Datatype MPI_FieldQtyGrad
 
MPI_Datatype MPI_RealMechArr
 
MPI_Datatype MPI_FillReq
 
MPI_Datatype MPI_FillResp
 
constexpr int IORank = 0
 

Detailed Description

A namespace to hold variables and functions related to MPI.

Enumeration Type Documentation

◆ mpiTags

Tag numbers for different types of MPI messages.

Enumerator
tagHDF5IO 

Tag used during HDF5 IO

tagWorkDone 

Tag to indicate fill work is done

tagFillReq 

Tag for neighbor search messages

tagFillResp 

Tag for neighbor search responses

Function Documentation

◆ barrier()

void criptic::MPIUtil::barrier ( )

Barrier between MPI ranks.

This routine is a thin wrapper around MPI_Barrier

◆ haltRun()

void criptic::MPIUtil::haltRun ( std::string  msg,
errCodes  errcode 
)

Halt a run because an error has occurred.

Parameters
msgError message to output
errcodeError code to return

This routine shuts down the MPI communication system and exits with the indicated error message and code

◆ setup()

void criptic::MPIUtil::setup ( int *  argc,
char **  argv[] 
)

Initial MPI setup.

Parameters
argcNumber of command line arguments
argvPointers to command line arguments

This routine initializes MPI communication. If invoked when MPI is disabled at compile time, it simply sets internal flags to indicate that MPI is disabled.

◆ shutdown()

void criptic::MPIUtil::shutdown ( )

Shut down communications for normal exit.

This routine invoked MPI_Finalize to shut down MPI communications, prior to a successful exit.

Variable Documentation

◆ IOProc

bool criptic::MPIUtil::IOProc

Is this the processor that does I/O?

◆ IORank

constexpr int criptic::MPIUtil::IORank = 0
constexpr

Rank that does I/O

◆ log2nRank

int criptic::MPIUtil::log2nRank

log_2 (MPIUtil::nRank)

◆ MPI_CRPacket

MPI_Datatype criptic::MPIUtil::MPI_CRPacket

MPI type for CR packets

◆ MPI_CRSource

MPI_Datatype criptic::MPIUtil::MPI_CRSource

MPI type for CR sources

◆ MPI_FieldQty

MPI_Datatype criptic::MPIUtil::MPI_FieldQty

MPI type for FieldQty

◆ MPI_FieldQtyGrad

MPI_Datatype criptic::MPIUtil::MPI_FieldQtyGrad

MPI type for FieldQtyGrad

◆ MPI_FillReq

MPI_Datatype criptic::MPIUtil::MPI_FillReq

MPI type for fill request

◆ MPI_FillResp

MPI_Datatype criptic::MPIUtil::MPI_FillResp

MPI type for fill response

◆ MPI_Idx

MPI_Datatype criptic::MPIUtil::MPI_Idx

MPI type corresponding to criptic::IdxType

◆ MPI_Real

MPI_Datatype criptic::MPIUtil::MPI_Real

MPI type corresponding to criptic::Real

◆ MPI_RealMechArr

MPI_Datatype criptic::MPIUtil::MPI_RealMechArr

MPI type corresponding to Losses::MechArr<Real>

◆ MPI_RealTensor2

MPI_Datatype criptic::MPIUtil::MPI_RealTensor2

MPI type corresponding to criptic::RealTensor2

◆ MPI_RealVec

MPI_Datatype criptic::MPIUtil::MPI_RealVec

MPI type corresponding to criptic::RealVec

◆ myRank

int criptic::MPIUtil::myRank

Rank of this MPI process

◆ nRank

int criptic::MPIUtil::nRank

Total number of MPI ranks