Commit 4768c659 authored by Andreas Marek's avatar Andreas Marek

Map old solve_tridi routines to new interface

parent d8799c6d
......@@ -127,7 +127,7 @@
call elpaAPI%invert_trm(a, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot run cholesky"
print *, "Cannot run invert_trm"
stop
success = .false.
return
......
......@@ -56,30 +56,70 @@
#include "../sanity.X90"
use elpa1_compute, solve_tridi_&
&PRECISION&
&_private => solve_tridi_&
&PRECISION
!use elpa1_compute, solve_tridi_&
! &PRECISION&
! &_private => solve_tridi_&
! &PRECISION
use precision
use elpa_type
#ifdef HAVE_DETAILED_TIMINGS
use timings
#else
use timings_dummy
#endif
implicit none
integer(kind=ik) :: na, nev, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
real(kind=REAL_DATATYPE) :: d(na), e(na)
#ifdef USE_ASSUMED_SIZE
real(kind=REAL_DATATYPE) :: q(ldq,*)
#else
!#ifdef USE_ASSUMED_SIZE
! real(kind=REAL_DATATYPE) :: q(ldq,*)
!#else
real(kind=REAL_DATATYPE) :: q(ldq,matrixCols)
#endif
!#endif
logical, intent(in) :: wantDebug
logical :: success
integer(kind=iK) :: successInternal
type(elpa_t) :: elpaAPI
call timer%start("elpa_solve_tridi_&
&PRECISION&
&_legacy_interface")
success = .false.
call solve_tridi_&
&PRECISION&
&_private(na, nev, d, e, q, ldq, nblk, matrixCols, &
mpi_comm_rows, mpi_comm_cols, wantDebug, success)
if (elpa_init(20170403) /= ELPA_OK) then
success = .false.
error stop "ELPA API version not supported"
endif
elpaAPI = elpa_create(na, nev, ldq, matrixCols, nblk, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot create elpa object"
success = .false.
stop
return
endif
call elpaAPI%set_comm_rows(mpi_comm_rows)
call elpaAPI%set_comm_cols(mpi_comm_cols)
call elpaAPI%solve_tridi(d, e, q, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot run solve_tridi"
stop
success = .false.
return
else
success =.true.
endif
call elpaAPI%destroy()
call elpa_uninit()
call timer%stop("elpa_solve_tridi_&
&PRECISION&
&_legacy_interface")
#undef REALCASE
#undef COMPLEXCASE
......
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