Commit b680e94d authored by Pavel Kus's avatar Pavel Kus
Browse files

scalapack descriptor not a parameter of gneralized evp routines

instead, blacs context has to be set beforehand
parent bf2adee4
......@@ -70,11 +70,10 @@
* \param ev on return: float/double pointer to eigenvalues
* \param q on return: float/double float complex/double complex pointer to eigenvectors
* \param is_already_decomposed set to 1, if b already decomposed by previous call to elpa_generalized
* \param sc_desc scalapack descriptor
* \param error on return the error code, which can be queried with elpa_strerr()
* \result void
*/
#define elpa_generalized_eigenvectors(handle, a, b, ev, q, sc_desc, is_already_decomposed, error) _Generic((a), \
#define elpa_generalized_eigenvectors(handle, a, b, ev, q, is_already_decomposed, error) _Generic((a), \
double*: \
elpa_generalized_eigenvectors_d, \
\
......@@ -86,7 +85,7 @@
\
float complex*: \
elpa_generalized_eigenvectors_fc \
)(handle, a, b, ev, q, sc_desc, is_already_decomposed, error)
)(handle, a, b, ev, q, is_already_decomposed, error)
/*! \brief generic C method for elpa_eigenvalues
......
......@@ -824,7 +824,7 @@ module elpa_api
!> \param is_already_decomposed logical, input: is it repeated call with the same b (decomposed in the fist call)?
!> \result error integer, optional : error code, which can be queried with elpa_strerr
abstract interface
subroutine elpa_generalized_eigenvectors_d_i(self, a, b, ev, q, sc_desc, is_already_decomposed, error)
subroutine elpa_generalized_eigenvectors_d_i(self, a, b, ev, q, is_already_decomposed, error)
use iso_c_binding
use elpa_constants
import elpa_t
......@@ -837,7 +837,6 @@ module elpa_api
q(self%local_nrows, self%local_ncols)
#endif
real(kind=c_double) :: ev(self%na)
integer :: sc_desc(SC_DESC_LEN)
logical :: is_already_decomposed
integer, optional :: error
end subroutine
......@@ -862,7 +861,7 @@ module elpa_api
!> \param is_already_decomposed logical, input: is it repeated call with the same b (decomposed in the fist call)?
!> \result error integer, optional : error code, which can be queried with elpa_strerr
abstract interface
subroutine elpa_generalized_eigenvectors_f_i(self, a, b, ev, q, sc_desc, is_already_decomposed, error)
subroutine elpa_generalized_eigenvectors_f_i(self, a, b, ev, q, is_already_decomposed, error)
use iso_c_binding
use elpa_constants
import elpa_t
......@@ -875,7 +874,6 @@ module elpa_api
q(self%local_nrows, self%local_ncols)
#endif
real(kind=c_float) :: ev(self%na)
integer :: sc_desc(SC_DESC_LEN)
logical :: is_already_decomposed
integer, optional :: error
......@@ -901,7 +899,7 @@ module elpa_api
!> \param is_already_decomposed logical, input: is it repeated call with the same b (decomposed in the fist call)?
!> \result error integer, optional : error code, which can be queried with elpa_strerr
abstract interface
subroutine elpa_generalized_eigenvectors_dc_i(self, a, b, ev, q, sc_desc, is_already_decomposed, error)
subroutine elpa_generalized_eigenvectors_dc_i(self, a, b, ev, q, is_already_decomposed, error)
use iso_c_binding
use elpa_constants
import elpa_t
......@@ -915,7 +913,6 @@ module elpa_api
q(self%local_nrows, self%local_ncols)
#endif
real(kind=c_double) :: ev(self%na)
integer :: sc_desc(SC_DESC_LEN)
logical :: is_already_decomposed
integer, optional :: error
......@@ -941,7 +938,7 @@ module elpa_api
!> \param is_already_decomposed logical, input: is it repeated call with the same b (decomposed in the fist call)?
!> \result error integer, optional : error code, which can be queried with elpa_strerr
abstract interface
subroutine elpa_generalized_eigenvectors_fc_i(self, a, b, ev, q, sc_desc, is_already_decomposed, error)
subroutine elpa_generalized_eigenvectors_fc_i(self, a, b, ev, q, is_already_decomposed, error)
use iso_c_binding
use elpa_constants
import elpa_t
......@@ -954,7 +951,6 @@ module elpa_api
q(self%local_nrows, self%local_ncols)
#endif
real(kind=c_float) :: ev(self%na)
integer :: sc_desc(SC_DESC_LEN)
logical :: is_already_decomposed
integer, optional :: error
......
......@@ -156,6 +156,7 @@ module elpa_impl
procedure, public :: autotune_step => elpa_autotune_step
procedure, public :: autotune_set_best => elpa_autotune_set_best
procedure, private :: construct_scalapack_descriptor => elpa_construct_scalapack_descriptor
end type elpa_impl_t
!> \brief the implementation of the generic methods
......@@ -343,6 +344,32 @@ module elpa_impl
error = self%setup()
end function
function elpa_construct_scalapack_descriptor(self, sc_desc) result(error)
class(elpa_impl_t), intent(inout) :: self
integer :: error, blacs_ctx
integer, intent(out) :: sc_desc(SC_DESC_LEN)
#ifdef WITH_MPI
if (self%is_set("blacs_context") == 0) then
print *,"BLACS context has not been set beforehand. Aborting..."
stop
endif
call self%get("blacs_context", blacs_ctx, error)
sc_desc(1) = 1
sc_desc(2) = blacs_ctx
sc_desc(3) = self%na
sc_desc(4) = self%na
sc_desc(5) = self%nblk
sc_desc(6) = self%nblk
sc_desc(7) = 0
sc_desc(8) = 0
sc_desc(9) = self%local_nrows
#else
sc_desc = 0
#endif
error = ELPA_OK
end function
!c> /*! \brief C interface for the implementation of the elpa_set_integer method
!c> * This method is available to the user as C generic elpa_set method
......@@ -1515,14 +1542,12 @@ module elpa_impl
!> Must be always dimensioned to the full size (corresponding to (na,na))
!> even if only a part of the eigenvalues is needed.
!>
!> \param sc_desc scalapack descriptor
!>
!> \param is_already_decomposed has to be set to .false. for the first call with a given b and .true. for
!> each subsequent call with the same b, since b then already contains
!> decomposition and thus the decomposing step is skipped
!>
!> \param error integer, optional: returns an error code, which can be queried with elpa_strerr
subroutine elpa_generalized_eigenvectors_d(self, a, b, ev, q, sc_desc, is_already_decomposed, error)
subroutine elpa_generalized_eigenvectors_d(self, a, b, ev, q, is_already_decomposed, error)
use elpa2_impl
use elpa1_impl
use elpa_utilities, only : error_unit
......@@ -1536,7 +1561,6 @@ module elpa_impl
q(self%local_nrows, self%local_ncols)
#endif
real(kind=c_double) :: ev(self%na)
integer :: sc_desc(SC_DESC_LEN)
logical :: is_already_decomposed
integer, optional :: error
......@@ -1544,7 +1568,7 @@ module elpa_impl
integer(kind=c_int) :: solver
logical :: success_l
call self%elpa_transform_generalized_d(a, b, sc_desc, is_already_decomposed, error_l)
call self%elpa_transform_generalized_d(a, b, is_already_decomposed, error_l)
if (present(error)) then
error = error_l
else if (error_l .ne. ELPA_OK) then
......@@ -1572,7 +1596,7 @@ module elpa_impl
write(error_unit,'(a)') "ELPA: Error in solve() and you did not check for errors!"
endif
call self%elpa_transform_back_generalized_d(b, q, sc_desc, error_l)
call self%elpa_transform_back_generalized_d(b, q, error_l)
if (present(error)) then
error = error_l
else if (error_l .ne. ELPA_OK) then
......@@ -1581,15 +1605,14 @@ module elpa_impl
end subroutine
!c> void elpa_generalized_eigenvectors_d(elpa_t handle, double *a, double *b, double *ev, double *q,
!c> int sc_desc[9], int is_already_decomposed, int *error);
subroutine elpa_generalized_eigenvectors_d_c(handle, a_p, b_p, ev_p, q_p, sc_desc_p, is_already_decomposed, error) &
!c> int is_already_decomposed, int *error);
subroutine elpa_generalized_eigenvectors_d_c(handle, a_p, b_p, ev_p, q_p, is_already_decomposed, error) &
bind(C, name="elpa_generalized_eigenvectors_d")
type(c_ptr), intent(in), value :: handle, a_p, b_p, ev_p, q_p, sc_desc_p
type(c_ptr), intent(in), value :: handle, a_p, b_p, ev_p, q_p
integer(kind=c_int), intent(in), value :: is_already_decomposed
integer(kind=c_int), optional, intent(in) :: error
real(kind=c_double), pointer :: a(:, :), b(:, :), q(:, :), ev(:)
integer(kind=c_int), pointer :: sc_desc(:)
logical :: is_already_decomposed_fortran
type(elpa_impl_t), pointer :: self
......@@ -1598,14 +1621,13 @@ module elpa_impl
call c_f_pointer(b_p, b, [self%local_nrows, self%local_ncols])
call c_f_pointer(ev_p, ev, [self%na])
call c_f_pointer(q_p, q, [self%local_nrows, self%local_ncols])
call c_f_pointer(sc_desc_p, sc_desc, [SC_DESC_LEN])
if(is_already_decomposed .eq. 0) then
is_already_decomposed_fortran = .false.
else
is_already_decomposed_fortran = .true.
end if
call elpa_generalized_eigenvectors_d(self, a, b, ev, q, sc_desc, is_already_decomposed_fortran, error)
call elpa_generalized_eigenvectors_d(self, a, b, ev, q, is_already_decomposed_fortran, error)
end subroutine
......@@ -1638,14 +1660,12 @@ module elpa_impl
!> Must be always dimensioned to the full size (corresponding to (na,na))
!> even if only a part of the eigenvalues is needed.
!>
!> \param sc_desc scalapack descriptor
!>
!> \param is_already_decomposed has to be set to .false. for the first call with a given b and .true. for
!> each subsequent call with the same b, since b then already contains
!> decomposition and thus the decomposing step is skipped
!>
!> \param error integer, optional: returns an error code, which can be queried with elpa_strerr
subroutine elpa_generalized_eigenvectors_f(self, a, b, ev, q, sc_desc, is_already_decomposed, error)
subroutine elpa_generalized_eigenvectors_f(self, a, b, ev, q, is_already_decomposed, error)
use elpa2_impl
use elpa1_impl
use elpa_utilities, only : error_unit
......@@ -1658,7 +1678,6 @@ module elpa_impl
q(self%local_nrows, self%local_ncols)
#endif
real(kind=c_float) :: ev(self%na)
integer :: sc_desc(SC_DESC_LEN)
integer, optional :: error
logical :: is_already_decomposed
......@@ -1667,7 +1686,7 @@ module elpa_impl
#ifdef WANT_SINGLE_PRECISION_REAL
logical :: success_l
call self%elpa_transform_generalized_f(a, b, sc_desc, is_already_decomposed, error_l)
call self%elpa_transform_generalized_f(a, b, is_already_decomposed, error_l)
if (present(error)) then
error = error_l
else if (error_l .ne. ELPA_OK) then
......@@ -1695,7 +1714,7 @@ module elpa_impl
write(error_unit,'(a)') "ELPA: Error in solve() and you did not check for errors!"
endif
call self%elpa_transform_back_generalized_f(b, q, sc_desc, error_l)
call self%elpa_transform_back_generalized_f(b, q, error_l)
if (present(error)) then
error = error_l
else if (error_l .ne. ELPA_OK) then
......@@ -1709,15 +1728,14 @@ module elpa_impl
!c> void elpa_generalized_eigenvectors_f(elpa_t handle, float *a, float *b, float *ev, float *q,
!c> int sc_desc[9], int is_already_decomposed, int *error);
subroutine elpa_generalized_eigenvectors_f_c(handle, a_p, b_p, ev_p, q_p, sc_desc_p, is_already_decomposed, error) &
!c> int is_already_decomposed, int *error);
subroutine elpa_generalized_eigenvectors_f_c(handle, a_p, b_p, ev_p, q_p, is_already_decomposed, error) &
bind(C, name="elpa_generalized_eigenvectors_f")
type(c_ptr), intent(in), value :: handle, a_p, b_p, ev_p, q_p, sc_desc_p
type(c_ptr), intent(in), value :: handle, a_p, b_p, ev_p, q_p
integer(kind=c_int), intent(in), value :: is_already_decomposed
integer(kind=c_int), optional, intent(in) :: error
real(kind=c_float), pointer :: a(:, :), b(:, :), q(:, :), ev(:)
integer(kind=c_int), pointer :: sc_desc(:)
logical :: is_already_decomposed_fortran
type(elpa_impl_t), pointer :: self
......@@ -1726,14 +1744,13 @@ module elpa_impl
call c_f_pointer(b_p, b, [self%local_nrows, self%local_ncols])
call c_f_pointer(ev_p, ev, [self%na])
call c_f_pointer(q_p, q, [self%local_nrows, self%local_ncols])
call c_f_pointer(sc_desc_p, sc_desc, [SC_DESC_LEN])
if(is_already_decomposed .eq. 0) then
is_already_decomposed_fortran = .false.
else
is_already_decomposed_fortran = .true.
end if
call elpa_generalized_eigenvectors_f(self, a, b, ev, q, sc_desc, is_already_decomposed_fortran, error)
call elpa_generalized_eigenvectors_f(self, a, b, ev, q, is_already_decomposed_fortran, error)
end subroutine
......@@ -1766,14 +1783,12 @@ module elpa_impl
!> Must be always dimensioned to the full size (corresponding to (na,na))
!> even if only a part of the eigenvalues is needed.
!>
!> \param sc_desc scalapack descriptor
!>
!> \param is_already_decomposed has to be set to .false. for the first call with a given b and .true. for
!> each subsequent call with the same b, since b then already contains
!> decomposition and thus the decomposing step is skipped
!>
!> \param error integer, optional: returns an error code, which can be queried with elpa_strerr
subroutine elpa_generalized_eigenvectors_dc(self, a, b, ev, q, sc_desc, is_already_decomposed, error)
subroutine elpa_generalized_eigenvectors_dc(self, a, b, ev, q, is_already_decomposed, error)
use elpa2_impl
use elpa1_impl
use elpa_utilities, only : error_unit
......@@ -1787,7 +1802,6 @@ module elpa_impl
q(self%local_nrows, self%local_ncols)
#endif
real(kind=c_double) :: ev(self%na)
integer :: sc_desc(SC_DESC_LEN)
integer, optional :: error
logical :: is_already_decomposed
......@@ -1795,7 +1809,7 @@ module elpa_impl
integer(kind=c_int) :: solver
logical :: success_l
call self%elpa_transform_generalized_dc(a, b, sc_desc, is_already_decomposed, error_l)
call self%elpa_transform_generalized_dc(a, b, is_already_decomposed, error_l)
if (present(error)) then
error = error_l
else if (error_l .ne. ELPA_OK) then
......@@ -1823,7 +1837,7 @@ module elpa_impl
write(error_unit,'(a)') "ELPA: Error in solve() and you did not check for errors!"
endif
call self%elpa_transform_back_generalized_dc(b, q, sc_desc, error_l)
call self%elpa_transform_back_generalized_dc(b, q, error_l)
if (present(error)) then
error = error_l
else if (error_l .ne. ELPA_OK) then
......@@ -1833,16 +1847,15 @@ module elpa_impl
!c> void elpa_generalized_eigenvectors_dc(elpa_t handle, double complex *a, double complex *b, double *ev, double complex *q,
!c> int sc_desc[9], int is_already_decomposed, int *error);
subroutine elpa_generalized_eigenvectors_dc_c(handle, a_p, b_p, ev_p, q_p, sc_desc_p, is_already_decomposed, error) &
!c> int is_already_decomposed, int *error);
subroutine elpa_generalized_eigenvectors_dc_c(handle, a_p, b_p, ev_p, q_p, is_already_decomposed, error) &
bind(C, name="elpa_generalized_eigenvectors_dc")
type(c_ptr), intent(in), value :: handle, a_p, b_p, ev_p, q_p, sc_desc_p
type(c_ptr), intent(in), value :: handle, a_p, b_p, ev_p, q_p
integer(kind=c_int), intent(in), value :: is_already_decomposed
integer(kind=c_int), optional, intent(in) :: error
complex(kind=c_double_complex), pointer :: a(:, :), b(:, :), q(:, :)
real(kind=c_double), pointer :: ev(:)
integer(kind=c_int), pointer :: sc_desc(:)
logical :: is_already_decomposed_fortran
type(elpa_impl_t), pointer :: self
......@@ -1851,14 +1864,13 @@ module elpa_impl
call c_f_pointer(b_p, b, [self%local_nrows, self%local_ncols])
call c_f_pointer(ev_p, ev, [self%na])
call c_f_pointer(q_p, q, [self%local_nrows, self%local_ncols])
call c_f_pointer(sc_desc_p, sc_desc, [SC_DESC_LEN])
if(is_already_decomposed .eq. 0) then
is_already_decomposed_fortran = .false.
else
is_already_decomposed_fortran = .true.
end if
call elpa_generalized_eigenvectors_dc(self, a, b, ev, q, sc_desc, is_already_decomposed_fortran, error)
call elpa_generalized_eigenvectors_dc(self, a, b, ev, q, is_already_decomposed_fortran, error)
end subroutine
......@@ -1891,14 +1903,12 @@ module elpa_impl
!> Must be always dimensioned to the full size (corresponding to (na,na))
!> even if only a part of the eigenvalues is needed.
!>
!> \param sc_desc scalapack descriptor
!>
!> \param is_already_decomposed has to be set to .false. for the first call with a given b and .true. for
!> each subsequent call with the same b, since b then already contains
!> decomposition and thus the decomposing step is skipped
!>
!> \param error integer, optional: returns an error code, which can be queried with elpa_strerr
subroutine elpa_generalized_eigenvectors_fc(self, a, b, ev, q, sc_desc, is_already_decomposed, error)
subroutine elpa_generalized_eigenvectors_fc(self, a, b, ev, q, is_already_decomposed, error)
use elpa2_impl
use elpa1_impl
use elpa_utilities, only : error_unit
......@@ -1912,7 +1922,6 @@ module elpa_impl
q(self%local_nrows, self%local_ncols)
#endif
real(kind=c_float) :: ev(self%na)
integer :: sc_desc(SC_DESC_LEN)
integer, optional :: error
logical :: is_already_decomposed
......@@ -1921,7 +1930,7 @@ module elpa_impl
#ifdef WANT_SINGLE_PRECISION_COMPLEX
logical :: success_l
call self%elpa_transform_generalized_fc(a, b, sc_desc, is_already_decomposed, error_l)
call self%elpa_transform_generalized_fc(a, b, is_already_decomposed, error_l)
if (present(error)) then
error = error_l
else if (error_l .ne. ELPA_OK) then
......@@ -1949,7 +1958,7 @@ module elpa_impl
write(error_unit,'(a)') "ELPA: Error in solve() and you did not check for errors!"
endif
call self%elpa_transform_back_generalized_fc(b, q, sc_desc, error_l)
call self%elpa_transform_back_generalized_fc(b, q, error_l)
if (present(error)) then
error = error_l
else if (error_l .ne. ELPA_OK) then
......@@ -1963,16 +1972,15 @@ module elpa_impl
!c> void elpa_generalized_eigenvectors_fc(elpa_t handle, float complex *a, float complex *b, float *ev, float complex *q,
!c> int sc_desc[9], int is_already_decomposed, int *error);
subroutine elpa_generalized_eigenvectors_fc_c(handle, a_p, b_p, ev_p, q_p, sc_desc_p, is_already_decomposed, error) &
!c> int is_already_decomposed, int *error);
subroutine elpa_generalized_eigenvectors_fc_c(handle, a_p, b_p, ev_p, q_p, is_already_decomposed, error) &
bind(C, name="elpa_generalized_eigenvectors_fc")
type(c_ptr), intent(in), value :: handle, a_p, b_p, ev_p, q_p, sc_desc_p
type(c_ptr), intent(in), value :: handle, a_p, b_p, ev_p, q_p
integer(kind=c_int), intent(in), value :: is_already_decomposed
integer(kind=c_int), optional, intent(in) :: error
complex(kind=c_float_complex), pointer :: a(:, :), b(:, :), q(:, :)
real(kind=c_float), pointer :: ev(:)
integer(kind=c_int), pointer :: sc_desc(:)
logical :: is_already_decomposed_fortran
type(elpa_impl_t), pointer :: self
......@@ -1981,14 +1989,13 @@ module elpa_impl
call c_f_pointer(b_p, b, [self%local_nrows, self%local_ncols])
call c_f_pointer(ev_p, ev, [self%na])
call c_f_pointer(q_p, q, [self%local_nrows, self%local_ncols])
call c_f_pointer(sc_desc_p, sc_desc, [SC_DESC_LEN])
if(is_already_decomposed .eq. 0) then
is_already_decomposed_fortran = .false.
else
is_already_decomposed_fortran = .true.
end if
call elpa_generalized_eigenvectors_fc(self, a, b, ev, q, sc_desc, is_already_decomposed_fortran, error)
call elpa_generalized_eigenvectors_fc(self, a, b, ev, q, is_already_decomposed_fortran, error)
end subroutine
#endif
......
#if 0
subroutine elpa_transform_generalized_&
&ELPA_IMPL_SUFFIX&
&(self, a, b, sc_desc, is_already_decomposed, error)
&(self, a, b, is_already_decomposed, error)
implicit none
#include "general/precision_kinds.F90"
class(elpa_impl_t) :: self
......@@ -12,7 +12,7 @@
#endif
integer :: error
logical :: is_already_decomposed
integer :: sc_desc(9)
integer :: sc_desc(SC_DESC_LEN)
! using elpa internal Hermitian multiply is faster then scalapack multiply, but we need an extra
! temporary variable. Therefore both options are provided and at the moment controled by this switch
......@@ -24,6 +24,9 @@
call self%timer_start("transform_generalized()")
error = self%construct_scalapack_descriptor(sc_desc)
if(error .NE. ELPA_OK) return
if (.not. is_already_decomposed) then
! B = U^T*U, B<-U
call self%elpa_cholesky_&
......@@ -85,7 +88,7 @@
subroutine elpa_transform_back_generalized_&
&ELPA_IMPL_SUFFIX&
&(self, b, q, sc_desc, error)
&(self, b, q, error)
implicit none
#include "general/precision_kinds.F90"
class(elpa_impl_t) :: self
......@@ -95,10 +98,13 @@
MATH_DATATYPE(kind=rck) :: b(self%local_nrows, self%local_ncols), q(self%local_nrows, self%local_ncols)
#endif
integer :: error
integer :: sc_desc(9)
integer :: sc_desc(SC_DESC_LEN)
call self%timer_start("transform_back_generalized()")
error = self%construct_scalapack_descriptor(sc_desc)
if(error .NE. ELPA_OK) return
!todo: part of eigenvectors only
call self%timer_start("scalapack multiply inv(U) * Q")
#ifdef WITH_MPI
......
......@@ -139,6 +139,7 @@ static const elpa_index_int_entry_t int_entries[] = {
INT_ANY_ENTRY("mpi_comm_rows", "Communicator for inter-row communication"),
INT_ANY_ENTRY("mpi_comm_cols", "Communicator for inter-column communication"),
INT_ANY_ENTRY("mpi_comm_parent", "Parent communicator"),
INT_ANY_ENTRY("blacs_context", "BLACS context"),
INT_ENTRY("solver", "Solver to use", ELPA_SOLVER_1STAGE, ELPA_AUTOTUNE_FAST, ELPA_AUTOTUNE_DOMAIN_ANY, \
number_of_solvers, solver_enumerate, solver_is_valid, elpa_solver_name),
INT_ENTRY("gpu", "Use GPU acceleration", 0, ELPA_AUTOTUNE_NOT_TUNABLE, ELPA_AUTOTUNE_DOMAIN_ANY,
......
......@@ -229,6 +229,10 @@ int main(int argc, char** argv) {
elpa_set(handle, "process_col", my_pcol, &error);
assert_elpa_ok(error);
#endif
#ifdef TEST_GENERALIZED_EIGENPROBLEM
elpa_set(handle, "blacs_context", my_blacs_ctxt, &error);
assert_elpa_ok(error);
#endif
/* Setup */
assert_elpa_ok(elpa_setup(handle));
......@@ -259,11 +263,11 @@ int main(int argc, char** argv) {
}
#if defined(TEST_GENERALIZED_EIGENPROBLEM)
elpa_generalized_eigenvectors(handle, a, b, ev, z, sc_desc, 0, &error);
elpa_generalized_eigenvectors(handle, a, b, ev, z, 0, &error);
#if defined(TEST_GENERALIZED_DECOMP_EIGENPROBLEM)
//a = as, so that the problem can be solved again
memcpy(a, as, na_rows * na_cols * sizeof(MATRIX_TYPE));
elpa_generalized_eigenvectors(handle, a, b, ev, z, sc_desc, 1, &error);
elpa_generalized_eigenvectors(handle, a, b, ev, z, 1, &error);
#endif
#else
/* Solve EV problem */
......
......@@ -529,6 +529,10 @@ program test
assert_elpa_ok(error)
call e%set("process_col", my_pcol, error)
assert_elpa_ok(error)
#endif
#ifdef TEST_GENERALIZED_EIGENPROBLEM
call e%set("blacs_context", my_blacs_ctxt, error)
assert_elpa_ok(error)
#endif
call e%set("timings",1,error)
assert_elpa_ok(e%setup())
......@@ -631,12 +635,12 @@ program test
#if defined(TEST_GENERALIZED_DECOMP_EIGENPROBLEM)
call e%timer_start("is_already_decomposed=.false.")
#endif
call e%generalized_eigenvectors(a, b, ev, z, sc_desc, .false., error)
call e%generalized_eigenvectors(a, b, ev, z, .false., error)
#if defined(TEST_GENERALIZED_DECOMP_EIGENPROBLEM)
call e%timer_stop("is_already_decomposed=.false.")
a = as
call e%timer_start("is_already_decomposed=.true.")
call e%generalized_eigenvectors(a, b, ev, z, sc_desc, .true., error)
call e%generalized_eigenvectors(a, b, ev, z, .true., error)
call e%timer_stop("is_already_decomposed=.true.")
#endif
call e%timer_stop("e%generalized_eigenvectors()")
......
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