Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
29256dfe
Commit
29256dfe
authored
Apr 15, 2013
by
Yutong Zhao
Browse files
Fixes a race condition in buffer status in findBlocksWithInteractions()
parent
cbc21173
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
platforms/cuda/src/kernels/findInteractingBlocks.cu
platforms/cuda/src/kernels/findInteractingBlocks.cu
+1
-1
platforms/opencl/src/kernels/findInteractingBlocks.cl
platforms/opencl/src/kernels/findInteractingBlocks.cl
+1
-1
No files found.
platforms/cuda/src/kernels/findInteractingBlocks.cu
View file @
29256dfe
...
@@ -343,8 +343,8 @@ extern "C" __global__ void findBlocksWithInteractions(real4 periodicBoxSize, rea
...
@@ -343,8 +343,8 @@ extern "C" __global__ void findBlocksWithInteractions(real4 periodicBoxSize, rea
valuesInBuffer
=
0
;
valuesInBuffer
=
0
;
if
(
threadIdx
.
x
==
0
)
if
(
threadIdx
.
x
==
0
)
bufferFull
=
false
;
bufferFull
=
false
;
__syncthreads
();
}
}
__syncthreads
();
}
}
storeInteractionData
(
x
,
buffer
,
sum
,
temp
,
atoms
,
numAtoms
,
globalIndex
,
interactionCount
,
interactingTiles
,
interactingAtoms
,
periodicBoxSize
,
invPeriodicBoxSize
,
posq
,
posBuffer
,
blockCenterX
,
blockSizeX
,
maxTiles
,
true
);
storeInteractionData
(
x
,
buffer
,
sum
,
temp
,
atoms
,
numAtoms
,
globalIndex
,
interactionCount
,
interactingTiles
,
interactingAtoms
,
periodicBoxSize
,
invPeriodicBoxSize
,
posq
,
posBuffer
,
blockCenterX
,
blockSizeX
,
maxTiles
,
true
);
}
}
...
...
platforms/opencl/src/kernels/findInteractingBlocks.cl
View file @
29256dfe
...
@@ -320,8 +320,8 @@ __kernel void findBlocksWithInteractions(real4 periodicBoxSize, real4 invPeriodi
...
@@ -320,8 +320,8 @@ __kernel void findBlocksWithInteractions(real4 periodicBoxSize, real4 invPeriodi
valuesInBuffer
=
0
;
valuesInBuffer
=
0
;
if
(
get_local_id
(
0
)
==
0
)
if
(
get_local_id
(
0
)
==
0
)
bufferFull
=
false
;
bufferFull
=
false
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
}
}
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
}
}
storeInteractionData
(
x,
buffer,
sum,
temp,
atoms,
&numAtoms,
&globalIndex,
interactionCount,
interactingTiles,
interactingAtoms,
periodicBoxSize,
invPeriodicBoxSize,
posq,
posBuffer,
blockCenterX,
blockSizeX,
maxTiles,
true
)
;
storeInteractionData
(
x,
buffer,
sum,
temp,
atoms,
&numAtoms,
&globalIndex,
interactionCount,
interactingTiles,
interactingAtoms,
periodicBoxSize,
invPeriodicBoxSize,
posq,
posBuffer,
blockCenterX,
blockSizeX,
maxTiles,
true
)
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment