Gromacs  2021.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Member Functions
gmx::PmePpCommGpu Class Reference

#include <gromacs/ewald/pme_pp_comm_gpu.h>


Manages communication related to GPU buffers between this PME rank and its PP rank.


class  Impl
 Class with interfaces and data for CUDA version of PME-PP Communication. More...

Public Member Functions

 PmePpCommGpu (MPI_Comm comm, int pmeRank, 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 receiveForceFromPmeCudaDirect (void *recvPtr, int recvSize, bool recvPmeForceToGpu)
 Pull data from PME GPU directly using CUDA Memory copy. More...
void sendCoordinatesToPmeCudaDirect (void *sendPtr, int sendSize, bool sendPmeCoordinatesFromGpu, GpuEventSynchronizer *coordinatesReadyOnDeviceEvent)
 Push coordinates buffer directly to GPU memory on PME task. More...
void * getGpuForceStagingPtr ()
 Return pointer to buffer used for staging PME force on GPU.
GpuEventSynchronizer * getForcesReadySynchronizer ()
 Return pointer to event recorded when forces are ready.

Constructor & Destructor Documentation

gmx::PmePpCommGpu::PmePpCommGpu ( MPI_Comm  comm,
int  pmeRank,
const DeviceContext &  deviceContext,
const DeviceStream deviceStream 

Creates PME-PP GPU communication object.

Constructor stub.

[in]commCommunicator used for simulation
[in]pmeRankRank of PME task
[in]deviceContextGPU context.
[in]deviceStreamGPU stream.

Member Function Documentation

void gmx::PmePpCommGpu::receiveForceFromPmeCudaDirect ( void *  recvPtr,
int  recvSize,
bool  recvPmeForceToGpu 

Pull data from PME GPU directly using CUDA Memory copy.

[out]recvPtrBuffer to receive PME force data
[in]recvSizeNumber of elements to receive
[in]recvPmeForceToGpuWhether 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]sizeNumber of elements in buffer
void gmx::PmePpCommGpu::sendCoordinatesToPmeCudaDirect ( void *  sendPtr,
int  sendSize,
bool  sendPmeCoordinatesFromGpu,
GpuEventSynchronizer *  coordinatesReadyOnDeviceEvent 

Push coordinates buffer directly to GPU memory on PME task.

[in]sendPtrBuffer with coordinate data
[in]sendSizeNumber of elements to send
[in]sendPmeCoordinatesFromGpuWhether send is from GPU, otherwise CPU
[in]coordinatesReadyOnDeviceEventEvent recorded when coordinates are available on device

The documentation for this class was generated from the following files: