/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "config.h"
#include "gromacs/ewald/pme_coordinate_receiver_gpu.h"
+#include "gromacs/utility/arrayref.h"
+#include "gromacs/utility/gmxassert.h"
-#if GMX_GPU != GMX_GPU_CUDA
+#if !GMX_GPU_CUDA
namespace gmx
{
-/*!\brief Impl class stub. */
+/*!\brief \internal Impl class stub. */
class PmeCoordinateReceiverGpu::Impl
{
};
/*!\brief Constructor stub. */
-PmeCoordinateReceiverGpu::PmeCoordinateReceiverGpu(void* /* pmeStream */,
- MPI_Comm /* comm */,
+PmeCoordinateReceiverGpu::PmeCoordinateReceiverGpu(MPI_Comm /* comm */,
+ const DeviceContext& /* deviceContext */,
gmx::ArrayRef<PpRanks> /* ppRanks */) :
impl_(nullptr)
{
- GMX_ASSERT(false,
+ GMX_ASSERT(!impl_,
"A CPU stub for PME-PP GPU communication was called instead of the correct "
"implementation.");
}
PmeCoordinateReceiverGpu::~PmeCoordinateReceiverGpu() = default;
/*!\brief init PME-PP GPU communication stub */
-void PmeCoordinateReceiverGpu::sendCoordinateBufferAddressToPpRanks(const DeviceBuffer<float> /* d_x */)
+void PmeCoordinateReceiverGpu::reinitCoordinateReceiver(DeviceBuffer<RVec> /* d_x */)
{
- GMX_ASSERT(false,
+ GMX_ASSERT(!impl_,
"A CPU stub for PME-PP GPU communication initialization was called instead of the "
"correct implementation.");
}
-void PmeCoordinateReceiverGpu::launchReceiveCoordinatesFromPpCudaDirect(int /* ppRank */)
+void PmeCoordinateReceiverGpu::receiveCoordinatesSynchronizerFromPpCudaDirect(int /* ppRank */)
{
- GMX_ASSERT(false,
+ GMX_ASSERT(!impl_,
"A CPU stub for PME-PP GPU communication was called instead of the correct "
"implementation.");
}
-void PmeCoordinateReceiverGpu::enqueueWaitReceiveCoordinatesFromPpCudaDirect()
+void PmeCoordinateReceiverGpu::launchReceiveCoordinatesFromPpCudaMpi(DeviceBuffer<RVec> /* recvbuf */,
+ int /* numAtoms */,
+ int /* numBytes */,
+ int /* ppRank */)
{
- GMX_ASSERT(false,
+ GMX_ASSERT(!impl_,
"A CPU stub for PME-PP GPU communication was called instead of the correct "
"implementation.");
}
+int PmeCoordinateReceiverGpu::synchronizeOnCoordinatesFromPpRank(int /* pipelineStage */,
+ const DeviceStream& /* deviceStream */)
+{
+ GMX_ASSERT(!impl_,
+ "A CPU stub for PME-PP GPU communication was called instead of the correct "
+ "implementation.");
+ return 0;
+}
+
+void PmeCoordinateReceiverGpu::synchronizeOnCoordinatesFromAllPpRanks(const DeviceStream& /* deviceStream */)
+{
+ GMX_ASSERT(!impl_,
+ "A CPU stub for PME-PP GPU communication was called instead of the correct "
+ "implementation.");
+}
+
+DeviceStream* PmeCoordinateReceiverGpu::ppCommStream(int /* senderIndex */)
+{
+ GMX_ASSERT(!impl_,
+ "A CPU stub for PME-PP GPU communication was called instead of the correct "
+ "implementation.");
+ return nullptr;
+}
+
+std::tuple<int, int> PmeCoordinateReceiverGpu::ppCommAtomRange(int /* senderIndex */)
+{
+ GMX_ASSERT(!impl_,
+ "A CPU stub for PME-PP GPU communication was called instead of the correct "
+ "implementation.");
+ return std::make_tuple(0, 0);
+}
+
+int PmeCoordinateReceiverGpu::ppCommNumSenderRanks()
+{
+ GMX_ASSERT(!impl_,
+ "A CPU stub for PME-PP GPU communication was called instead of the correct "
+ "implementation.");
+ return 0;
+}
+
+
} // namespace gmx
-#endif /* GMX_GPU != GMX_GPU_CUDA */
+#endif // !GMX_GPU_CUDA