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
1224ac17
Commit
1224ac17
authored
Sep 27, 2010
by
Mark Friedrichs
Browse files
Fixed scaling parameter bug
parent
2a03c44f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
plugins/amoeba/platforms/cuda/src/kernels/AmoebaGpu.cpp
plugins/amoeba/platforms/cuda/src/kernels/AmoebaGpu.cpp
+13
-7
No files found.
plugins/amoeba/platforms/cuda/src/kernels/AmoebaGpu.cpp
View file @
1224ac17
...
@@ -1689,7 +1689,7 @@ void gpuSetAmoebaMultipoleParameters(amoebaGpuContext amoebaGpu, const std::vect
...
@@ -1689,7 +1689,7 @@ void gpuSetAmoebaMultipoleParameters(amoebaGpuContext amoebaGpu, const std::vect
#ifdef AMOEBA_DEBUG
#ifdef AMOEBA_DEBUG
//if( amoebaGpu->log && ( ( ( ii < maxPrint ) || (ii >= (charges.size() - maxPrint) ) ) || ( ii == targetAtoms[0] || ii == targetAtoms[1]) ) ){
//if( amoebaGpu->log && ( ( ( ii < maxPrint ) || (ii >= (charges.size() - maxPrint) ) ) || ( ii == targetAtoms[0] || ii == targetAtoms[1]) ) ){
if
(
amoebaGpu
->
log
&&
(
(
(
ii
<
maxPrint
)
||
(
ii
>=
(
charges
.
size
()
-
maxPrint
)
)
)
)
){
if
(
(
amoebaGpu
->
log
&&
(
(
(
ii
<
maxPrint
)
||
(
ii
>=
(
charges
.
size
()
-
maxPrint
)
)
)
)
)
){
// axis particles
// axis particles
...
@@ -2912,19 +2912,25 @@ static void getScalingDegrees( amoebaGpuContext amoebaGpu, unsigned int particle
...
@@ -2912,19 +2912,25 @@ static void getScalingDegrees( amoebaGpuContext amoebaGpu, unsigned int particle
int
particlesOffset
=
particleI
*
amoebaGpu
->
maxCovalentDegreeSz
;
int
particlesOffset
=
particleI
*
amoebaGpu
->
maxCovalentDegreeSz
;
unsigned
int
minCovalentIndex
=
static_cast
<
unsigned
int
>
(
amoebaGpu
->
psCovalentDegree
->
_pSysStream
[
0
][
particlesOffset
]);
unsigned
int
minCovalentIndex
=
static_cast
<
unsigned
int
>
(
amoebaGpu
->
psCovalentDegree
->
_pSysStream
[
0
][
particlesOffset
]);
unsigned
int
minCovalentPolarizationIndex
=
static_cast
<
unsigned
int
>
(
amoebaGpu
->
psPolarizationDegree
->
_pSysStream
[
0
][
particlesOffset
]);
unsigned
int
minCovalentPolarizationIndex
=
static_cast
<
unsigned
int
>
(
amoebaGpu
->
psPolarizationDegree
->
_pSysStream
[
0
][
particlesOffset
]);
if
(
particleJ
<
minCovalentIndex
||
particleJ
>
(
minCovalentIndex
+
amoebaGpu
->
maxCovalentDegreeSz
)
){
if
(
particleJ
<
minCovalentIndex
||
particleJ
>
=
(
minCovalentIndex
+
amoebaGpu
->
maxCovalentDegreeSz
-
1
)
){
*
covalentDegree
=
0
;
*
covalentDegree
=
0
;
}
else
{
}
else
{
*
covalentDegree
=
amoebaGpu
->
psCovalentDegree
->
_pSysStream
[
0
][
particlesOffset
+
(
particleJ
-
minCovalentIndex
)
+
1
];
*
covalentDegree
=
amoebaGpu
->
psCovalentDegree
->
_pSysStream
[
0
][
particlesOffset
+
(
particleJ
-
minCovalentIndex
)
+
1
];
}
}
if
(
particleJ
<
minCovalentPolarizationIndex
||
particleJ
>
(
minCovalentPolarizationIndex
+
amoebaGpu
->
maxCovalentDegreeSz
)
){
if
(
particleJ
<
minCovalentPolarizationIndex
||
particleJ
>
=
(
minCovalentPolarizationIndex
+
amoebaGpu
->
maxCovalentDegreeSz
-
1
)
){
*
polarizationDegree
=
0
;
*
polarizationDegree
=
0
;
}
else
{
}
else
{
*
polarizationDegree
=
amoebaGpu
->
psPolarizationDegree
->
_pSysStream
[
0
][
particlesOffset
+
(
particleJ
-
minCovalentPolarizationIndex
)
+
1
];
*
polarizationDegree
=
amoebaGpu
->
psPolarizationDegree
->
_pSysStream
[
0
][
particlesOffset
+
(
particleJ
-
minCovalentPolarizationIndex
)
+
1
];
}
}
/* if( *covalentDegree > 5 || *polarizationDegree > 5 ){
fprintf( stderr, "getScalingDegrees error: off=%d maxSz=%d [%u %u] deg=[%d %d] minIndex=[%u %u]\n", particlesOffset, amoebaGpu->maxCovalentDegreeSz,
particleI, particleJ, *covalentDegree, *polarizationDegree, minCovalentIndex, minCovalentPolarizationIndex );
} */
}
}
extern
"C"
extern
"C"
...
@@ -3302,7 +3308,7 @@ static unsigned int targetAtoms[2] = { 0, 1};
...
@@ -3302,7 +3308,7 @@ static unsigned int targetAtoms[2] = { 0, 1};
ps_M_ScaleIndices
->
_pSysStream
[
0
][
scaleOffset
].
y
|=
(
1
<<
kk
);
ps_M_ScaleIndices
->
_pSysStream
[
0
][
scaleOffset
].
y
|=
(
1
<<
kk
);
}
}
if
(
0
&&
amoebaGpu
->
log
&&
(
(
atomI
==
targetAtoms
[
0
])
||
(
atomI
==
targetAtoms
[
1
])
)
){
if
(
amoebaGpu
->
log
&&
(
(
atomI
==
targetAtoms
[
0
])
||
(
atomI
==
targetAtoms
[
1
])
)
){
(
void
)
fprintf
(
amoebaGpu
->
log
,
"XXX cell=%u [%u %u] [%d %d] p[%d %d] m[%d %d] scaleOffset=%d kk=%d
\n
"
,
(
void
)
fprintf
(
amoebaGpu
->
log
,
"XXX cell=%u [%u %u] [%d %d] p[%d %d] m[%d %d] scaleOffset=%d kk=%d
\n
"
,
ii
,
atomI
,
atomJ
,
covalentDegree
,
polarizationDegree
,
pX
,
pY
,
mX
,
mY
,
scaleOffset
,
kk
);
ii
,
atomI
,
atomJ
,
covalentDegree
,
polarizationDegree
,
pX
,
pY
,
mX
,
mY
,
scaleOffset
,
kk
);
}
}
...
@@ -3396,7 +3402,7 @@ static unsigned int targetAtoms[2] = { 0, 1};
...
@@ -3396,7 +3402,7 @@ static unsigned int targetAtoms[2] = { 0, 1};
}
}
(
void
)
fflush
(
amoebaGpu
->
log
);
(
void
)
fflush
(
amoebaGpu
->
log
);
#if
1
#if
0
unsigned int totalWarps = (amoebaGpu->nonbondBlocks*amoebaGpu->nonbondThreadsPerBlock)/GRID;
unsigned int totalWarps = (amoebaGpu->nonbondBlocks*amoebaGpu->nonbondThreadsPerBlock)/GRID;
//unsigned int warp = (blockIdx.x*blockDim.x+threadIdx.x)/GRID;
//unsigned int warp = (blockIdx.x*blockDim.x+threadIdx.x)/GRID;
//unsigned int numWorkUnits = cSim.pInteractionCount[0];
//unsigned int numWorkUnits = cSim.pInteractionCount[0];
...
...
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