#include "gromacs/gpu_utils/gpueventsynchronizer.cuh"
#include "gromacs/gpu_utils/vectype_ops.cuh"
#include "gromacs/pbcutil/ishift.h"
+#include "gromacs/utility/gmxmpi.h"
#include "domdec_internal.h"
recvRank, 0, &remoteCoordinatesReadyOnDeviceEvent, sizeof(GpuEventSynchronizer*),
MPI_BYTE, sendRank, 0, mpi_comm_mysim_, MPI_STATUS_IGNORE);
remoteCoordinatesReadyOnDeviceEvent->enqueueWaitEvent(nonLocalStream_);
+#else
+ GMX_UNUSED_VALUE(coordinatesReadyOnDeviceEvent);
#endif
}
else
#if GMX_MPI
MPI_Send(&sendBuf, sizeof(void**), MPI_BYTE, receiver.rankId, 0, comm_);
+#else
+ GMX_UNUSED_VALUE(sendBuf);
#endif
}
}
// TODO Using MPI_Isend would be more efficient, particularly when
// sending to multiple PP ranks
MPI_Send(&pmeSyncPtr, sizeof(GpuEventSynchronizer*), MPI_BYTE, ppRank, 0, comm_);
+#else
+ GMX_UNUSED_VALUE(pmeSyncPtr);
+ GMX_UNUSED_VALUE(ppRank);
#endif
}
void PmePpCommGpu::Impl::reinit(int size)
{
// This rank will access PME rank memory directly, so needs to receive the remote PME buffer addresses.
+#if GMX_MPI
MPI_Recv(&remotePmeXBuffer_, sizeof(void**), MPI_BYTE, pmeRank_, 0, comm_, MPI_STATUS_IGNORE);
MPI_Recv(&remotePmeFBuffer_, sizeof(void**), MPI_BYTE, pmeRank_, 0, comm_, MPI_STATUS_IGNORE);
// Reallocate buffer used for staging PME force on GPU
reallocateDeviceBuffer(&d_pmeForces_, size, &d_pmeForcesSize_, &d_pmeForcesSizeAlloc_, nullptr);
-
+#else
+ GMX_UNUSED_VALUE(size);
+#endif
return;
}
// launchRecvForceFromPmeCudaDirect() and sycnRecvForceFromPmeCudaDirect()
void PmePpCommGpu::Impl::receiveForceFromPmeCudaDirect(void* recvPtr, int recvSize, bool receivePmeForceToGpu)
{
-
+#if GMX_MPI
// Receive event from PME task and add to stream, to ensure pull of data doesn't
// occur before PME force calc is completed
GpuEventSynchronizer* pmeSync;
// them with other forces on the CPU
cudaStreamSynchronize(pmePpCommStream_);
}
+#else
+ GMX_UNUSED_VALUE(recvPtr);
+ GMX_UNUSED_VALUE(recvSize);
+ GMX_UNUSED_VALUE(receivePmeForceToGpu);
+#endif
}
void PmePpCommGpu::Impl::sendCoordinatesToPmeCudaDirect(void* sendPtr,
bool gmx_unused sendPmeCoordinatesFromGpu,
GpuEventSynchronizer* coordinatesReadyOnDeviceEvent)
{
-
+#if GMX_MPI
// ensure stream waits until coordinate data is available on device
coordinatesReadyOnDeviceEvent->enqueueWaitEvent(pmePpCommStream_);
pmeCoordinatesSynchronizer_.markEvent(pmePpCommStream_);
GpuEventSynchronizer* pmeSync = &pmeCoordinatesSynchronizer_;
MPI_Send(&pmeSync, sizeof(GpuEventSynchronizer*), MPI_BYTE, pmeRank_, 0, comm_);
+#else
+ GMX_UNUSED_VALUE(sendPtr);
+ GMX_UNUSED_VALUE(sendSize);
+ GMX_UNUSED_VALUE(sendPmeCoordinatesFromGpu);
+ GMX_UNUSED_VALUE(coordinatesReadyOnDeviceEvent);
+#endif
}
void* PmePpCommGpu::Impl::getGpuForceStagingPtr()
{