Commit 3dd3895e authored by Andreas Marek's avatar Andreas Marek

Save guard against unknown values for string "method"

parent 5a8e72ec
......@@ -217,6 +217,7 @@ module elpa
mpi_comm_all, THIS_REAL_ELPA_KERNEL_API, &
useQR, method) result(success)
use iso_c_binding
use elpa_utilities
implicit none
integer(kind=c_int), intent(in) :: na, nev, lda, ldq, matrixCols, mpi_comm_rows, &
mpi_comm_cols, mpi_comm_all
......@@ -243,6 +244,9 @@ module elpa
useELPA1 = .false.
else if (trim(method) .eq. "auto" .or. trim(method) .eq. "AUTO") then
useELPA1 = .false.
else
write(error_unit,*) "Specified method not known! Using ELPA 2-stage"
useELPA1 = .false.
endif
endif
......@@ -258,6 +262,7 @@ module elpa
endif
end function elpa_solve_evp_real_double
#ifdef WANT_SINGLE_PRECISION_REAL
!-------------------------------------------------------------------------------
!> \brief solve_evp_real_single: Fortran function to solve the real eigenvalue
......@@ -310,6 +315,7 @@ module elpa
mpi_comm_all, THIS_REAL_ELPA_KERNEL_API, &
useQR, method) result(success)
use iso_c_binding
use elpa_utilities
implicit none
integer(kind=c_int), intent(in) :: na, nev, lda, ldq, matrixCols, mpi_comm_rows, &
mpi_comm_cols, mpi_comm_all
......@@ -336,6 +342,9 @@ module elpa
useELPA1 = .false.
else if (trim(method) .eq. "auto" .or. trim(method) .eq. "AUTO") then
useELPA1 = .false.
else
write(error_unit,*) "Specified method not known! Using ELPA 2-stage"
useELPA1 = .false.
endif
endif
......@@ -402,6 +411,8 @@ module elpa
mpi_comm_all, THIS_COMPLEX_ELPA_KERNEL_API,&
method) result(success)
use iso_c_binding
use elpa_utilities
implicit none
integer(kind=c_int), intent(in) :: na, nev, lda, ldq, matrixCols, mpi_comm_rows, &
mpi_comm_cols, mpi_comm_all
......@@ -427,6 +438,9 @@ module elpa
useELPA1 = .false.
else if (trim(method) .eq. "auto" .or. trim(method) .eq. "AUTO") then
useELPA1 = .false.
else
write(error_unit,*) "Specified method not known! Using ELPA 2-stage"
useELPA1 = .false.
endif
endif
......@@ -492,6 +506,7 @@ module elpa
mpi_comm_all, THIS_COMPLEX_ELPA_KERNEL_API,&
method) result(success)
use iso_c_binding
use elpa_utilities
implicit none
integer(kind=c_int), intent(in) :: na, nev, lda, ldq, matrixCols, mpi_comm_rows, &
mpi_comm_cols, mpi_comm_all
......@@ -517,6 +532,9 @@ module elpa
useELPA1 = .false.
else if (trim(method) .eq. "auto" .or. trim(method) .eq. "AUTO") then
useELPA1 = .false.
else
write(error_unit,*) "Specified method not known! Using ELPA 2-stage"
useELPA1 = .false.
endif
endif
......
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