22#ifndef dftfeMPIPatternP2P_h
23#define dftfeMPIPatternP2P_h
55 template <dftfe::utils::MemorySpace memorySpace>
97 MPIPatternP2P(
const std::pair<global_size_type, global_size_type>
99 const std::vector<dftfe::global_size_type> &ghostIndices,
100 const MPI_Comm & mpiComm);
125 std::pair<global_size_type, global_size_type>
146 const std::vector<global_size_type> &
149 const std::vector<size_type> &
152 const std::vector<size_type> &
161 const std::vector<size_type> &
164 const std::vector<size_type> &
167 const std::vector<size_type> &
Definition MemoryStorage.h:33
Definition OptimizedIndexSet.h:44
SizeTypeVector getOwnedLocalIndices(const size_type procId) const
Definition MPIPatternP2P.t.cc:790
size_type globalToLocal(const global_size_type globalId) const
Definition MPIPatternP2P.t.cc:899
const std::vector< size_type > & getGhostLocalIndicesRanges() const
Definition MPIPatternP2P.t.cc:672
size_type getNumGhostIndicesInProc(const size_type procId) const
Definition MPIPatternP2P.t.cc:679
MPIPatternP2P(const std::pair< global_size_type, global_size_type > &locallyOwnedRange, const std::vector< dftfe::global_size_type > &ghostIndices, const MPI_Comm &mpiComm)
Constructor. This constructor is the typical way of creation of an MPI pattern.
Definition MPIPatternP2P.t.cc:245
global_size_type localToGlobal(const size_type localId) const
Definition MPIPatternP2P.t.cc:872
virtual ~MPIPatternP2P()=default
size_type d_numTargetProcs
Definition MPIPatternP2P.h:326
size_type getNumOwnedIndicesForTargetProc(const size_type procId) const
Definition MPIPatternP2P.t.cc:762
utils::MemoryStorage< global_size_type, memorySpace > GlobalSizeTypeVector
Definition MPIPatternP2P.h:63
utils::MemoryStorage< size_type, memorySpace > SizeTypeVector
Definition MPIPatternP2P.h:62
size_type thisProcessId() const
Definition MPIPatternP2P.t.cc:843
SizeTypeVector d_flattenedLocalTargetIndices
Definition MPIPatternP2P.h:363
OptimizedIndexSet< global_size_type > d_ghostIndicesOptimizedIndexSet
Definition MPIPatternP2P.h:242
int d_myRank
Rank of the current processor.
Definition MPIPatternP2P.h:369
SizeTypeVector getGhostLocalIndices(const size_type procId) const
Definition MPIPatternP2P.t.cc:706
int d_nprocs
Number of processors in the MPI Communicator.
Definition MPIPatternP2P.h:366
const std::vector< size_type > & getGhostProcIds() const
Definition MPIPatternP2P.t.cc:657
std::pair< global_size_type, global_size_type > getLocallyOwnedRange() const
Definition MPIPatternP2P.t.cc:643
std::set< global_size_type > d_ghostIndicesSetSTL
Definition MPIPatternP2P.h:234
const SizeTypeVector & getOwnedLocalIndicesForTargetProcs() const
Definition MPIPatternP2P.t.cc:755
size_type localOwnedSize() const
Definition MPIPatternP2P.t.cc:857
size_type d_numGhostProcs
Definition MPIPatternP2P.h:249
global_size_type d_nGlobalIndices
Definition MPIPatternP2P.h:374
const std::vector< size_type > & getTargetProcIds() const
Definition MPIPatternP2P.t.cc:741
const std::vector< size_type > & getNumOwnedIndicesForTargetProcs() const
Definition MPIPatternP2P.t.cc:748
size_type d_numGhostIndices
Definition MPIPatternP2P.h:223
bool isCompatible(const MPIPatternP2P< memorySpace > &rhs) const
Definition MPIPatternP2P.t.cc:949
SizeTypeVector d_flattenedLocalGhostIndices
Definition MPIPatternP2P.h:297
std::vector< size_type > d_targetProcIds
Definition MPIPatternP2P.h:333
std::vector< global_size_type > d_allOwnedRanges
Definition MPIPatternP2P.h:213
global_size_type nGlobalIndices() const
Definition MPIPatternP2P.t.cc:850
std::vector< size_type > d_numGhostIndicesInGhostProcs
Definition MPIPatternP2P.h:261
std::pair< global_size_type, global_size_type > d_locallyOwnedRange
Definition MPIPatternP2P.h:202
const std::vector< size_type > & getNumGhostIndicesInProcs() const
Definition MPIPatternP2P.t.cc:664
size_type nmpiProcesses() const
Definition MPIPatternP2P.t.cc:836
bool inLocallyOwnedRange(const global_size_type globalId) const
Definition MPIPatternP2P.t.cc:929
bool isGhostEntry(const global_size_type globalId) const
Definition MPIPatternP2P.t.cc:938
size_type localGhostSize() const
Definition MPIPatternP2P.t.cc:864
const MPI_Comm & mpiCommunicator() const
Definition MPIPatternP2P.t.cc:829
std::vector< size_type > d_numOwnedIndicesForTargetProcs
Definition MPIPatternP2P.h:341
std::vector< global_size_type > d_ghostIndices
Definition MPIPatternP2P.h:229
size_type d_numLocallyOwnedIndices
Definition MPIPatternP2P.h:218
std::vector< size_type > d_ghostProcIds
Definition MPIPatternP2P.h:255
std::vector< size_type > d_localGhostIndicesRanges
A vector of size 2 times the number of ghost processors to store the range of local ghost indices tha...
Definition MPIPatternP2P.h:319
MPI_Comm d_mpiComm
MPI Communicator object.
Definition MPIPatternP2P.h:377
const std::vector< global_size_type > & getGhostIndices() const
Definition MPIPatternP2P.t.cc:650
Definition MPICommunicatorP2P.h:46
Definition pseudoPotentialToDftfeConverter.cc:34
unsigned int size_type
Definition TypeConfig.h:6
unsigned long int global_size_type
Definition TypeConfig.h:7