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
49d1dd3e
Commit
49d1dd3e
authored
Aug 14, 2009
by
Peter Eastman
Browse files
Fixed a test failure on certain GPUs
parent
8480944d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
platforms/cuda/src/kernels/kSettle.cu
platforms/cuda/src/kernels/kSettle.cu
+2
-10
No files found.
platforms/cuda/src/kernels/kSettle.cu
View file @
49d1dd3e
...
@@ -76,9 +76,9 @@ __global__ void kApplyFirstSettle_kernel()
...
@@ -76,9 +76,9 @@ __global__ void kApplyFirstSettle_kernel()
float
m1
=
1.0
/
cSim
.
pVelm4
[
atomID
.
y
].
w
;
float
m1
=
1.0
/
cSim
.
pVelm4
[
atomID
.
y
].
w
;
float
m2
=
1.0
/
cSim
.
pVelm4
[
atomID
.
z
].
w
;
float
m2
=
1.0
/
cSim
.
pVelm4
[
atomID
.
z
].
w
;
//
Subtract the average old atom positio
n to improve numerical precision.
//
Translate the molecule to the origi
n to improve numerical precision.
float3
center
=
make_float3
(
(
apos0
.
x
+
apos1
.
x
+
apos2
.
x
)
/
3.0
f
,
(
apos0
.
y
+
apos1
.
y
+
apos2
.
y
)
/
3.0
f
,
(
apos0
.
z
+
apos1
.
z
+
apos2
.
z
)
/
3.0
f
);
float3
center
=
make_float3
(
apos0
.
x
,
apos0
.
y
,
apos0
.
z
);
apos0
.
x
-=
center
.
x
;
apos0
.
x
-=
center
.
x
;
apos0
.
y
-=
center
.
y
;
apos0
.
y
-=
center
.
y
;
apos0
.
z
-=
center
.
z
;
apos0
.
z
-=
center
.
z
;
...
@@ -97,8 +97,6 @@ __global__ void kApplyFirstSettle_kernel()
...
@@ -97,8 +97,6 @@ __global__ void kApplyFirstSettle_kernel()
float
xc0
=
apos2
.
x
-
apos0
.
x
;
float
xc0
=
apos2
.
x
-
apos0
.
x
;
float
yc0
=
apos2
.
y
-
apos0
.
y
;
float
yc0
=
apos2
.
y
-
apos0
.
y
;
float
zc0
=
apos2
.
z
-
apos0
.
z
;
float
zc0
=
apos2
.
z
-
apos0
.
z
;
float
dist1
=
sqrt
(
xb0
*
xb0
+
yb0
*
yb0
+
zb0
*
zb0
);
float
dist2
=
sqrt
(
xc0
*
xc0
+
yc0
*
yc0
+
zc0
*
zc0
);
float
totalMass
=
m0
+
m1
+
m2
;
float
totalMass
=
m0
+
m1
+
m2
;
float
xcom
=
((
apos0
.
x
+
xp0
.
x
)
*
m0
+
(
apos1
.
x
+
xp1
.
x
)
*
m1
+
(
apos2
.
x
+
xp2
.
x
)
*
m2
)
/
totalMass
;
float
xcom
=
((
apos0
.
x
+
xp0
.
x
)
*
m0
+
(
apos1
.
x
+
xp1
.
x
)
*
m1
+
(
apos2
.
x
+
xp2
.
x
)
*
m2
)
/
totalMass
;
...
@@ -142,8 +140,6 @@ __global__ void kApplyFirstSettle_kernel()
...
@@ -142,8 +140,6 @@ __global__ void kApplyFirstSettle_kernel()
float
yb0d
=
trns12
*
xb0
+
trns22
*
yb0
+
trns32
*
zb0
;
float
yb0d
=
trns12
*
xb0
+
trns22
*
yb0
+
trns32
*
zb0
;
float
xc0d
=
trns11
*
xc0
+
trns21
*
yc0
+
trns31
*
zc0
;
float
xc0d
=
trns11
*
xc0
+
trns21
*
yc0
+
trns31
*
zc0
;
float
yc0d
=
trns12
*
xc0
+
trns22
*
yc0
+
trns32
*
zc0
;
float
yc0d
=
trns12
*
xc0
+
trns22
*
yc0
+
trns32
*
zc0
;
// float xa1d = trns11*xa1 + trns21*ya1 + trns31*za1;
// float ya1d = trns12*xa1 + trns22*ya1 + trns32*za1;
float
za1d
=
trns13
*
xa1
+
trns23
*
ya1
+
trns33
*
za1
;
float
za1d
=
trns13
*
xa1
+
trns23
*
ya1
+
trns33
*
za1
;
float
xb1d
=
trns11
*
xb1
+
trns21
*
yb1
+
trns31
*
zb1
;
float
xb1d
=
trns11
*
xb1
+
trns21
*
yb1
+
trns31
*
zb1
;
float
yb1d
=
trns12
*
xb1
+
trns22
*
yb1
+
trns32
*
zb1
;
float
yb1d
=
trns12
*
xb1
+
trns22
*
yb1
+
trns32
*
zb1
;
...
@@ -259,8 +255,6 @@ __global__ void kApplySecondSettle_kernel()
...
@@ -259,8 +255,6 @@ __global__ void kApplySecondSettle_kernel()
float
xc0
=
apos2
.
x
-
apos0
.
x
;
float
xc0
=
apos2
.
x
-
apos0
.
x
;
float
yc0
=
apos2
.
y
-
apos0
.
y
;
float
yc0
=
apos2
.
y
-
apos0
.
y
;
float
zc0
=
apos2
.
z
-
apos0
.
z
;
float
zc0
=
apos2
.
z
-
apos0
.
z
;
float
dist1
=
sqrt
(
xb0
*
xb0
+
yb0
*
yb0
+
zb0
*
zb0
);
float
dist2
=
sqrt
(
xc0
*
xc0
+
yc0
*
yc0
+
zc0
*
zc0
);
float
totalMass
=
m0
+
m1
+
m2
;
float
totalMass
=
m0
+
m1
+
m2
;
float
xcom
=
((
apos0
.
x
+
xp0
.
x
)
*
m0
+
(
apos1
.
x
+
xp1
.
x
)
*
m1
+
(
apos2
.
x
+
xp2
.
x
)
*
m2
)
/
totalMass
;
float
xcom
=
((
apos0
.
x
+
xp0
.
x
)
*
m0
+
(
apos1
.
x
+
xp1
.
x
)
*
m1
+
(
apos2
.
x
+
xp2
.
x
)
*
m2
)
/
totalMass
;
...
@@ -304,8 +298,6 @@ __global__ void kApplySecondSettle_kernel()
...
@@ -304,8 +298,6 @@ __global__ void kApplySecondSettle_kernel()
float
yb0d
=
trns12
*
xb0
+
trns22
*
yb0
+
trns32
*
zb0
;
float
yb0d
=
trns12
*
xb0
+
trns22
*
yb0
+
trns32
*
zb0
;
float
xc0d
=
trns11
*
xc0
+
trns21
*
yc0
+
trns31
*
zc0
;
float
xc0d
=
trns11
*
xc0
+
trns21
*
yc0
+
trns31
*
zc0
;
float
yc0d
=
trns12
*
xc0
+
trns22
*
yc0
+
trns32
*
zc0
;
float
yc0d
=
trns12
*
xc0
+
trns22
*
yc0
+
trns32
*
zc0
;
// float xa1d = trns11*xa1 + trns21*ya1 + trns31*za1;
// float ya1d = trns12*xa1 + trns22*ya1 + trns32*za1;
float
za1d
=
trns13
*
xa1
+
trns23
*
ya1
+
trns33
*
za1
;
float
za1d
=
trns13
*
xa1
+
trns23
*
ya1
+
trns33
*
za1
;
float
xb1d
=
trns11
*
xb1
+
trns21
*
yb1
+
trns31
*
zb1
;
float
xb1d
=
trns11
*
xb1
+
trns21
*
yb1
+
trns31
*
zb1
;
float
yb1d
=
trns12
*
xb1
+
trns22
*
yb1
+
trns32
*
zb1
;
float
yb1d
=
trns12
*
xb1
+
trns22
*
yb1
+
trns32
*
zb1
;
...
...
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