Gromacs
2022.2
|
#include <gromacs/ewald/pme_pp_comm_gpu.h>
Manages communication related to GPU buffers between this PME rank and its PP rank.
Classes | |
class | Impl |
Class with interfaces and data for CUDA version of PME-PP Communication. More... | |
Public Member Functions | |
PmePpCommGpu (MPI_Comm comm, int pmeRank, gmx::HostVector< gmx::RVec > *pmeCpuForceBuffer, const DeviceContext &deviceContext, const DeviceStream &deviceStream) | |
Creates PME-PP GPU communication object. More... | |
void | reinit (int size) |
Perform steps required when buffer size changes. More... | |
void | receiveForceFromPme (RVec *recvPtr, int recvSize, bool recvPmeForceToGpu) |
Pull data from PME GPU directly using CUDA Memory copy. More... | |
void | sendCoordinatesToPmeFromGpu (DeviceBuffer< RVec > sendPtr, int sendSize, GpuEventSynchronizer *coordinatesReadyOnDeviceEvent) |
Push coordinates buffer directly to GPU memory on PME task. More... | |
void | sendCoordinatesToPmeFromCpu (RVec *sendPtr, int sendSize, GpuEventSynchronizer *coordinatesReadyOnDeviceEvent) |
Push coordinates buffer from host memory directly to GPU memory on PME task. More... | |
DeviceBuffer< gmx::RVec > | getGpuForceStagingPtr () |
Return pointer to buffer used for staging PME force on GPU. | |
GpuEventSynchronizer * | getForcesReadySynchronizer () |
Return pointer to event recorded when forces are ready. | |
gmx::PmePpCommGpu::PmePpCommGpu | ( | MPI_Comm | comm, |
int | pmeRank, | ||
gmx::HostVector< gmx::RVec > * | pmeCpuForceBuffer, | ||
const DeviceContext & | deviceContext, | ||
const DeviceStream & | deviceStream | ||
) |
Creates PME-PP GPU communication object.
Constructor stub.
[in] | comm | Communicator used for simulation |
[in] | pmeRank | Rank of PME task |
[in] | pmeCpuForceBuffer | Buffer for PME force in CPU memory |
[in] | deviceContext | GPU context. |
[in] | deviceStream | GPU stream. |
void gmx::PmePpCommGpu::receiveForceFromPme | ( | RVec * | recvPtr, |
int | recvSize, | ||
bool | recvPmeForceToGpu | ||
) |
Pull data from PME GPU directly using CUDA Memory copy.
[out] | recvPtr | Buffer to receive PME force data |
[in] | recvSize | Number of elements to receive |
[in] | recvPmeForceToGpu | Whether receive is to GPU, otherwise CPU |
void gmx::PmePpCommGpu::reinit | ( | int | size | ) |
Perform steps required when buffer size changes.
init PME-PP GPU communication stub
[in] | size | Number of elements in buffer |
void gmx::PmePpCommGpu::sendCoordinatesToPmeFromCpu | ( | RVec * | sendPtr, |
int | sendSize, | ||
GpuEventSynchronizer * | coordinatesReadyOnDeviceEvent | ||
) |
Push coordinates buffer from host memory directly to GPU memory on PME task.
[in] | sendPtr | Buffer with coordinate data |
[in] | sendSize | Number of elements to send |
[in] | coordinatesReadyOnDeviceEvent | Event recorded when coordinates are available on device |
void gmx::PmePpCommGpu::sendCoordinatesToPmeFromGpu | ( | DeviceBuffer< RVec > | sendPtr, |
int | sendSize, | ||
GpuEventSynchronizer * | coordinatesReadyOnDeviceEvent | ||
) |
Push coordinates buffer directly to GPU memory on PME task.
[in] | sendPtr | Buffer with coordinate data |
[in] | sendSize | Number of elements to send |
[in] | coordinatesReadyOnDeviceEvent | Event recorded when coordinates are available on device |