Commit 164c5759 authored by Andreas Marek's avatar Andreas Marek
Browse files

Cleanup of ELPA invert_impl signatures

parent e34fa742
......@@ -130,8 +130,7 @@ module elpa1_auxiliary_impl
!> \param mpi_comm_cols MPI communicator for columns
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function elpa_invert_trm_real_double_impl(na, a, lda, nblk, matrixCols, mpi_comm_rows, &
mpi_comm_cols, wantDebug) result(success)
function elpa_invert_trm_real_double_impl(obj, a) result(success)
#include "elpa_invert_trm.X90"
end function elpa_invert_trm_real_double_impl
#undef DOUBLE_PRECISION
......@@ -156,8 +155,7 @@ module elpa1_auxiliary_impl
!> \param mpi_comm_cols MPI communicator for columns
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function elpa_invert_trm_real_single_impl(na, a, lda, nblk, matrixCols, mpi_comm_rows, &
mpi_comm_cols, wantDebug) result(success)
function elpa_invert_trm_real_single_impl(obj, a) result(success)
#include "elpa_invert_trm.X90"
end function elpa_invert_trm_real_single_impl
#undef SINGLE_PRECISION
......@@ -242,8 +240,7 @@ module elpa1_auxiliary_impl
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function elpa_invert_trm_complex_double_impl(na, a, lda, nblk, matrixCols, mpi_comm_rows, &
mpi_comm_cols, wantDebug) result(success)
function elpa_invert_trm_complex_double_impl(obj, a) result(success)
#include "elpa_invert_trm.X90"
end function elpa_invert_trm_complex_double_impl
#undef DOUBLE_PRECISION
......@@ -269,8 +266,7 @@ module elpa1_auxiliary_impl
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function elpa_invert_trm_complex_single_impl(na, a, lda, nblk, matrixCols, mpi_comm_rows, &
mpi_comm_cols, wantDebug) result(success)
function elpa_invert_trm_complex_single_impl(obj, a) result(success)
#include "elpa_invert_trm.X90"
end function elpa_invert_trm_complex_single_impl
#undef SINGLE_PRECISION
......
......@@ -56,27 +56,29 @@
use elpa1_compute
use elpa_utilities
use elpa_mpi
use elpa_api
#ifdef HAVE_DETAILED_TIMINGS
use timings
#else
use timings_dummy
#endif
implicit none
class(elpa_t), intent(in) :: obj
integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
#if REALCASE == 1
#ifdef USE_ASSUMED_SIZE
real(kind=REAL_DATATYPE) :: a(lda,*)
real(kind=REAL_DATATYPE) :: a(obj%local_nrows,*)
#else
real(kind=REAL_DATATYPE) :: a(lda,matrixCols)
real(kind=REAL_DATATYPE) :: a(obj%local_nrows,obj%local_ncols)
#endif
#endif
#if COMPLEXCASE == 1
#ifdef USE_ASSUMED_SIZE
complex(kind=COMPLEX_DATATYPE) :: a(lda,*)
complex(kind=COMPLEX_DATATYPE) :: a(obj%local_nrows,*)
#else
complex(kind=COMPLEX_DATATYPE) :: a(lda,matrixCols)
complex(kind=COMPLEX_DATATYPE) :: a(obj%local_nrows,obj%local_ncols)
#endif
#endif
......@@ -89,11 +91,24 @@
#if COMPLEXCASE == 1
complex(kind=COMPLEX_DATATYPE), allocatable :: tmp1(:), tmp2(:,:), tmat1(:,:), tmat2(:,:)
#endif
logical, intent(in) :: wantDebug
logical :: wantDebug
logical :: success
integer(kind=ik) :: istat
character(200) :: errorMessage
na = obj%na
lda = obj%local_nrows
nblk = obj%nblk
matrixCols = obj%local_ncols
mpi_comm_rows = obj%get("mpi_comm_rows")
mpi_comm_cols = obj%get("mpi_comm_cols")
if (obj%get("wantDebug") == 1) then
wantDebug = .true.
else
wantDebug = .true.
endif
call timer%start("mpi_communication")
call mpi_comm_rank(mpi_comm_rows,my_prow,mpierr)
call mpi_comm_size(mpi_comm_rows,np_rows,mpierr)
......
......@@ -759,21 +759,8 @@ module elpa_impl
integer, optional :: error
logical :: success_l
integer(kind=c_int) :: error_actual
logical :: wantDebugIntern
if (self%get("wantDebug",error_actual) .eq. 1) then
if (error_actual .ne. ELPA_OK) then
print *,"Could not querry wantDebug"
stop
endif
wantDebugIntern = .true.
else
wantDebugIntern = .false.
endif
success_l = elpa_invert_trm_real_double_impl (self%na, a, self%local_nrows, self%nblk, &
self%local_ncols, self%get("mpi_comm_rows"), self%get("mpi_comm_cols"), &
wantDebugIntern)
success_l = elpa_invert_trm_real_double_impl (self, a)
if (present(error)) then
if (success_l) then
error = ELPA_OK
......@@ -799,22 +786,9 @@ module elpa_impl
integer, optional :: error
logical :: success_l
integer(kind=c_int) :: error_actual
logical :: wantDebugIntern
if (self%get("wantDebug",error_actual) .eq. 1) then
if (error_actual .ne. ELPA_OK) then
print *,"Could not querry wantDebug"
stop
endif
wantDebugIntern = .true.
else
wantDebugIntern = .false.
endif
#if WANT_SINGLE_PRECISION_REAL
success_l = elpa_invert_trm_real_single_impl (self%na, a, self%local_nrows, self%nblk, &
self%local_ncols, self%get("mpi_comm_rows"), self%get("mpi_comm_cols"), &
wantDebugIntern)
success_l = elpa_invert_trm_real_single_impl (self, a)
#else
print *,"This installation of the ELPA library has not been build with single-precision support"
error = ELPA_ERROR
......@@ -844,21 +818,8 @@ module elpa_impl
integer, optional :: error
logical :: success_l
integer(kind=c_int) :: error_actual
logical :: wantDebugIntern
if (self%get("wantDebug",error_actual) .eq. 1) then
if (error_actual .ne. ELPA_OK) then
print *,"Could not querry wantDebug"
stop
endif
wantDebugIntern = .true.
else
wantDebugIntern = .false.
endif
success_l = elpa_invert_trm_complex_double_impl (self%na, a, self%local_nrows, self%nblk, &
self%local_ncols, self%get("mpi_comm_rows"), self%get("mpi_comm_cols"), &
wantDebugIntern)
success_l = elpa_invert_trm_complex_double_impl (self, a)
if (present(error)) then
if (success_l) then
error = ELPA_OK
......@@ -884,22 +845,9 @@ module elpa_impl
integer, optional :: error
logical :: success_l
integer(kind=c_int) :: error_actual
logical :: wantDebugIntern
if (self%get("wantDebug",error_actual) .eq. 1) then
if (error_actual .ne. ELPA_OK) then
print *,"Could not querry wantDebug"
stop
endif
wantDebugIntern = .true.
else
wantDebugIntern = .false.
endif
#if WANT_SINGLE_PRECISION_COMPLEX
success_l = elpa_invert_trm_complex_single_impl (self%na, a, self%local_nrows, self%nblk, &
self%local_ncols, self%get("mpi_comm_rows"), self%get("mpi_comm_cols"), &
wantDebugIntern)
success_l = elpa_invert_trm_complex_single_impl (self, a)
#else
print *,"This installation of the ELPA library has not been build with single-precision support"
error = ELPA_ERROR
......
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