"platforms/cuda/vscode:/vscode.git/clone" did not exist on "b441c4a7b74fc260d1dee125e9f7ca69ff0bdfb4"
Commit 3134fbb9 authored by peastman's avatar peastman
Browse files

Bug fixes to CustomManyParticleForce

parent c2d461f5
...@@ -191,7 +191,7 @@ extern "C" __global__ void findNeighbors(real4 periodicBoxSize, real4 invPeriodi ...@@ -191,7 +191,7 @@ extern "C" __global__ void findNeighbors(real4 periodicBoxSize, real4 invPeriodi
) { ) {
__shared__ real3 positionCache[FIND_NEIGHBORS_WORKGROUP_SIZE]; __shared__ real3 positionCache[FIND_NEIGHBORS_WORKGROUP_SIZE];
int indexInWarp = threadIdx.x%32; int indexInWarp = threadIdx.x%32;
for (int atom1 = blockIdx.x*blockDim.x+threadIdx.x; atom1 < NUM_ATOMS; atom1 += blockDim.x*gridDim.x) { for (int atom1 = blockIdx.x*blockDim.x+threadIdx.x; atom1 < PADDED_NUM_ATOMS; atom1 += blockDim.x*gridDim.x) {
// Load data for this atom. Note that all threads in a warp are processing atoms from the same block. // Load data for this atom. Note that all threads in a warp are processing atoms from the same block.
real3 pos1 = trim(posq[atom1]); real3 pos1 = trim(posq[atom1]);
...@@ -240,6 +240,7 @@ extern "C" __global__ void findNeighbors(real4 periodicBoxSize, real4 invPeriodi ...@@ -240,6 +240,7 @@ extern "C" __global__ void findNeighbors(real4 periodicBoxSize, real4 invPeriodi
int included[TILE_SIZE]; int included[TILE_SIZE];
int numIncluded = 0; int numIncluded = 0;
positionCache[threadIdx.x] = trim(posq[start+indexInWarp]); positionCache[threadIdx.x] = trim(posq[start+indexInWarp]);
if (atom1 < NUM_ATOMS) {
for (int j = 0; j < 32; j++) { for (int j = 0; j < 32; j++) {
int atom2 = start+j; int atom2 = start+j;
real3 pos2 = positionCache[threadIdx.x-indexInWarp+j]; real3 pos2 = positionCache[threadIdx.x-indexInWarp+j];
...@@ -259,6 +260,7 @@ extern "C" __global__ void findNeighbors(real4 periodicBoxSize, real4 invPeriodi ...@@ -259,6 +260,7 @@ extern "C" __global__ void findNeighbors(real4 periodicBoxSize, real4 invPeriodi
if (includeAtom) if (includeAtom)
included[numIncluded++] = atom2; included[numIncluded++] = atom2;
} }
}
// If we found any neighbors, store them to the neighbor list. // If we found any neighbors, store them to the neighbor list.
......
...@@ -194,6 +194,7 @@ UNITS = { ...@@ -194,6 +194,7 @@ UNITS = {
("*", "getWeightCross") : (None, ()), ("*", "getWeightCross") : (None, ()),
("*", "getNonbondedMethod") : (None, ()), ("*", "getNonbondedMethod") : (None, ()),
("*", "getGlobalParameterDefaultValue") : (None, ()), ("*", "getGlobalParameterDefaultValue") : (None, ()),
("*", "getPermutationMode") : (None, ()),
("LocalCoordinatesSite", "getOriginWeights") : (None, ()), ("LocalCoordinatesSite", "getOriginWeights") : (None, ()),
("LocalCoordinatesSite", "getXWeights") : (None, ()), ("LocalCoordinatesSite", "getXWeights") : (None, ()),
("LocalCoordinatesSite", "getYWeights") : (None, ()), ("LocalCoordinatesSite", "getYWeights") : (None, ()),
......
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