Commit 2279888f authored by peastman's avatar peastman
Browse files

Fixed uninitialized memory error when using multiple GPUs

parent 94f09d1e
......@@ -1520,6 +1520,7 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon
else
dispersionCoefficient = 0.0;
alpha = 0;
ewaldSelfEnergy = 0.0;
if (force.getNonbondedMethod() == NonbondedForce::Ewald) {
// Compute the Ewald parameters.
......@@ -1702,8 +1703,6 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon
}
}
}
else
ewaldSelfEnergy = 0.0;
// Add the interaction to the default nonbonded kernel.
......
......@@ -1492,6 +1492,7 @@ void OpenCLCalcNonbondedForceKernel::initialize(const System& system, const Nonb
else
dispersionCoefficient = 0.0;
alpha = 0;
ewaldSelfEnergy = 0.0;
if (force.getNonbondedMethod() == NonbondedForce::Ewald) {
// Compute the Ewald parameters.
......@@ -1648,8 +1649,6 @@ void OpenCLCalcNonbondedForceKernel::initialize(const System& system, const Nonb
}
}
}
else
ewaldSelfEnergy = 0.0;
// Add the interaction to the default nonbonded kernel.
......
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