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
10
Issues
10
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
c6b56c7e
Unverified
Commit
c6b56c7e
authored
Feb 05, 2016
by
Andreas Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide some debug messages per default
As always the debug messages appear if the environment variable is set
parent
ce897ae0
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
src/check_for_gpu.F90
src/check_for_gpu.F90
+20
-5
src/elpa2.F90
src/elpa2.F90
+2
-2
No files found.
src/check_for_gpu.F90
View file @
c6b56c7e
...
...
@@ -45,13 +45,14 @@ module mod_check_for_gpu
contains
function
check_for_gpu
(
myid
,
numberOfDevices
)
result
(
gpuAvailable
)
function
check_for_gpu
(
myid
,
numberOfDevices
,
wantDebug
)
result
(
gpuAvailable
)
use
cuda_functions
use
precision
implicit
none
include
'mpif.h'
integer
(
kind
=
ik
),
intent
(
in
)
::
myid
logical
::
success
logical
,
optional
,
intent
(
in
)
::
wantDebug
logical
::
success
,
wantDebugMessage
integer
(
kind
=
ik
),
intent
(
out
)
::
numberOfDevices
integer
(
kind
=
ik
)
::
deviceNumber
,
mpierr
,
maxNumberOfDevices
logical
::
gpuAvailable
...
...
@@ -59,6 +60,16 @@ module mod_check_for_gpu
gpuAvailable
=
.false.
if
(
.not.
(
present
(
wantDebug
)))
then
wantDebugMessage
=
.false.
else
if
(
wantDebug
)
then
wantDebugMessage
=
.true.
else
wantDebugMessage
=
.false.
endif
endif
! call getenv("CUDA_PROXY_PIPE_DIRECTORY", envname)
success
=
cuda_getdevicecount
(
numberOfDevices
)
...
...
@@ -83,8 +94,10 @@ module mod_check_for_gpu
! Usage of GPU is possible since devices have been detected
if
(
myid
==
0
)
then
print
*
print
'(3(a,i0))'
,
'Found '
,
numberOfDevices
,
' GPUs'
if
(
wantDebugMessage
)
then
print
*
print
'(3(a,i0))'
,
'Found '
,
numberOfDevices
,
' GPUs'
endif
endif
deviceNumber
=
mod
(
myid
,
numberOfDevices
)
...
...
@@ -94,7 +107,9 @@ module mod_check_for_gpu
print
*
,
"Cannot set CudaDevice"
stop
endif
print
'(3(a,i0))'
,
'MPI rank '
,
myid
,
' uses GPU #'
,
deviceNumber
if
(
wantDebugMessage
)
then
print
'(3(a,i0))'
,
'MPI rank '
,
myid
,
' uses GPU #'
,
deviceNumber
endif
endif
end
function
...
...
src/elpa2.F90
View file @
c6b56c7e
...
...
@@ -253,7 +253,7 @@ contains
endif
if
(
THIS_REAL_ELPA_KERNEL
.eq.
REAL_ELPA_KERNEL_GPU
)
then
if
(
check_for_gpu
(
my_pe
,
numberOfGPUDevices
))
then
if
(
check_for_gpu
(
my_pe
,
numberOfGPUDevices
,
wantDebug
=
wantDebug
))
then
useGPU
=
.true.
endif
if
(
nblk
.ne.
128
)
then
...
...
@@ -503,7 +503,7 @@ function solve_evp_complex_2stage(na, nev, a, lda, ev, q, ldq, nblk, &
endif
if
(
THIS_COMPLEX_ELPA_KERNEL
.eq.
COMPLEX_ELPA_KERNEL_GPU
)
then
if
(
check_for_gpu
(
my_pe
,
numberOfGPUDevices
))
then
if
(
check_for_gpu
(
my_pe
,
numberOfGPUDevices
,
wantDebug
=
wantDebug
))
then
useGPU
=
.true.
endif
if
(
nblk
.ne.
128
)
then
...
...
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