22#ifndef dftfeMPICommunicatorP2P_h
23#define dftfeMPICommunicatorP2P_h
31#ifdef DFTFE_WITH_DEVICE
33# if defined(DFTFE_WITH_CUDA_NCCL)
35# elif defined(DFTFE_WITH_HIP_RCCL)
61 template <
typename ValueType, MemorySpace memorySpace>
112 std::shared_ptr<const MPIPatternP2P<memorySpace>>
150#ifdef DFTFE_WITH_DEVICE
151 std::shared_ptr<MemoryStorage<ValueType, MemorySpace::HOST_PINNED>>
152 d_ghostDataCopyHostPinnedPtr;
154 std::shared_ptr<MemoryStorage<ValueType, MemorySpace::HOST_PINNED>>
155 d_sendRecvBufferHostPinnedPtr;
160 d_ghostDataCopySinglePrecHostPinnedPtr;
165 d_sendRecvBufferSinglePrecHostPinnedPtr;
170 d_ghostDataCopyHalfPrecHostPinnedPtr;
175 d_sendRecvBufferHalfPrecHostPinnedPtr;
Definition MemoryStorage.h:33
void accumulateInsertLocallyOwnedBegin(MemoryStorage< ValueType, memorySpace > &dataArray, const dftfe::uInt communicationChannel=0)
MemoryStorage< typename dftfe::dataTypes::singlePrecType< ValueType >::type, memorySpace > d_ghostDataCopySinglePrec
Definition MPICommunicatorP2P.h:140
MemoryStorage< typename dftfe::dataTypes::halfPrecType< ValueType >::type, memorySpace > d_sendRecvBufferHalfPrec
Definition MPICommunicatorP2P.h:144
std::shared_ptr< const MPIPatternP2P< memorySpace > > getMPIPatternP2P() const
void accumulateAddLocallyOwnedEnd(MemoryStorage< ValueType, memorySpace > &dataArray)
MemoryStorage< ValueType, memorySpace > d_sendRecvBuffer
Definition MPICommunicatorP2P.h:130
dftfe::uInt d_blockSize
Definition MPICommunicatorP2P.h:124
void updateGhostValues(MemoryStorage< ValueType, memorySpace > &dataArray, const dftfe::uInt communicationChannel=0)
void setCommunicationPrecision(communicationPrecision precision)
std::vector< MPI_Request > d_requestsAccumulateAddLocallyOwned
Definition MPICommunicatorP2P.h:180
MPICommunicatorP2P(std::shared_ptr< const MPIPatternP2P< memorySpace > > mpiPatternP2P, const dftfe::uInt blockSize)
MPI_Comm d_mpiCommunicator
Definition MPICommunicatorP2P.h:182
dftfe::uInt d_locallyOwnedSize
Definition MPICommunicatorP2P.h:126
std::shared_ptr< const MPIPatternP2P< memorySpace > > d_mpiPatternP2P
Definition MPICommunicatorP2P.h:122
std::vector< MPI_Request > d_requestsUpdateGhostValues
Definition MPICommunicatorP2P.h:179
void accumulateInsertLocallyOwned(MemoryStorage< ValueType, memorySpace > &dataArray, const dftfe::uInt communicationChannel=0)
MemoryStorage< typename dftfe::dataTypes::singlePrecType< ValueType >::type, memorySpace > d_sendRecvBufferSinglePrec
Definition MPICommunicatorP2P.h:135
MemoryStorage< typename dftfe::dataTypes::halfPrecType< ValueType >::type, memorySpace > d_ghostDataCopyHalfPrec
Definition MPICommunicatorP2P.h:148
dftfe::Int getBlockSize() const
void updateGhostValuesBegin(MemoryStorage< ValueType, memorySpace > &dataArray, const dftfe::uInt communicationChannel=0)
void accumulateAddLocallyOwnedBegin(MemoryStorage< ValueType, memorySpace > &dataArray, const dftfe::uInt communicationChannel=0)
void accumulateAddLocallyOwned(MemoryStorage< ValueType, memorySpace > &dataArray, const dftfe::uInt communicationChannel=0)
communicationProtocol d_commProtocol
Definition MPICommunicatorP2P.h:184
std::vector< MPI_Request > d_requestsAccumulateInsertLocallyOwned
Definition MPICommunicatorP2P.h:181
void accumulateInsertLocallyOwnedEnd(MemoryStorage< ValueType, memorySpace > &dataArray)
void updateGhostValuesEnd(MemoryStorage< ValueType, memorySpace > &dataArray)
communicationPrecision d_commPrecision
Definition MPICommunicatorP2P.h:185
dftfe::uInt d_ghostSize
Definition MPICommunicatorP2P.h:128
A class template to store the communication pattern (i.e., which entries/nodes to receive from which ...
Definition MPIPatternP2P.h:57
Definition MPICommunicatorP2P.h:46
communicationPrecision
Definition MPICommunicatorP2P.h:55
@ half
Definition MPICommunicatorP2P.h:56
@ standard
Definition MPICommunicatorP2P.h:58
@ single
Definition MPICommunicatorP2P.h:57
communicationProtocol
Definition MPICommunicatorP2P.h:48
@ nccl
Definition MPICommunicatorP2P.h:51
@ mpiDevice
Definition MPICommunicatorP2P.h:50
@ mpiHost
Definition MPICommunicatorP2P.h:49
@ HOST_PINNED
Definition MemorySpaceType.h:35
Definition pseudoPotentialToDftfeConverter.cc:34
std::uint32_t uInt
Definition TypeConfig.h:10
std::int32_t Int
Definition TypeConfig.h:11
T type
Definition dftfeDataTypes.h:130
T type
Definition dftfeDataTypes.h:112