Fix the post-submit failures
authorArtem Zhmurov <zhmurov@gmail.com>
Wed, 11 Mar 2020 18:38:23 +0000 (19:38 +0100)
committerArtem Zhmurov <zhmurov@gmail.com>
Wed, 11 Mar 2020 18:38:23 +0000 (19:38 +0100)
Fix warnings, introduced by 6975fbfd22030a08bbe076151a3de69894a4de2f

1. Change the order in the initialization list
2. Make use of the deviceContext_ field in PP-PME comms
3. Small fix to the comment

Change-Id: I847dbfc187a469eb89405c52b26ee1965f39c44f

src/gromacs/ewald/pme_pp_comm_gpu_impl.cu
src/gromacs/mdrun/runner.cpp

index e6e5bacd16d4f61059c4b1bbbe957cb596eb7696..91962ff947d5b96c813ae2ed1bdf29c2bb165eae 100644 (file)
@@ -57,9 +57,9 @@ namespace gmx
 {
 
 PmePpCommGpu::Impl::Impl(MPI_Comm comm, int pmeRank, const DeviceContext& deviceContext) :
+    deviceContext_(deviceContext),
     comm_(comm),
-    pmeRank_(pmeRank),
-    deviceContext_(deviceContext)
+    pmeRank_(pmeRank)
 {
     GMX_RELEASE_ASSERT(
             GMX_THREAD_MPI,
@@ -77,8 +77,7 @@ void PmePpCommGpu::Impl::reinit(int size)
     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_,
-                           DeviceContext());
+    reallocateDeviceBuffer(&d_pmeForces_, size, &d_pmeForcesSize_, &d_pmeForcesSizeAlloc_, deviceContext_);
 #else
     GMX_UNUSED_VALUE(size);
 #endif
index 081501bfff528aef8447c9dc2ec0799915b200e1..96e157ca07d0c06f863de0ec782778e6e8750ba3 100644 (file)
@@ -1141,7 +1141,7 @@ int Mdrunner::mdrunner()
             EEL_PME(inputrec->coulombtype) && thisRankHasDuty(cr, DUTY_PME));
 
     // Get the device handles for the modules, nullptr when no task is assigned.
-    // TODO: There should be only one DeviceInformation.
+    // TODO: There should be only one DeviceInformation per rank.
     DeviceInformation* nonbondedDeviceInfo = gpuTaskAssignments.initNonbondedDevice(cr);
     DeviceInformation* pmeDeviceInfo       = gpuTaskAssignments.initPmeDevice();