"ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "9eb00769b406be53c7c68719b377acaef6e12b48"
Commit 0c661886 authored by peastman's avatar peastman
Browse files

Merge pull request #107 from peastman/master

Various bug fixes
parents af408590 d74c8d0c
...@@ -2144,7 +2144,7 @@ void CudaCalcCustomNonbondedForceKernel::initInteractionGroups(const CustomNonbo ...@@ -2144,7 +2144,7 @@ void CudaCalcCustomNonbondedForceKernel::initInteractionGroups(const CustomNonbo
} }
vector<int>& atoms1 = atomLists[tiles[tile].first]; vector<int>& atoms1 = atomLists[tiles[tile].first];
vector<int>& atoms2 = atomLists[tiles[tile].second]; vector<int>& atoms2 = atomLists[tiles[tile].second];
vector<int> flags(atoms1.size(), (1L<<atoms2.size())-1); vector<int> flags(atoms1.size(), (int) (1LL<<atoms2.size())-1);
int numExcluded = 0; int numExcluded = 0;
for (int i = 0; i < (int) atoms1.size(); i++) for (int i = 0; i < (int) atoms1.size(); i++)
for (int j = 0; j < (int) atoms2.size(); j++) { for (int j = 0; j < (int) atoms2.size(); j++) {
......
...@@ -2155,7 +2155,7 @@ void OpenCLCalcCustomNonbondedForceKernel::initInteractionGroups(const CustomNon ...@@ -2155,7 +2155,7 @@ void OpenCLCalcCustomNonbondedForceKernel::initInteractionGroups(const CustomNon
} }
vector<int>& atoms1 = atomLists[tiles[tile].first]; vector<int>& atoms1 = atomLists[tiles[tile].first];
vector<int>& atoms2 = atomLists[tiles[tile].second]; vector<int>& atoms2 = atomLists[tiles[tile].second];
vector<int> flags(atoms1.size(), (1L<<atoms2.size())-1); vector<int> flags(atoms1.size(), (int) (1LL<<atoms2.size())-1);
int numExcluded = 0; int numExcluded = 0;
for (int i = 0; i < (int) atoms1.size(); i++) for (int i = 0; i < (int) atoms1.size(); i++)
for (int j = 0; j < (int) atoms2.size(); j++) { for (int j = 0; j < (int) atoms2.size(); j++) {
......
...@@ -406,6 +406,7 @@ void CudaIntegrateDrudeSCFStepKernel::execute(ContextImpl& context, const DrudeS ...@@ -406,6 +406,7 @@ void CudaIntegrateDrudeSCFStepKernel::execute(ContextImpl& context, const DrudeS
cu.setAsCurrent(); cu.setAsCurrent();
CudaIntegrationUtilities& integration = cu.getIntegrationUtilities(); CudaIntegrationUtilities& integration = cu.getIntegrationUtilities();
int numAtoms = cu.getNumAtoms(); int numAtoms = cu.getNumAtoms();
int paddedNumAtoms = cu.getPaddedNumAtoms();
double dt = integrator.getStepSize(); double dt = integrator.getStepSize();
if (dt != prevStepSize) { if (dt != prevStepSize) {
if (cu.getUseDoublePrecision() || cu.getUseMixedPrecision()) { if (cu.getUseDoublePrecision() || cu.getUseMixedPrecision()) {
...@@ -424,7 +425,7 @@ void CudaIntegrateDrudeSCFStepKernel::execute(ContextImpl& context, const DrudeS ...@@ -424,7 +425,7 @@ void CudaIntegrateDrudeSCFStepKernel::execute(ContextImpl& context, const DrudeS
// Call the first integration kernel. // Call the first integration kernel.
CUdeviceptr posCorrection = (cu.getUseMixedPrecision() ? cu.getPosqCorrection().getDevicePointer() : 0); CUdeviceptr posCorrection = (cu.getUseMixedPrecision() ? cu.getPosqCorrection().getDevicePointer() : 0);
void* args1[] = {&cu.getIntegrationUtilities().getStepSize().getDevicePointer(), &cu.getPosq().getDevicePointer(), &posCorrection, void* args1[] = {&numAtoms, &paddedNumAtoms, &cu.getIntegrationUtilities().getStepSize().getDevicePointer(), &cu.getPosq().getDevicePointer(), &posCorrection,
&cu.getVelm().getDevicePointer(), &cu.getForce().getDevicePointer(), &integration.getPosDelta().getDevicePointer()}; &cu.getVelm().getDevicePointer(), &cu.getForce().getDevicePointer(), &integration.getPosDelta().getDevicePointer()};
cu.executeKernel(kernel1, args1, numAtoms); cu.executeKernel(kernel1, args1, numAtoms);
...@@ -434,7 +435,7 @@ void CudaIntegrateDrudeSCFStepKernel::execute(ContextImpl& context, const DrudeS ...@@ -434,7 +435,7 @@ void CudaIntegrateDrudeSCFStepKernel::execute(ContextImpl& context, const DrudeS
// Call the second integration kernel. // Call the second integration kernel.
void* args2[] = {&cu.getIntegrationUtilities().getStepSize().getDevicePointer(), &cu.getPosq().getDevicePointer(), &posCorrection, void* args2[] = {&numAtoms, &cu.getIntegrationUtilities().getStepSize().getDevicePointer(), &cu.getPosq().getDevicePointer(), &posCorrection,
&cu.getVelm().getDevicePointer(), &integration.getPosDelta().getDevicePointer()}; &cu.getVelm().getDevicePointer(), &integration.getPosDelta().getDevicePointer()};
cu.executeKernel(kernel2, args2, numAtoms); cu.executeKernel(kernel2, args2, numAtoms);
......
...@@ -391,7 +391,7 @@ void testContractions() { ...@@ -391,7 +391,7 @@ void testContractions() {
map<int, int> contractions; map<int, int> contractions;
contractions[1] = 3; contractions[1] = 3;
contractions[2] = 1; contractions[2] = 1;
RPMDIntegrator integ(numCopies, temperature, 10.0, 0.001, contractions); RPMDIntegrator integ(numCopies, temperature, 50.0, 0.001, contractions);
Platform& platform = Platform::getPlatformByName("CUDA"); Platform& platform = Platform::getPlatformByName("CUDA");
Context context(system, integ, platform); Context context(system, integ, platform);
for (int copy = 0; copy < numCopies; copy++) { for (int copy = 0; copy < numCopies; copy++) {
......
...@@ -392,7 +392,7 @@ void testContractions() { ...@@ -392,7 +392,7 @@ void testContractions() {
map<int, int> contractions; map<int, int> contractions;
contractions[1] = 3; contractions[1] = 3;
contractions[2] = 1; contractions[2] = 1;
RPMDIntegrator integ(numCopies, temperature, 10.0, 0.001, contractions); RPMDIntegrator integ(numCopies, temperature, 50.0, 0.001, contractions);
Platform& platform = Platform::getPlatformByName("OpenCL"); Platform& platform = Platform::getPlatformByName("OpenCL");
Context context(system, integ, platform); Context context(system, integ, platform);
for (int copy = 0; copy < numCopies; copy++) { for (int copy = 0; copy < numCopies; copy++) {
......
...@@ -273,7 +273,7 @@ void testContractions() { ...@@ -273,7 +273,7 @@ void testContractions() {
map<int, int> contractions; map<int, int> contractions;
contractions[1] = 3; contractions[1] = 3;
contractions[2] = 1; contractions[2] = 1;
RPMDIntegrator integ(numCopies, temperature, 10.0, 0.001, contractions); RPMDIntegrator integ(numCopies, temperature, 50.0, 0.001, contractions);
Platform& platform = Platform::getPlatformByName("Reference"); Platform& platform = Platform::getPlatformByName("Reference");
Context context(system, integ, platform); Context context(system, integ, platform);
for (int copy = 0; copy < numCopies; copy++) { for (int copy = 0; copy < numCopies; copy++) {
......
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