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
6f4944e0
Commit
6f4944e0
authored
Feb 01, 2011
by
Peter Eastman
Browse files
Test case was crashing if the neighbor list needed to be resized
parent
3ec0d906
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
platforms/opencl/tests/TestOpenCLNonbondedForce.cpp
platforms/opencl/tests/TestOpenCLNonbondedForce.cpp
+4
-2
No files found.
platforms/opencl/tests/TestOpenCLNonbondedForce.cpp
View file @
6f4944e0
...
...
@@ -464,17 +464,19 @@ void testBlockInteractions(bool periodic) {
system
.
addForce
(
nonbonded
);
Context
context
(
system
,
integrator
,
cl
);
context
.
setPositions
(
positions
);
State
state
=
context
.
getState
(
State
::
Positions
|
State
::
Velocities
|
State
::
Forces
);
ContextImpl
*
contextImpl
=
*
reinterpret_cast
<
ContextImpl
**>
(
&
context
);
OpenCLPlatform
::
PlatformData
&
data
=
*
static_cast
<
OpenCLPlatform
::
PlatformData
*>
(
contextImpl
->
getPlatformData
());
OpenCLContext
&
clcontext
=
*
data
.
context
;
OpenCLNonbondedUtilities
&
nb
=
clcontext
.
getNonbondedUtilities
();
State
state
=
context
.
getState
(
State
::
Positions
|
State
::
Velocities
|
State
::
Forces
);
nb
.
updateNeighborListSize
();
state
=
context
.
getState
(
State
::
Positions
|
State
::
Velocities
|
State
::
Forces
);
// Verify that the bounds of each block were calculated correctly.
clcontext
.
getPosq
().
download
();
vector
<
mm_float4
>
blockCenters
(
numBlocks
);
vector
<
mm_float4
>
blockBoundingBoxes
(
numBlocks
);
OpenCLNonbondedUtilities
&
nb
=
clcontext
.
getNonbondedUtilities
();
nb
.
getBlockCenters
().
download
(
blockCenters
);
nb
.
getBlockBoundingBoxes
().
download
(
blockBoundingBoxes
);
for
(
int
i
=
0
;
i
<
numBlocks
;
i
++
)
{
...
...
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