"wrappers/python/vscode:/vscode.git/clone" did not exist on "1cf4277422dadd5b31ad4aa0d577b6ae4c4c59df"
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 ...@@ -1520,6 +1520,7 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon
else else
dispersionCoefficient = 0.0; dispersionCoefficient = 0.0;
alpha = 0; alpha = 0;
ewaldSelfEnergy = 0.0;
if (force.getNonbondedMethod() == NonbondedForce::Ewald) { if (force.getNonbondedMethod() == NonbondedForce::Ewald) {
// Compute the Ewald parameters. // Compute the Ewald parameters.
...@@ -1702,8 +1703,6 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon ...@@ -1702,8 +1703,6 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon
} }
} }
} }
else
ewaldSelfEnergy = 0.0;
// Add the interaction to the default nonbonded kernel. // Add the interaction to the default nonbonded kernel.
......
...@@ -1492,6 +1492,7 @@ void OpenCLCalcNonbondedForceKernel::initialize(const System& system, const Nonb ...@@ -1492,6 +1492,7 @@ void OpenCLCalcNonbondedForceKernel::initialize(const System& system, const Nonb
else else
dispersionCoefficient = 0.0; dispersionCoefficient = 0.0;
alpha = 0; alpha = 0;
ewaldSelfEnergy = 0.0;
if (force.getNonbondedMethod() == NonbondedForce::Ewald) { if (force.getNonbondedMethod() == NonbondedForce::Ewald) {
// Compute the Ewald parameters. // Compute the Ewald parameters.
...@@ -1648,8 +1649,6 @@ void OpenCLCalcNonbondedForceKernel::initialize(const System& system, const Nonb ...@@ -1648,8 +1649,6 @@ void OpenCLCalcNonbondedForceKernel::initialize(const System& system, const Nonb
} }
} }
} }
else
ewaldSelfEnergy = 0.0;
// Add the interaction to the default nonbonded kernel. // 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