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
5e078fdd
Commit
5e078fdd
authored
Aug 19, 2013
by
peastman
Browse files
Fixed bug in RPMD contractions
parent
f4f5b568
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
plugins/rpmd/platforms/cuda/src/kernels/rpmdContraction.cu
plugins/rpmd/platforms/cuda/src/kernels/rpmdContraction.cu
+3
-3
plugins/rpmd/platforms/opencl/src/kernels/rpmdContraction.cl
plugins/rpmd/platforms/opencl/src/kernels/rpmdContraction.cl
+1
-1
plugins/rpmd/platforms/reference/src/ReferenceRpmdKernels.cpp
...ins/rpmd/platforms/reference/src/ReferenceRpmdKernels.cpp
+1
-1
No files found.
plugins/rpmd/platforms/cuda/src/kernels/rpmdContraction.cu
View file @
5e078fdd
...
...
@@ -114,8 +114,8 @@ extern "C" __global__ void contractForces(long long* force, long long* contracte
// Store results.
force
[
forceIndex
]
=
(
long
long
)
(
FORCE_SCALE
*
freal
[
indexInBlock
].
x
);
force
[
forceIndex
+
PADDED_NUM_ATOMS
]
=
(
long
long
)
(
FORCE_SCALE
*
freal
[
indexInBlock
].
y
);
force
[
forceIndex
+
PADDED_NUM_ATOMS
*
2
]
=
(
long
long
)
(
FORCE_SCALE
*
freal
[
indexInBlock
].
z
);
force
[
forceIndex
]
+
=
(
long
long
)
(
FORCE_SCALE
*
freal
[
indexInBlock
].
x
);
force
[
forceIndex
+
PADDED_NUM_ATOMS
]
+
=
(
long
long
)
(
FORCE_SCALE
*
freal
[
indexInBlock
].
y
);
force
[
forceIndex
+
PADDED_NUM_ATOMS
*
2
]
+
=
(
long
long
)
(
FORCE_SCALE
*
freal
[
indexInBlock
].
z
);
}
}
plugins/rpmd/platforms/opencl/src/kernels/rpmdContraction.cl
View file @
5e078fdd
...
...
@@ -113,6 +113,6 @@ __kernel void contractForces(__global real4* force, __global real4* contracted)
//
Store
results.
force[index]
=
convert_real4
(
FORCE_SCALE*freal[indexInBlock]
)
;
force[index]
+
=
convert_real4
(
FORCE_SCALE*freal[indexInBlock]
)
;
}
}
plugins/rpmd/platforms/reference/src/ReferenceRpmdKernels.cpp
View file @
5e078fdd
...
...
@@ -336,7 +336,7 @@ void ReferenceIntegrateRPMDStepKernel::computeForces(ContextImpl& context, const
q
[
k
]
=
t_complex
(
0
,
0
);
fftpack_exec_1d
(
fft
,
FFTPACK_BACKWARD
,
&
q
[
0
],
&
q
[
0
]);
for
(
int
k
=
0
;
k
<
totalCopies
;
k
++
)
forces
[
k
][
particle
][
component
]
=
scale2
*
q
[
k
].
re
;
forces
[
k
][
particle
][
component
]
+
=
scale2
*
q
[
k
].
re
;
}
}
}
...
...
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