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
673b555b
Commit
673b555b
authored
Aug 10, 2009
by
Peter Eastman
Browse files
Fixed error simulating very large systems (see bug 896)
parent
571d6625
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
platforms/cuda/src/kernels/gpu.cpp
platforms/cuda/src/kernels/gpu.cpp
+2
-0
platforms/cuda/src/kernels/kFindInteractingBlocks.h
platforms/cuda/src/kernels/kFindInteractingBlocks.h
+2
-1
No files found.
platforms/cuda/src/kernels/gpu.cpp
View file @
673b555b
...
...
@@ -1839,6 +1839,8 @@ int gpuBuildThreadBlockWorkList(gpuContext gpu)
gpu
->
sim
.
bf2WorkUnitsPerBlockRemainder
=
cells
-
gpu
->
sim
.
bornForce2_blocks
*
gpu
->
sim
.
bf2WorkUnitsPerBlock
;
gpu
->
sim
.
interaction_threads_per_block
=
64
;
gpu
->
sim
.
interaction_blocks
=
(
gpu
->
sim
.
workUnits
+
gpu
->
sim
.
interaction_threads_per_block
-
1
)
/
gpu
->
sim
.
interaction_threads_per_block
;
if
(
gpu
->
sim
.
interaction_blocks
>
8
*
gpu
->
sim
.
blocks
)
gpu
->
sim
.
interaction_blocks
=
8
*
gpu
->
sim
.
blocks
;
// Decrease thread count for extra small molecules to spread computation
// across entire chip
...
...
platforms/cuda/src/kernels/kFindInteractingBlocks.h
View file @
673b555b
...
...
@@ -79,7 +79,7 @@ __global__ void METHOD_NAME(kFindBlockBounds, _kernel)()
__global__
void
METHOD_NAME
(
kFindBlocksWithInteractions
,
_kernel
)()
{
unsigned
int
pos
=
blockIdx
.
x
*
blockDim
.
x
+
threadIdx
.
x
;
if
(
pos
<
cSim
.
workUnits
)
while
(
pos
<
cSim
.
workUnits
)
{
// Extract cell coordinates from appropriate work unit
...
...
@@ -105,6 +105,7 @@ __global__ void METHOD_NAME(kFindBlocksWithInteractions, _kernel)()
dy
=
max
(
0
.
0
f
,
abs
(
dy
)
-
boxSizea
.
y
-
boxSizeb
.
y
);
dz
=
max
(
0
.
0
f
,
abs
(
dz
)
-
boxSizea
.
z
-
boxSizeb
.
z
);
cSim
.
pInteractionFlag
[
pos
]
=
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
>
cSim
.
nonbondedCutoffSqr
?
0
:
1
);
pos
+=
gridDim
.
x
*
blockDim
.
x
;
}
}
...
...
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