Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
b0232235
Commit
b0232235
authored
Mar 04, 2021
by
Andreas Marek
Browse files
Fix errors introduced with HIP
parent
935d6cb4
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/elpa2/compute_hh_trafo.F90
View file @
b0232235
...
...
@@ -185,8 +185,8 @@ last_stripe_width, kernel)
j
=
-99
if
(
wantDebug
)
then
if
(
useGPU
.and.
&
#ifdef WITH_NVIDIA_GPU_VERSION
if
(
useGPU
.and.
&
#if REALCASE == 1
(
kernel
.ne.
ELPA_2STAGE_REAL_NVIDIA_GPU
))
then
#endif
...
...
@@ -194,8 +194,11 @@ last_stripe_width, kernel)
(
kernel
.ne.
ELPA_2STAGE_COMPLEX_NVIDIA_GPU
))
then
#endif
print
*
,
"ERROR: useGPU is set in compute_hh_trafo but not a NVIDIA GPU kernel!"
stop
endif
#endif
#ifdef WITH_AMD_GPU_VERSION
if
(
useGPU
.and.
&
#if REALCASE == 1
(
kernel
.ne.
ELPA_2STAGE_REAL_AMD_GPU
))
then
#endif
...
...
@@ -203,9 +206,9 @@ last_stripe_width, kernel)
(
kernel
.ne.
ELPA_2STAGE_COMPLEX_AMD_GPU
))
then
#endif
print
*
,
"ERROR: useGPU is set in compute_hh_trafo but not a AMD GPU kernel!"
#endif
stop
endif
#endif
endif
#if REALCASE == 1
...
...
src/elpa2/elpa2_template.F90
View file @
b0232235
...
...
@@ -207,12 +207,15 @@
#if REALCASE == 1
#undef GPU_KERNEL
#define GPU_KERNEL ELPA_2STAGE_REAL_NVIDIA_GPU
#undef GENERIC_KERNEL
#undef KERNEL_STRING
#ifdef WITH_NVIDIA_GPU_VERSION
#undef GPU_KERNEL
#define GPU_KERNEL ELPA_2STAGE_REAL_NVIDIA_GPU
#endif
#ifdef WITH_AMD_GPU_VERSION
#undef GPU_KERNEL
#define GPU_KERNEL ELPA_2STAGE_REAL_AMD_GPU
#endif
#define GENERIC_KERNEL ELPA_2STAGE_REAL_GENERIC
...
...
@@ -221,12 +224,15 @@
#if COMPLEXCASE == 1
#undef GPU_KERNEL
#define GPU_KERNEL ELPA_2STAGE_COMPLEX_NVIDIA_GPU
#undef GENERIC_KERNEL
#undef KERNEL_STRING
#ifdef WITH_NVIDIA_GPU_VERSION
#define GPU_KERNEL ELPA_2STAGE_NVIDIA_COMPLEX_GPU
#undef GPU_KERNEL
#define GPU_KERNEL ELPA_2STAGE_COMPLEX_NVIDIA_GPU
#endif
#ifdef WITH_AMD_GPU_VERSION
#undef GPU_KERNEL
#define GPU_KERNEL ELPA_2STAGE_COMPLEX_AMD_GPU
#endif
#define GENERIC_KERNEL ELPA_2STAGE_COMPLEX_GENERIC
...
...
src/elpa_index.c
View file @
b0232235
...
...
@@ -776,9 +776,12 @@ static int real_kernel_is_valid(elpa_index_t index, int n, int new_value) {
switch
(
new_value
)
{
#ifdef WITH_NVIDIA_GPU_VERSION
ELPA_FOR_ALL_2STAGE_REAL_KERNELS
(
VALID_CASE_3
,
REAL_NVIDIA_GPU_KERNEL_ONLY_WHEN_GPU_IS_ACTIVE
)
#e
ndif
#e
lse
#ifdef WITH_AMD_GPU_VERSION
ELPA_FOR_ALL_2STAGE_REAL_KERNELS
(
VALID_CASE_3
,
REAL_AMD_GPU_KERNEL_ONLY_WHEN_GPU_IS_ACTIVE
)
#else
ELPA_FOR_ALL_2STAGE_REAL_KERNELS
(
VALID_CASE_3
,
REAL_NVIDIA_GPU_KERNEL_ONLY_WHEN_GPU_IS_ACTIVE
)
#endif
#endif
default:
return
0
;
...
...
@@ -822,9 +825,12 @@ static int complex_kernel_is_valid(elpa_index_t index, int n, int new_value) {
switch
(
new_value
)
{
#ifdef WITH_NVIDIA_GPU_VERISION
ELPA_FOR_ALL_2STAGE_COMPLEX_KERNELS
(
VALID_CASE_3
,
COMPLEX_NVIDIA_GPU_KERNEL_ONLY_WHEN_GPU_IS_ACTIVE
)
#e
ndif
#e
lse
#ifdef WITH_AMD_GPU_VERISION
ELPA_FOR_ALL_2STAGE_COMPLEX_KERNELS
(
VALID_CASE_3
,
COMPLEX_AMD_GPU_KERNEL_ONLY_WHEN_GPU_IS_ACTIVE
)
#else
ELPA_FOR_ALL_2STAGE_COMPLEX_KERNELS
(
VALID_CASE_3
,
COMPLEX_NVIDIA_GPU_KERNEL_ONLY_WHEN_GPU_IS_ACTIVE
)
#endif
#endif
default:
return
0
;
...
...
test/Fortran/test.F90
View file @
b0232235
...
...
@@ -199,7 +199,7 @@ program test
#ifdef WITH_OPENMP_TRADITIONAL
TEST_INT_TYPE
::
max_threads
,
threads_caller
#endif
#if
def
TEST_GPU_SET_ID
#if
TEST_GPU_SET_ID
== 1
TEST_INT_TYPE
::
gpuID
#endif
#ifdef SPLIT_COMM_MYSELF
...
...
@@ -643,7 +643,7 @@ program test
call
e
%
set
(
"nvidia-gpu"
,
TEST_GPU
,
error_elpa
)
assert_elpa_ok
(
error_elpa
)
#if
def
TEST_GPU_SET_ID
#if TEST_GPU_SET_ID
== 1
! simple test
! Can (and should) fail often
gpuID
=
mod
(
myid
,
2
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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