Commit 2aa98208 authored by Andreas Marek's avatar Andreas Marek
Browse files

Rename the arrays a and q in ELPA 2stage

parent 7f25eccd
......@@ -129,17 +129,17 @@ function elpa_solve_evp_&
!#ifdef REDISTRIBUTE_MATRIX
!#ifdef USE_ASSUMED_SIZE
! MATH_DATATYPE(kind=rck), intent(inout), target :: aExtern(obj%local_nrows,*)
! MATH_DATATYPE(kind=rck), optional,target,intent(out) :: qExtern(obj%local_nrows,*)
!#else
#ifdef USE_ASSUMED_SIZE
MATH_DATATYPE(kind=rck), intent(inout), target :: aExtern(obj%local_nrows,*)
MATH_DATATYPE(kind=rck), optional,target,intent(out) :: qExtern(obj%local_nrows,*)
#else
MATH_DATATYPE(kind=rck), intent(inout), target :: aExtern(1:obj%local_nrows,1:obj%local_ncols)
#ifdef ACTIVATE_SKEW
MATH_DATATYPE(kind=C_DATATYPE_KIND), optional, target, intent(out) :: qExtern(1:obj%local_nrows,1:2*obj%local_ncols)
#else
MATH_DATATYPE(kind=C_DATATYPE_KIND), optional, target, intent(out) :: qExtern(1:obj%local_nrows,1:obj%local_ncols)
#endif
!#endif /* USE_ASSUMED_SIZE */
#endif /* USE_ASSUMED_SIZE */
MATH_DATATYPE(kind=rck), pointer :: a(:,:)
MATH_DATATYPE(kind=rck), pointer :: q(:,:)
......
......@@ -66,17 +66,9 @@
&2stage_device_pointer_&
&PRECISION&
&_impl (obj, &
#ifdef REDISTRIBUTE_MATRIX
aExtern, &
#else
a, &
#endif /* REDISTRIBUTE_MATRIX */
ev, &
#ifdef REDISTRIBUTE_MATRIX
qExtern) result(success)
#else
q) result(success)
#endif /* REDISTRIBUTE_MATRIX */
#else /* DEVICE_POINTER */
#ifdef ACTIVATE_SKEW
function elpa_solve_skew_evp_&
......@@ -88,17 +80,9 @@
&2stage_all_host_arrays_&
&PRECISION&
&_impl (obj, &
#ifdef REDISTRIBUTE_MATRIX
aExtern, &
#else
a, &
#endif /* REDISTRIBUTE_MATRIX */
ev, &
#ifdef REDISTRIBUTE_MATRIX
qExtern) result(success)
#else
q) result(success)
#endif /* REDISTRIBUTE_MATRIX */
#endif /* DEVICE_POINTER */
!use matrix_plot
......@@ -134,15 +118,15 @@
#ifdef DEVICE_POINTER
#ifdef REDISTRIBUTE_MATRIX
!#ifdef REDISTRIBUTE_MATRIX
type(c_ptr) :: aExtern, qExtern
#else /* REDISTRIBUTE_MATRIX */
type(c_ptr) :: a, q
#endif /* REDISTRIBUTE_MATRIX */
!#else /* REDISTRIBUTE_MATRIX */
! type(c_ptr) :: a, q
!#endif /* REDISTRIBUTE_MATRIX */
#else /* DEVICE_POINTER */
#ifdef REDISTRIBUTE_MATRIX
!#ifdef REDISTRIBUTE_MATRIX
#ifdef USE_ASSUMED_SIZE
MATH_DATATYPE(kind=C_DATATYPE_KIND), intent(inout), target :: aExtern(obj%local_nrows,*)
......@@ -156,21 +140,24 @@
#endif
#endif
#else /* REDISTRIBUTE_MATRIX */
#ifdef USE_ASSUMED_SIZE
MATH_DATATYPE(kind=C_DATATYPE_KIND), intent(inout) :: a(obj%local_nrows,*)
MATH_DATATYPE(kind=C_DATATYPE_KIND), optional, intent(out), target :: q(obj%local_nrows,*)
#else
MATH_DATATYPE(kind=C_DATATYPE_KIND), intent(inout) :: a(obj%local_nrows,obj%local_ncols)
#ifdef ACTIVATE_SKEW
MATH_DATATYPE(kind=C_DATATYPE_KIND), optional, target, intent(out) :: q(obj%local_nrows,2*obj%local_ncols)
#else
MATH_DATATYPE(kind=C_DATATYPE_KIND), optional, target, intent(out) :: q(obj%local_nrows,obj%local_ncols)
#endif
#endif
!#else /* REDISTRIBUTE_MATRIX */
!
!#ifdef USE_ASSUMED_SIZE
! MATH_DATATYPE(kind=C_DATATYPE_KIND), intent(inout) :: a(obj%local_nrows,*)
! MATH_DATATYPE(kind=C_DATATYPE_KIND), optional, intent(out), target :: q(obj%local_nrows,*)
!#else
! MATH_DATATYPE(kind=C_DATATYPE_KIND), intent(inout) :: a(obj%local_nrows,obj%local_ncols)
!#ifdef ACTIVATE_SKEW
! MATH_DATATYPE(kind=C_DATATYPE_KIND), optional, target, intent(out) :: q(obj%local_nrows,2*obj%local_ncols)
!#else
! MATH_DATATYPE(kind=C_DATATYPE_KIND), optional, target, intent(out) :: q(obj%local_nrows,obj%local_ncols)
!#endif
!#endif
!
!#endif /* REDISTRIBUTE_MATRIX */
#endif /* REDISTRIBUTE_MATRIX */
MATH_DATATYPE(kind=rck), pointer :: a(:,:)
MATH_DATATYPE(kind=rck), pointer :: q(:,:)
#endif /* DEVICE_POINTER */
......@@ -179,10 +166,10 @@
type(c_ptr) :: a, q
#endif
#else /* DEVICE_POINTER */
#ifdef REDISTRIBUTE_MATRIX
MATH_DATATYPE(kind=rck), pointer :: a(:,:)
MATH_DATATYPE(kind=rck), pointer :: q(:,:)
#endif
!#ifdef REDISTRIBUTE_MATRIX
! MATH_DATATYPE(kind=rck), pointer :: a(:,:)
! MATH_DATATYPE(kind=rck), pointer :: q(:,:)
!#endif
#endif /* DEVICE_POINTER */
#ifdef DEVICE_POINTER
......@@ -241,9 +228,11 @@
MATH_DATATYPE(kind=rck), allocatable, target :: aIntern(:,:)
MATH_DATATYPE(kind=C_DATATYPE_KIND), allocatable, target :: qIntern(:,:)
#else
MATH_DATATYPE(kind=rck), pointer :: aIntern(:,:)
MATH_DATATYPE(kind=C_DATATYPE_KIND), pointer :: qIntern(:,:)
#endif
logical :: do_bandred, do_tridiag, do_solve_tridi, &
do_trans_to_band, do_trans_to_full
logical :: good_nblk_gpu
......@@ -302,6 +291,30 @@
&PRECISION&
&")
#ifndef DEVICE_POINTER
! aIntern, qIntern are normally pointers,
! in case of redistribute aIntern, qIntern, are arrays storing the internally
! redistributed matrix
! in case of redistribute matrix the pointers will be reassigned
#ifndef REDISTRIBUTE_MATRIX
aIntern => aExtern(1:obj%local_nrows,1:obj%local_ncols)
a => aIntern(1:obj%local_nrows,1:obj%local_ncols)
if (present(qExtern)) then
#ifdef ACTIVATE_SKEW
qIntern => qExtern(1:obj%local_nrows,1:2*obj%local_ncols)
q => qIntern(1:obj%local_nrows,1:2*obj%local_ncols)
#else
qIntern => qExtern(1:obj%local_nrows,1:obj%local_ncols)
q => qIntern(1:obj%local_nrows,1:obj%local_ncols)
#endif
endif
#endif /* REDISTRIBUTE_MATRIX */
#endif /* DEVICE_POINTER */
reDistributeMatrix = .false.
#ifdef WITH_OPENMP_TRADITIONAL
......@@ -344,11 +357,7 @@
success = .true.
#ifndef DEVICE_POINTER
#ifdef REDISTRIBUTE_MATRIX
if (present(qExtern)) then
#else
if (present(q)) then
#endif
obj%eigenvalues_only = .false.
else
obj%eigenvalues_only = .true.
......
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