Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
elpa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
elpa
elpa
Commits
17f5d6b1
Commit
17f5d6b1
authored
Oct 18, 2018
by
Andreas Marek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_pre_stage' of
https://gitlab.mpcdf.mpg.de/elpa/elpa
into master_pre_stage
parents
1d969360
d900a3e1
Changes
4
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
src/GPU/check_for_gpu.F90
src/GPU/check_for_gpu.F90
+13
-0
src/GPU/mod_cuda.F90
src/GPU/mod_cuda.F90
+2
-1
src/elpa1/elpa1_template.F90
src/elpa1/elpa1_template.F90
+4
-2
src/elpa2/elpa2_template.F90
src/elpa2/elpa2_template.F90
+2
-0
No files found.
src/GPU/check_for_gpu.F90
View file @
17f5d6b1
...
...
@@ -62,6 +62,19 @@ module mod_check_for_gpu
gpuAvailable
=
.false.
if
(
cublasHandle
.ne.
-1
)
then
gpuAvailable
=
.true.
numberOfDevices
=
-1
if
(
myid
==
0
)
then
print
*
,
"Skipping GPU init, should have already been initialized "
endif
return
else
if
(
myid
==
0
)
then
print
*
,
"Initializing the GPU devices"
endif
endif
if
(
.not.
(
present
(
wantDebug
)))
then
wantDebugMessage
=
.false.
else
...
...
src/GPU/mod_cuda.F90
View file @
17f5d6b1
...
...
@@ -55,7 +55,8 @@ module cuda_functions
integer
(
kind
=
ik
)
::
cudaHostRegisterMapped
integer
(
kind
=
ik
)
::
cudaMemcpyDeviceToDevice
integer
(
kind
=
C_intptr_T
)
::
cublasHandle
! TODO global variable, has to be changed
integer
(
kind
=
C_intptr_T
)
::
cublasHandle
=
-1
integer
(
kind
=
c_intptr_t
),
parameter
::
size_of_double_real
=
8_rk8
#ifdef WANT_SINGLE_PRECISION_REAL
...
...
src/elpa1/elpa1_template.F90
View file @
17f5d6b1
...
...
@@ -220,10 +220,10 @@ function elpa_solve_evp_&
wantDebug
=
debug
==
1
do_useGPU
=
.false.
if
(
useGPU
)
then
call
obj
%
timer
%
start
(
"check_for_gpu"
)
if
(
check_for_gpu
(
my_pe
,
numberOfGPUDevices
,
wantDebug
=
wantDebug
))
then
do_useGPU
=
.true.
! set the neccessary parameters
cudaMemcpyHostToDevice
=
cuda_memcpyHostToDevice
()
...
...
@@ -236,8 +236,10 @@ function elpa_solve_evp_&
success
=
.false.
return
endif
call
obj
%
timer
%
stop
(
"check_for_gpu"
)
endif
do_useGPU_tridiag
=
do_useGPU
do_useGPU_solve_tridi
=
do_useGPU
do_useGPU_trans_ev
=
do_useGPU
...
...
src/elpa2/elpa2_template.F90
View file @
17f5d6b1
...
...
@@ -239,6 +239,7 @@
do_useGPU
=
.false.
if
(
useGPU
)
then
call
obj
%
timer
%
start
(
"check_for_gpu"
)
if
(
check_for_gpu
(
my_pe
,
numberOfGPUDevices
,
wantDebug
=
wantDebug
))
then
do_useGPU
=
.true.
...
...
@@ -254,6 +255,7 @@
success
=
.false.
return
endif
call
obj
%
timer
%
stop
(
"check_for_gpu"
)
endif
do_useGPU_bandred
=
do_useGPU
...
...
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