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
00b5aa4d
Commit
00b5aa4d
authored
Mar 04, 2010
by
Peter Eastman
Browse files
Bug fixes
parent
cdec19f9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
platforms/cuda/tests/TestCudaEwald.cpp
platforms/cuda/tests/TestCudaEwald.cpp
+1
-1
platforms/opencl/src/kernels/pme.cl
platforms/opencl/src/kernels/pme.cl
+2
-2
platforms/opencl/src/kernels/sort.cl
platforms/opencl/src/kernels/sort.cl
+1
-1
platforms/opencl/tests/TestOpenCLEwald.cpp
platforms/opencl/tests/TestOpenCLEwald.cpp
+1
-1
platforms/reference/tests/TestReferenceEwald.cpp
platforms/reference/tests/TestReferenceEwald.cpp
+1
-1
No files found.
platforms/cuda/tests/TestCudaEwald.cpp
View file @
00b5aa4d
...
...
@@ -208,7 +208,6 @@ void testErrorTolerance(NonbondedForce::NonbondedMethod method) {
}
force
->
setNonbondedMethod
(
method
);
CudaPlatform
platform
;
VerletIntegrator
integrator
(
0.01
);
// For various values of the cutoff and error tolerance, see if the actual error is reasonable.
...
...
@@ -218,6 +217,7 @@ void testErrorTolerance(NonbondedForce::NonbondedMethod method) {
double
norm
=
0.0
;
for
(
double
tol
=
5e-5
;
tol
<
1e-3
;
tol
*=
2.0
)
{
force
->
setEwaldErrorTolerance
(
tol
);
VerletIntegrator
integrator
(
0.01
);
Context
context
(
system
,
integrator
,
platform
);
context
.
setPositions
(
positions
);
State
state
=
context
.
getState
(
State
::
Forces
);
...
...
platforms/opencl/src/kernels/pme.cl
View file @
00b5aa4d
...
...
@@ -84,7 +84,7 @@ __kernel void updateBsplines(__global float4* posq, __global float4* pmeBsplineT
__kernel
void
gridSpreadCharge
(
__global
float2*
pmeAtomGridIndex,
__global
int*
pmeAtomRange,
__global
float2*
pmeGrid,
__global
float4*
pmeBsplineTheta
)
{
unsigned
int
numGridPoints
=
GRID_SIZE_X*GRID_SIZE_Y*GRID_SIZE_Z
;
for
(
int
gridIndex
=
get_global_id
(
0
)
; gridIndex < numGridPoints; gridIndex += get_global_size(0)) {
int
3
gridPoint
;
int
4
gridPoint
;
gridPoint.x
=
gridIndex/
(
GRID_SIZE_Y*GRID_SIZE_Z
)
;
int
remainder
=
gridIndex-gridPoint.x*GRID_SIZE_Y*GRID_SIZE_Z
;
gridPoint.y
=
remainder/GRID_SIZE_Z
;
...
...
@@ -145,7 +145,7 @@ __kernel void reciprocalConvolution(__global float2* pmeGrid, __global float* en
__kernel
void
gridInterpolateForce
(
__global
float4*
posq,
__global
float4*
forceBuffers,
__global
float4*
pmeBsplineTheta,
__global
float4*
pmeBsplineDTheta,
__global
float2*
pmeGrid
)
{
for
(
int
atom
=
get_global_id
(
0
)
; atom < NUM_ATOMS; atom += get_global_size(0)) {
float
3
force
=
0.0f
;
float
4
force
=
0.0f
;
float4
pos
=
posq[atom]
;
float4
t
=
(
float4
)
((
pos.x/PERIODIC_BOX_SIZE_X+1.0f
)
*GRID_SIZE_X,
(
pos.y/PERIODIC_BOX_SIZE_Y+1.0f
)
*GRID_SIZE_Y,
...
...
platforms/opencl/src/kernels/sort.cl
View file @
00b5aa4d
...
...
@@ -114,7 +114,7 @@ __kernel void sortBuckets(__global TYPE* data, __global TYPE* buckets, int numBu
if
(
length
<=
get_local_size
(
0
))
{
//
Load
the
data
into
local
memory.
buffer[get_local_id
(
0
)
]
=
(
get_local_id
(
0
)
<
length
?
buckets[startIndex+get_local_id
(
0
)
]
:
MAXFLOAT
)
;
buffer[get_local_id
(
0
)
]
=
(
get_local_id
(
0
)
<
length
?
buckets[startIndex+get_local_id
(
0
)
]
:
(
TYPE
)
MAXFLOAT
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
//
Perform
a
bitonic
sort
in
local
memory.
...
...
platforms/opencl/tests/TestOpenCLEwald.cpp
View file @
00b5aa4d
...
...
@@ -207,7 +207,6 @@ void testErrorTolerance(NonbondedForce::NonbondedMethod method) {
}
force
->
setNonbondedMethod
(
method
);
OpenCLPlatform
platform
;
VerletIntegrator
integrator
(
0.01
);
// For various values of the cutoff and error tolerance, see if the actual error is reasonable.
...
...
@@ -217,6 +216,7 @@ void testErrorTolerance(NonbondedForce::NonbondedMethod method) {
double
norm
=
0.0
;
for
(
double
tol
=
5e-5
;
tol
<
1e-3
;
tol
*=
2.0
)
{
force
->
setEwaldErrorTolerance
(
tol
);
VerletIntegrator
integrator
(
0.01
);
Context
context
(
system
,
integrator
,
platform
);
context
.
setPositions
(
positions
);
State
state
=
context
.
getState
(
State
::
Forces
);
...
...
platforms/reference/tests/TestReferenceEwald.cpp
View file @
00b5aa4d
...
...
@@ -320,7 +320,6 @@ void testErrorTolerance(NonbondedForce::NonbondedMethod method) {
}
force
->
setNonbondedMethod
(
method
);
ReferencePlatform
platform
;
VerletIntegrator
integrator
(
0.01
);
// For various values of the cutoff and error tolerance, see if the actual error is reasonable.
...
...
@@ -330,6 +329,7 @@ void testErrorTolerance(NonbondedForce::NonbondedMethod method) {
double
norm
=
0.0
;
for
(
double
tol
=
5e-5
;
tol
<
1e-3
;
tol
*=
2.0
)
{
force
->
setEwaldErrorTolerance
(
tol
);
VerletIntegrator
integrator
(
0.01
);
Context
context
(
system
,
integrator
,
platform
);
context
.
setPositions
(
positions
);
State
state
=
context
.
getState
(
State
::
Forces
);
...
...
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