11#ifndef _CRTREECOMMUNICATOR_H_
12#define _CRTREECOMMUNICATOR_H_
17#include "../Definitions.H"
18#include "../Core/FieldQty.H"
19#include "../Utils/RealTensor2.H"
20#include "../Utils/RngThread.H"
21#include "../Utils/Types.H"
22#include "../Utils/Vec3.H"
102 const std::vector<bool>& defer,
103 const std::vector<int>& rank,
107 const std::vector<FieldQty>& qMin);
149 return std::pair<MPIUtil::fillRequest*, int>(
nullptr, -1);
153 return std::pair<MPIUtil::fillRequest*, int>(req, rank);
184 std::vector<std::vector<MPIUtil::fillRequest> >
189 std::vector<std::list<std::vector<MPIUtil::fillResponse> > >
191 std::vector<std::vector<MPI_Request> >
195 std::vector<MPIUtil::fillRequest>
202 std::vector<MPIUtil::fillResponse>
Global constants and functions to handle MPI processing.
Class to manage communications during tree walks.
Definition CRTreeCommunicator.H:48
std::vector< MPIUtil::fillRequest > inReqBuf
Definition CRTreeCommunicator.H:196
std::vector< MPI_Request > doneSendHandle
Definition CRTreeCommunicator.H:176
std::vector< int > inReqRank
Definition CRTreeCommunicator.H:197
MPIUtil::fillResponse * getFillResponse()
Retrieve responses that are ready to process.
Definition CRTreeCommunicator.H:160
IdxType inRespWritePtr
Definition CRTreeCommunicator.H:204
const CRTree * tree
Definition CRTreeCommunicator.H:170
void recv()
Receive incoming messages.
Definition CRTreeCommunicator.cpp:204
std::pair< MPIUtil::fillRequest *, int > getFillRequest()
Retrieve the next fill request to process.
Definition CRTreeCommunicator.H:147
std::vector< omp_lock_t > outReqBufLock
Definition CRTreeCommunicator.H:212
void sendRequests()
Send all requests from the outgoing request buffers.
Definition CRTreeCommunicator.cpp:259
void finalizeCycle()
Finalize a communication cycle.
Definition CRTreeCommunicator.cpp:75
IdxType inReqPtr
Definition CRTreeCommunicator.H:199
bool allDone()
Report if all work on all ranks is done.
Definition CRTreeCommunicator.cpp:87
void initCycle()
Initialize a communication cycle.
Definition CRTreeCommunicator.cpp:47
std::vector< std::vector< MPIUtil::fillRequest > > outReqBuf
Definition CRTreeCommunicator.H:185
std::vector< MPIUtil::fillResponse > inRespBuf
Definition CRTreeCommunicator.H:203
void registerRequest(const IdxType &start, const IdxType &count, const std::vector< bool > &defer, const std::vector< int > &rank, const RealTensor2 &h2Inv, const RealTensor2 &h2InvGrad, const Real &hScale, const std::vector< FieldQty > &qMin)
Register an MPI request for a deferred leaf.
Definition CRTreeCommunicator.cpp:147
void registerResponse(const int &rank, const MPIUtil::fillResponse &resp)
Register a response to an MPI request from a remote rank.
Definition CRTreeCommunicator.cpp:188
std::vector< omp_lock_t > outRespBufLock
Definition CRTreeCommunicator.H:214
std::vector< std::list< std::vector< MPIUtil::fillResponse > > > outRespBuf
Definition CRTreeCommunicator.H:190
void sendResponses()
Send responses to requests from other ranks.
Definition CRTreeCommunicator.cpp:287
IdxType inRespProcPtr
Definition CRTreeCommunicator.H:207
std::vector< int > rankDone
Definition CRTreeCommunicator.H:171
~CRTreeCommunicator()
Destructor.
Definition CRTreeCommunicator.cpp:32
std::vector< MPI_Request > outReqHandle
Definition CRTreeCommunicator.H:186
std::vector< MPI_Request > doneRecvHandle
Definition CRTreeCommunicator.H:179
std::vector< std::vector< MPI_Request > > outRespHandle
Definition CRTreeCommunicator.H:192
A class to manage CR packets and sources.
Definition CRTree.H:44
Class that represents a rank 2 tensor.
Definition RealTensor2.H:34
The primary namespace for criptic objects.
Definition AdvancePacket.H:25
std::vector< Real >::size_type IdxType
Definition Types.H:45
double Real
Definition Types.H:38
Struture to hold data representing a search request.
Definition MPIUtil.H:135
Struture to hold data representing a response to a request.
Definition MPIUtil.H:162