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
2df35b4e
Commit
2df35b4e
authored
Mar 14, 2018
by
peastman
Browse files
Bug fixes
parent
eb932433
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
platforms/cuda/src/CudaNonbondedUtilities.cpp
platforms/cuda/src/CudaNonbondedUtilities.cpp
+1
-0
platforms/cuda/src/kernels/customNonbondedGroups.cu
platforms/cuda/src/kernels/customNonbondedGroups.cu
+1
-0
platforms/opencl/src/OpenCLNonbondedUtilities.cpp
platforms/opencl/src/OpenCLNonbondedUtilities.cpp
+1
-0
platforms/opencl/src/kernels/customNonbondedGroups.cl
platforms/opencl/src/kernels/customNonbondedGroups.cl
+3
-2
No files found.
platforms/cuda/src/CudaNonbondedUtilities.cpp
View file @
2df35b4e
...
@@ -266,6 +266,7 @@ void CudaNonbondedUtilities::initialize(const System& system) {
...
@@ -266,6 +266,7 @@ void CudaNonbondedUtilities::initialize(const System& system) {
blockSorter
=
new
CudaSort
(
context
,
new
BlockSortTrait
(
context
.
getUseDoublePrecision
()),
numAtomBlocks
);
blockSorter
=
new
CudaSort
(
context
,
new
BlockSortTrait
(
context
.
getUseDoublePrecision
()),
numAtomBlocks
);
vector
<
unsigned
int
>
count
(
2
,
0
);
vector
<
unsigned
int
>
count
(
2
,
0
);
interactionCount
.
upload
(
count
);
interactionCount
.
upload
(
count
);
rebuildNeighborList
.
upload
(
count
);
}
}
// Record arguments for kernels.
// Record arguments for kernels.
...
...
platforms/cuda/src/kernels/customNonbondedGroups.cu
View file @
2df35b4e
...
@@ -151,6 +151,7 @@ extern "C" __global__ void buildNeighborList(int* __restrict__ rebuildNeighborL
...
@@ -151,6 +151,7 @@ extern "C" __global__ void buildNeighborList(int* __restrict__ rebuildNeighborL
SYNC_WARPS
;
SYNC_WARPS
;
}
}
if
(
anyInteraction
[
local_warp
])
{
if
(
anyInteraction
[
local_warp
])
{
SYNC_WARPS
;
if
(
tgx
==
0
)
if
(
tgx
==
0
)
tileIndex
[
local_warp
]
=
atomicAdd
(
numGroupTiles
,
1
);
tileIndex
[
local_warp
]
=
atomicAdd
(
numGroupTiles
,
1
);
SYNC_WARPS
;
SYNC_WARPS
;
...
...
platforms/opencl/src/OpenCLNonbondedUtilities.cpp
View file @
2df35b4e
...
@@ -296,6 +296,7 @@ void OpenCLNonbondedUtilities::initialize(const System& system) {
...
@@ -296,6 +296,7 @@ void OpenCLNonbondedUtilities::initialize(const System& system) {
blockSorter
=
new
OpenCLSort
(
context
,
new
BlockSortTrait
(
context
.
getUseDoublePrecision
()),
numAtomBlocks
);
blockSorter
=
new
OpenCLSort
(
context
,
new
BlockSortTrait
(
context
.
getUseDoublePrecision
()),
numAtomBlocks
);
vector
<
cl_uint
>
count
(
1
,
0
);
vector
<
cl_uint
>
count
(
1
,
0
);
interactionCount
.
upload
(
count
);
interactionCount
.
upload
(
count
);
rebuildNeighborList
.
upload
(
count
);
}
}
}
}
...
...
platforms/opencl/src/kernels/customNonbondedGroups.cl
View file @
2df35b4e
...
@@ -144,7 +144,7 @@ __kernel void prepareToBuildNeighborList(__global int* restrict rebuildNeighborL
...
@@ -144,7 +144,7 @@ __kernel void prepareToBuildNeighborList(__global int* restrict rebuildNeighborL
*
Filter
the
list
of
tiles
to
include
only
ones
that
have
interactions
within
the
*
Filter
the
list
of
tiles
to
include
only
ones
that
have
interactions
within
the
*
padded
cutoff.
*
padded
cutoff.
*/
*/
__kernel
void
buildNeighborList
(
__global
int*
restrict
rebuildNeighborList,
__global
int*
numGroupTiles,
__kernel
void
buildNeighborList
(
__global
int*
restrict
rebuildNeighborList,
__global
int*
restrict
numGroupTiles,
__global
const
real4*
restrict
posq,
__global
const
int4*
restrict
groupData,
__global
int4*
restrict
filteredGroupData,
__global
const
real4*
restrict
posq,
__global
const
int4*
restrict
groupData,
__global
int4*
restrict
filteredGroupData,
real4
periodicBoxSize,
real4
invPeriodicBoxSize,
real4
periodicBoxVecX,
real4
periodicBoxVecY,
real4
periodicBoxVecZ
)
{
real4
periodicBoxSize,
real4
invPeriodicBoxSize,
real4
periodicBoxVecX,
real4
periodicBoxVecY,
real4
periodicBoxVecZ
)
{
...
@@ -193,8 +193,9 @@ __kernel void buildNeighborList(__global int* restrict rebuildNeighborList, __gl
...
@@ -193,8 +193,9 @@ __kernel void buildNeighborList(__global int* restrict rebuildNeighborList, __gl
SYNC_WARPS
;
SYNC_WARPS
;
}
}
if
(
anyInteraction[local_warp]
)
{
if
(
anyInteraction[local_warp]
)
{
SYNC_WARPS
;
if
(
tgx
==
0
)
if
(
tgx
==
0
)
tileIndex[local_warp]
=
atom_add
(
numGroupTiles,
1
)
;
tileIndex[local_warp]
=
atom
ic
_add
(
numGroupTiles,
1
)
;
SYNC_WARPS
;
SYNC_WARPS
;
filteredGroupData[TILE_SIZE*tileIndex[local_warp]+tgx]
=
atomData
;
filteredGroupData[TILE_SIZE*tileIndex[local_warp]+tgx]
=
atomData
;
}
}
...
...
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