PlasCom2  1.0
XPACC Multi-physics simluation application
PCPPCommUtil.H
Go to the documentation of this file.
1 #ifndef __PCPP_COMM_UTIL_H__
2 #define __PCPP_COMM_UTIL_H__
3 #include "PCPPTypes.H"
4 
5 namespace pcpp {
6  namespace comm {
7 
8  void ReduceTimers(double *processTimes,unsigned int nTimes,
9  std::vector<std::vector<double> > &parallelTimes,
10  pcpp::CommunicatorType &inCommunicator);
11 
12  void ReduceCounters(long long *processTimes,unsigned int nTimes,
13  std::vector<std::vector<long long> > &parallelTimes,
14  pcpp::CommunicatorType &inCommunicator);
15 
18  int numDimensions;
19  int rank;
20 
21  std::vector<int> dimDir;
22  std::vector<int> cartDecompDirections;
23  std::vector<int> cartDecomposition;
24  std::vector<int> isPeriodic;
25  std::vector<int> topoCoords;
26  std::vector<int> neighborRanks;
27 
28  std::vector<int> cartNeighborhood;
29  std::vector<int> cartDirection;
30  };
31 
32  };
34  namespace comm {
35  int SetupCartesianTopology(pcpp::CommunicatorType &parallelCommunicator,
36  pcpp::ParallelTopologyInfoType &topologyInfo,
37  pcpp::CommunicatorType &topoCommunicator,
38  std::ostream &messageStream);
39 
40  bool CheckResult(bool &localResult,pcpp::CommunicatorType &testComm);
41 
42  };
43 
44 };
45 
46 
47 #endif
std::vector< int > cartDecompDirections
Definition: PCPPCommUtil.H:22
std::vector< int > neighborRanks
Definition: PCPPCommUtil.H:26
std::vector< int > cartDirection
Definition: PCPPCommUtil.H:29
std::vector< int > cartNeighborhood
Definition: PCPPCommUtil.H:28
bool CheckResult(bool &localResult, pcpp::CommunicatorType &testComm)
Definition: PCPPCommUtil.C:176
std::vector< int > topoCoords
Definition: PCPPCommUtil.H:25
std::vector< int > cartDecomposition
Definition: PCPPCommUtil.H:23
void ReduceTimers(double *processTimes, unsigned int nTimes, std::vector< std::vector< double > > &parallelTimes, pcpp::CommunicatorType &inCommunicator)
Definition: PCPPCommUtil.C:9
std::vector< int > isPeriodic
Definition: PCPPCommUtil.H:24
comm::paralleltopologyinfo ParallelTopologyInfoType
Definition: PCPPCommUtil.H:32
Main encapsulation of MPI.
Definition: COMM.H:62
void ReduceCounters(long long *processTimes, unsigned int nTimes, std::vector< std::vector< long long > > &parallelTimes, pcpp::CommunicatorType &inCommunicator)
int SetupCartesianTopology(pcpp::CommunicatorType &parallelCommunicator, pcpp::ParallelTopologyInfoType &topologyInfo, pcpp::CommunicatorType &topoCommunicator, std::ostream &messageStream)
Sets up a communicator with Cartesian topology.
Definition: PCPPCommUtil.C:48