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
eb2c0d30
Commit
eb2c0d30
authored
Aug 06, 2010
by
Mark Friedrichs
Browse files
sharedMemoryPerBlock now obtained from gpuContext
parent
e69c8c66
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
+5
-13
plugins/amoeba/platforms/cuda/src/kernels/AmoebaGpu.cpp
plugins/amoeba/platforms/cuda/src/kernels/AmoebaGpu.cpp
+4
-10
plugins/amoeba/platforms/cuda/src/kernels/amoebaGpuTypes.h
plugins/amoeba/platforms/cuda/src/kernels/amoebaGpuTypes.h
+0
-2
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaKirkwoodEDiff.cu
...rms/cuda/src/kernels/kCalculateAmoebaCudaKirkwoodEDiff.cu
+1
-1
No files found.
plugins/amoeba/platforms/cuda/src/kernels/AmoebaGpu.cpp
View file @
eb2c0d30
...
...
@@ -63,14 +63,6 @@ amoebaGpuContext amoebaGpuInit( _gpuContext* gpu )
#endif
amoebaGpu
->
numberOfSorWorkVectors
=
4
;
if
(
gpu
->
sm_version
>=
SM_20
){
amoebaGpu
->
sharedMemoryPerBlock
=
49152
;
}
else
if
(
gpu
->
sm_version
>=
SM_12
){
amoebaGpu
->
sharedMemoryPerBlock
=
16384
;
}
else
{
amoebaGpu
->
sharedMemoryPerBlock
=
8192
;
}
amoebaGpu
->
paddedNumberOfAtoms
=
gpu
->
sim
.
paddedNumberOfAtoms
;
amoebaGpu
->
amoebaSim
.
numberOfAtoms
=
gpu
->
natoms
;
amoebaGpu
->
amoebaSim
.
paddedNumberOfAtoms
=
gpu
->
sim
.
paddedNumberOfAtoms
;
...
...
@@ -183,7 +175,9 @@ void gpuPrintCudaAmoebaGmxSimulation(amoebaGpuContext amoebaGpu, FILE* log )
(
void
)
fprintf
(
log
,
"
\n\n
"
);
(
void
)
fprintf
(
log
,
" gpuContext %p
\n
"
,
amoebaGpu
->
gpuContext
);
(
void
)
fprintf
(
log
,
" log %p
\n
"
,
amoebaGpu
->
log
);
(
void
)
fprintf
(
log
,
" sharedMemoryPerBlock %u
\n
"
,
amoebaGpu
->
sharedMemoryPerBlock
);
(
void
)
fprintf
(
log
,
" sm_version %u
\n
"
,
gpu
->
sm_version
);
(
void
)
fprintf
(
log
,
" device %u
\n
"
,
gpu
->
device
);
(
void
)
fprintf
(
log
,
" sharedMemoryPerBlock %u
\n
"
,
gpu
->
sharedMemoryPerBlock
);
(
void
)
fprintf
(
log
,
" pMapArray %p
\n
"
,
amoebaGpu
->
pMapArray
);
(
void
)
fprintf
(
log
,
" dMapArray %p
\n
"
,
amoebaGpu
->
dMapArray
);
(
void
)
fprintf
(
log
,
" bOutputBufferPerWarp %d
\n
"
,
amoebaGpu
->
bOutputBufferPerWarp
);
...
...
@@ -3490,7 +3484,7 @@ tgx = 0;
unsigned
int
getThreadsPerBlock
(
amoebaGpuContext
amoebaGpu
,
unsigned
int
sharedMemoryPerThread
)
{
unsigned
int
grid
=
amoebaGpu
->
gpuContext
->
grid
;
unsigned
int
threadsPerBlock
=
(
amoebaGpu
->
sharedMemoryPerBlock
+
grid
-
1
)
/
(
grid
*
sharedMemoryPerThread
);
unsigned
int
threadsPerBlock
=
(
amoebaGpu
->
gpuContext
->
sharedMemoryPerBlock
+
grid
-
1
)
/
(
grid
*
sharedMemoryPerThread
);
threadsPerBlock
=
threadsPerBlock
<
1
?
1
:
threadsPerBlock
;
threadsPerBlock
*=
grid
;
...
...
plugins/amoeba/platforms/cuda/src/kernels/amoebaGpuTypes.h
View file @
eb2c0d30
...
...
@@ -47,8 +47,6 @@ struct _amoebaGpuContext {
FILE
*
log
;
unsigned
int
sharedMemoryPerBlock
;
// diagnostic arrays
MapIntFloat
**
pMapArray
;
...
...
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaKirkwoodEDiff.cu
View file @
eb2c0d30
...
...
@@ -1207,7 +1207,7 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu )
" Ebuf=%u ixnCt=%lu workUnits=%u sm=%d device=%d sharedMemoryPerBlock=%u
\n
"
,
amoebaGpu
->
nonbondBlocks
,
threadsPerBlock
,
amoebaGpu
->
bOutputBufferPerWarp
,
sizeof
(
KirkwoodEDiffParticle
),
sizeof
(
KirkwoodEDiffParticle
)
*
threadsPerBlock
,
amoebaGpu
->
energyOutputBuffers
,
(
*
gpu
->
psInteractionCount
)[
0
],
gpu
->
sim
.
workUnits
,
gpu
->
sm_version
,
gpu
->
device
,
amoebaG
pu
->
sharedMemoryPerBlock
);
amoebaGpu
->
energyOutputBuffers
,
(
*
gpu
->
psInteractionCount
)[
0
],
gpu
->
sim
.
workUnits
,
gpu
->
sm_version
,
gpu
->
device
,
g
pu
->
sharedMemoryPerBlock
);
//gpuPrintCudaAmoebaGmxSimulation(amoebaGpu, amoebaGpu->log );
(
void
)
fflush
(
amoebaGpu
->
log
);
}
...
...
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