Commit ce2cd27b authored by Peter Eastman's avatar Peter Eastman
Browse files

Bug fix when using peer-to-peer communication

parent 5e6d705e
...@@ -194,7 +194,8 @@ double CudaParallelCalcForcesAndEnergyKernel::finishComputation(ContextImpl& con ...@@ -194,7 +194,8 @@ double CudaParallelCalcForcesAndEnergyKernel::finishComputation(ContextImpl& con
// Sum the forces from all devices. // Sum the forces from all devices.
CudaContext& cu = *data.contexts[0]; CudaContext& cu = *data.contexts[0];
contextForces->upload(pinnedForceBuffer, false); if (!cu.getPlatformData().peerAccessSupported)
contextForces->upload(pinnedForceBuffer, false);
int bufferSize = 3*cu.getPaddedNumAtoms(); int bufferSize = 3*cu.getPaddedNumAtoms();
int numBuffers = data.contexts.size()-1; int numBuffers = data.contexts.size()-1;
void* args[] = {&cu.getForce().getDevicePointer(), &contextForces->getDevicePointer(), &bufferSize, &numBuffers}; void* args[] = {&cu.getForce().getDevicePointer(), &contextForces->getDevicePointer(), &bufferSize, &numBuffers};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment