Commit b0232235 authored by Andreas Marek's avatar Andreas Marek
Browse files

Fix errors introduced with HIP

parent 935d6cb4
......@@ -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
......
......@@ -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
......
......@@ -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)
#endif
#else
#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)
#endif
#else
#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;
......
......@@ -199,7 +199,7 @@ program test
#ifdef WITH_OPENMP_TRADITIONAL
TEST_INT_TYPE :: max_threads, threads_caller
#endif
#ifdef 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)
#ifdef TEST_GPU_SET_ID
#if TEST_GPU_SET_ID == 1
! simple test
! Can (and should) fail often
gpuID = mod(myid,2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment