Commit 1a291901 authored by Andreas Marek's avatar Andreas Marek

Make ELPA 1stage, 2stage calls consistent: introduce useGPU also in ELPA 2stage

parent 690de1d9
......@@ -254,15 +254,15 @@ module ELPA
endif
if (useELPA1) then
success = elpa_solve_evp_real_1stage_double(na, nev, a, lda, ev, q, ldq, nblk, &
matrixCols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, &
useGPU = useGPU)
success = elpa_solve_evp_real_1stage_double(na, nev, a, lda, ev, q, ldq, nblk, &
matrixCols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, &
useGPU)
else
success = elpa_solve_evp_real_2stage_double(na, nev, a, lda, ev, q, ldq, nblk, &
success = elpa_solve_evp_real_2stage_double(na, nev, a, lda, ev, q, ldq, nblk, &
matrixCols, mpi_comm_rows, mpi_comm_cols, &
mpi_comm_all, &
THIS_REAL_ELPA_KERNEL_API = THIS_REAL_ELPA_KERNEL_API, &
useQR = useQR)
THIS_REAL_ELPA_KERNEL_API, &
useQR, useGPU)
endif
end function elpa_solve_evp_real_double
......@@ -356,13 +356,13 @@ module ELPA
if (useELPA1) then
success = elpa_solve_evp_real_1stage_single(na, nev, a, lda, ev, q, ldq, nblk, &
matrixCols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, &
useGPU = useGPU)
useGPU)
else
success = elpa_solve_evp_real_2stage_single(na, nev, a, lda, ev, q, ldq, nblk, &
matrixCols, mpi_comm_rows, mpi_comm_cols, &
mpi_comm_all, &
THIS_REAL_ELPA_KERNEL_API = THIS_REAL_ELPA_KERNEL_API, &
useQR = useQR)
THIS_REAL_ELPA_KERNEL_API, &
useQR, useGPU)
endif
end function elpa_solve_evp_real_single
......@@ -460,7 +460,7 @@ module ELPA
success = elpa_solve_evp_complex_2stage_double(na, nev, a, lda, ev, q, ldq, nblk, &
matrixCols, mpi_comm_rows, mpi_comm_cols, &
mpi_comm_all, &
THIS_COMPLEX_ELPA_KERNEL_API = THIS_COMPLEX_ELPA_KERNEL_API)
THIS_COMPLEX_ELPA_KERNEL_API, useGPU)
endif
end function elpa_solve_evp_complex_double
......@@ -557,7 +557,7 @@ module ELPA
success = elpa_solve_evp_complex_2stage_single(na, nev, a, lda, ev, q, ldq, nblk, &
matrixCols, mpi_comm_rows, mpi_comm_cols, &
mpi_comm_all, &
THIS_COMPLEX_ELPA_KERNEL_API = THIS_COMPLEX_ELPA_KERNEL_API)
THIS_COMPLEX_ELPA_KERNEL_API,useGPU)
endif
end function elpa_solve_evp_complex_single
......
This diff is collapsed.
This diff is collapsed.
......@@ -92,7 +92,7 @@ int main(int argc, char** argv) {
int success;
int THIS_COMPLEX_ELPA_KERNEL_API;
int THIS_COMPLEX_ELPA_KERNEL_API, useGPU;
#ifdef WITH_MPI
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
......@@ -229,11 +229,12 @@ int main(int argc, char** argv) {
#ifdef WITH_MPI
mpierr = MPI_Barrier(MPI_COMM_WORLD);
#endif
useGPU = 0;
THIS_COMPLEX_ELPA_KERNEL_API = ELPA2_COMPLEX_KERNEL_GENERIC;
#ifdef DOUBLE_PRECISION_COMPLEX
success = elpa_solve_evp_complex_2stage_double_precision(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API);
success = elpa_solve_evp_complex_2stage_double_precision(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API, useGPU);
#else
success = elpa_solve_evp_complex_2stage_single_precision(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API);
success = elpa_solve_evp_complex_2stage_single_precision(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API, useGPU);
#endif
if (success != 1) {
......
......@@ -87,7 +87,7 @@ int main(int argc, char** argv) {
int success;
int useQr, THIS_REAL_ELPA_KERNEL_API;
int useQr, THIS_REAL_ELPA_KERNEL_API, useGPU;
#ifdef WITH_MPI
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
......@@ -215,12 +215,13 @@ int main(int argc, char** argv) {
#ifdef WITH_MPI
mpierr = MPI_Barrier(MPI_COMM_WORLD);
#endif
useGPU =0 ;
useQr = 0;
THIS_REAL_ELPA_KERNEL_API = ELPA2_REAL_KERNEL_GENERIC;
#ifdef DOUBLE_PRECISION_REAL
success = elpa_solve_evp_real_2stage_double_precision(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_REAL_ELPA_KERNEL_API, useQr);
success = elpa_solve_evp_real_2stage_double_precision(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_REAL_ELPA_KERNEL_API, useQr, useGPU);
#else
success = elpa_solve_evp_real_2stage_single_precision(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_REAL_ELPA_KERNEL_API, useQr);
success = elpa_solve_evp_real_2stage_single_precision(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_REAL_ELPA_KERNEL_API, useQr, useGPU);
#endif
if (success != 1) {
printf("error in ELPA solve \n");
......
......@@ -140,6 +140,7 @@ program test_complex2_gpu_version_double_precision
type(output_t) :: write_to_file
character(len=8) :: task_suffix
integer(kind=ik) :: j
logical :: useGPU
#define DOUBLE_PRECISION_COMPLEX 1
......@@ -291,9 +292,11 @@ program test_complex2_gpu_version_double_precision
#ifdef WITH_MPI
call mpi_barrier(mpi_comm_world, mpierr) ! for correct timings only
#endif
useGPU = .true.
successELPA = elpa_solve_evp_complex_2stage_double(na, nev, a, na_rows, ev, z, na_rows, nblk, &
na_cols, mpi_comm_rows, mpi_comm_cols, mpi_comm_world, &
COMPLEX_ELPA_KERNEL_GPU)
COMPLEX_ELPA_KERNEL_GPU, useGPU)
if (.not.(successELPA)) then
......
......@@ -140,6 +140,7 @@ program test_complex2_gpu_version_single_precision
type(output_t) :: write_to_file
character(len=8) :: task_suffix
integer(kind=ik) :: j
logical :: useGPU
#define DOUBLE_PRECISION_COMPLEX 1
......@@ -291,9 +292,10 @@ program test_complex2_gpu_version_single_precision
#ifdef WITH_MPI
call mpi_barrier(mpi_comm_world, mpierr) ! for correct timings only
#endif
useGPU = .true.
successELPA = elpa_solve_evp_complex_2stage_single(na, nev, a, na_rows, ev, z, na_rows, nblk, &
na_cols, mpi_comm_rows, mpi_comm_cols, mpi_comm_world, &
COMPLEX_ELPA_KERNEL_GPU)
COMPLEX_ELPA_KERNEL_GPU, useGPU)
if (.not.(successELPA)) then
......
......@@ -136,6 +136,7 @@ program test_real2_gpu_version_double_precision
type(output_t) :: write_to_file
character(len=8) :: task_suffix
integer(kind=ik) :: j
logical :: useGPU
#define DOUBLE_PRECISION_REAL 1
......@@ -283,9 +284,10 @@ program test_real2_gpu_version_double_precision
#ifdef WITH_MPI
call mpi_barrier(mpi_comm_world, mpierr) ! for correct timings only
#endif
useGPU = .true.
successELPA = elpa_solve_evp_real_2stage_double(na, nev, a, na_rows, ev, z, na_rows, nblk, &
na_cols, mpi_comm_rows, mpi_comm_cols, mpi_comm_world, &
REAL_ELPA_KERNEL_GPU)
REAL_ELPA_KERNEL_GPU, useGPU=useGPU)
if (.not.(successELPA)) then
......
......@@ -136,6 +136,7 @@ program test_real2_gpu_version_single_precision
type(output_t) :: write_to_file
character(len=8) :: task_suffix
integer(kind=ik) :: j
logical :: useGPU
#define DOUBLE_PRECISION_REAL 1
......@@ -283,9 +284,10 @@ program test_real2_gpu_version_single_precision
#ifdef WITH_MPI
call mpi_barrier(mpi_comm_world, mpierr) ! for correct timings only
#endif
useGPU = .true.
successELPA = elpa_solve_evp_real_2stage_single(na, nev, a, na_rows, ev, z, na_rows, nblk, &
na_cols, mpi_comm_rows, mpi_comm_cols, mpi_comm_world, &
REAL_ELPA_KERNEL_GPU)
REAL_ELPA_KERNEL_GPU, useGPU=useGPU)
if (.not.(successELPA)) then
......
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