# PhasicFlow: processors Class Reference
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

processors Class Reference

This class holds the information about the global execution world and number of processors in communication. More...

Inheritance diagram for processors:
[legend]

## Public Member Functions

| processors ()
| Constructor. More...
| ~processors ()
| Destructor. More...

## Static Public Member Functions

static void | initProcessors (int argc, char *argv[])
| Initialize MPI processors. More...
static void | finalizeProcessors ()
| Finalize MPI processors. More...
static int | globalMasterNo ()
| Master processors number (globaly in MPI). More...
static bool | globalParallel ()
| Is this a parallel MPI run. More...
static const char * | globalRunTypeName ()
static bool | isInitialized ()
| Is MPI initialized? More...
static bool | isFinalized ()
| Is MPI finalized? More...
static bool | globalMaster ()
| Is this processor the master processor? More...
static int | globalSize ()
| Global size of processors. More...
static int | globalRank ()
| Rank of the processor in the global MPI. More...
static int | argc ()
static char ** | argv ()
static void | abort (int error)
| Abort MPI run or regular run. More...

## Static Private Attributes

static bool | initProcessorsCelled_ = false
| Is the static member initProcessors is called. More...
static int | globalRank_ = 0
| Global rank of the current processor. More...
static int | globalSize_ = 1
| The global size of all processors. More...
static int | argc_ = 0
static char ** | argv_ = nullptr

## Detailed Description

This class holds the information about the global execution world and number of processors in communication.

Definition at line 51 of file processors.hpp.

## Constructor & Destructor Documentation

## processors()

processors | ( |  | ) |

Constructor.

Definition at line 105 of file processors.cpp.

References processors::abort(), pFlow::endl(), and fatalErrorInFunction.

Here is the call graph for this function:

## ~processors()

~processors | ( |  | ) |

Destructor.

Definition at line 119 of file processors.cpp.

## Member Function Documentation

## initProcessors()

void initProcessors | ( | int | argc,
|  | char * | argv[]
| ) |  |

static

Initialize MPI processors.

Definition at line 42 of file processors.cpp.

References processorOstream::activatePrefix(), processors::argc(), processors::argc_, processors::argv(), processors::argv_, CheckMPI, pFlow::errReport, processors::globalMaster(), processors::globalParallel(), processors::globalRank_, processors::globalSize_, processors::initProcessorsCelled_, processors::isInitialized(), pFlow::mOutput, pFlow::pOutput, masterOstream::setMasterSlave(), and processorOstream::setPrefixNum().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

## finalizeProcessors()

void finalizeProcessors | ( |  | ) |

static

Finalize MPI processors.

Definition at line 88 of file processors.cpp.

References CheckMPI.

Referenced by main().

Here is the caller graph for this function:

## globalMasterNo()

static int globalMasterNo | ( |  | ) |

inlinestatic

Master processors number (globaly in MPI).

Definition at line 91 of file processors.hpp.

Referenced by processors::globalMaster().

Here is the caller graph for this function:

## globalParallel()

static bool globalParallel | ( |  | ) |

inlinestatic

Is this a parallel MPI run.

Definition at line 98 of file processors.hpp.

References processors::globalSize().

Referenced by processors::globalRunTypeName(), and processors::initProcessors().

Here is the call graph for this function:
Here is the caller graph for this function:

## globalRunTypeName()

static const char* globalRunTypeName | ( |  | ) |

inlinestatic

Definition at line 104 of file processors.hpp.

References processors::globalParallel().

Referenced by IOPattern::exeMode().

Here is the call graph for this function:
Here is the caller graph for this function:

## isInitialized()

bool isInitialized | ( |  | ) |

static

Is MPI initialized?

Definition at line 123 of file processors.cpp.

Referenced by processors::initProcessors().

Here is the caller graph for this function:

## isFinalized()

bool isFinalized | ( |  | ) |

static

Is MPI finalized?

Definition at line 135 of file processors.cpp.

## globalMaster()

static bool globalMaster | ( |  | ) |

inlinestatic

Is this processor the master processor?

Definition at line 125 of file processors.hpp.

References processors::globalMasterNo(), and processors::globalRank().

Referenced by processors::initProcessors().

Here is the call graph for this function:
Here is the caller graph for this function:

## globalSize()

static int globalSize | ( |  | ) |

inlinestatic

Global size of processors.

Definition at line 132 of file processors.hpp.

References processors::globalSize_.

Referenced by processors::globalParallel(), and localProcessors::localProcessors().

Here is the caller graph for this function:

## globalRank()

static int globalRank | ( |  | ) |

inlinestatic

Rank of the processor in the global MPI.

Definition at line 139 of file processors.hpp.

References processors::globalRank_.

Referenced by regularSimulationDomain::createBoundaryDicts(), processors::globalMaster(), and localProcessors::localProcessors().

Here is the caller graph for this function:

## argc()

static int argc | ( |  | ) |

inlinestatic

Definition at line 145 of file processors.hpp.

References processors::argc_.

Referenced by processors::initProcessors().

Here is the caller graph for this function:

## argv()

static char** argv | ( |  | ) |

inlinestatic

Definition at line 151 of file processors.hpp.

References processors::argv_.

Referenced by processors::initProcessors().

Here is the caller graph for this function:

## abort()

void abort | ( | int | error | ) |

static

Abort MPI run or regular run.

Definition at line 147 of file processors.cpp.

Referenced by fatalExitPhasicFlow(), and processors::processors().

Here is the caller graph for this function:

## Member Data Documentation

## initProcessorsCelled_

bool initProcessorsCelled_ = false

inlinestaticprivate

Is the static member initProcessors is called.

Definition at line 57 of file processors.hpp.

Referenced by processors::initProcessors().

## globalRank_

int globalRank_ = 0

inlinestaticprivate

Global rank of the current processor.

Definition at line 61 of file processors.hpp.

Referenced by processors::globalRank(), and processors::initProcessors().

## globalSize_

int globalSize_ = 1

inlinestaticprivate

The global size of all processors.

Definition at line 65 of file processors.hpp.

Referenced by processors::globalSize(), and processors::initProcessors().

## argc_

int argc_ = 0

inlinestaticprivate

Definition at line 68 of file processors.hpp.

Referenced by processors::argc(), and processors::initProcessors().

## argv_

char** argv_ = nullptr

inlinestaticprivate

Definition at line 71 of file processors.hpp.

Referenced by processors::argv(), and processors::initProcessors().

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

- src/phasicFlow/processors/processors.hpp
- src/phasicFlow/processors/processors.cpp