Commit 50033dc2 authored by Andreas Marek's avatar Andreas Marek

Rename preprocessor flag for using assumed size arrays

parent 65c8e0f3
......@@ -15,13 +15,13 @@ libelpa@SUFFIX@_public_la_SOURCES = \
src/elpa2.F90 \
src/elpa1_auxiliary.F90 \
src/elpa2_utilities.F90 \
src/elpa_utilities.F90
src/elpa_utilities.F90 \
src/mod_precision.f90
# internal parts
noinst_LTLIBRARIES += libelpa@SUFFIX@_private.la
libelpa@SUFFIX@_private_la_FCFLAGS = $(AM_FCFLAGS) @FC_MODOUT@private_modules @FC_MODINC@private_modules
libelpa@SUFFIX@_private_la_SOURCES = \
src/mod_precision.f90 \
src/mod_mpi.F90 \
src/mod_mpi_stubs.F90 \
src/mod_pack_unpack_real.F90 \
......
......@@ -902,17 +902,17 @@ DX_MAN_FEATURE(ON)
DX_HTML_FEATURE(ON)
DX_INIT_DOXYGEN([ELPA], [Doxyfile], [docs])
DESPERATELY_WANT_ASSUMED_SIZE=no
USE_ASSUMED_SIZE=no
AC_MSG_CHECKING(whether --enable-assumed-size is specified)
AC_ARG_ENABLE([assumed-size],
AS_HELP_STRING([--enable-assumed-size],
[use assumed-size Fortran arrays]),
[],
[DESPERATELY_WANT_ASSUMED_SIZE=no])
AC_MSG_RESULT([${DESPERATELY_WANT_ASSUMED_SIZE}])
AM_CONDITIONAL([WITH_DESPERATELY_WANT_ASSUMED_SIZE],[test x"$DESPERATELY_WANT_ASSUMED_SIZE" = x"yes"])
if test x"${DESPERATELY_WANT_ASSUMED_SIZE}" = x"yes" ; then
AC_DEFINE([DESPERATELY_WANT_ASSUMED_SIZE],[1],[use assumed size Fortran arrays, even if not debuggable])
[USE_ASSUMED_SIZE=no])
AC_MSG_RESULT([${USE_ASSUMED_SIZE}])
AM_CONDITIONAL([WITH_USE_ASSUMED_SIZE],[test x"$USE_ASSUMED_SIZE" = x"yes"])
if test x"${USE_ASSUMED_SIZE}" = x"yes" ; then
AC_DEFINE([USE_ASSUMED_SIZE],[1],[use assumed size Fortran arrays, even if not debuggable])
fi
AC_SUBST([MPI_BINARY])
......
......@@ -319,7 +319,7 @@ function solve_evp_real_1stage(na, nev, a, lda, ev, q, ldq, nblk, matrixCols, mp
integer(kind=ik), intent(in) :: na, nev, lda, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
real(kind=rk) :: ev(na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: a(lda,*), q(ldq,*)
#else
real(kind=rk) :: a(lda,matrixCols), q(ldq,matrixCols)
......@@ -425,7 +425,7 @@ function solve_evp_complex_1stage(na, nev, a, lda, ev, q, ldq, nblk, matrixCols,
implicit none
integer(kind=ik), intent(in) :: na, nev, lda, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck) :: a(lda,*), q(ldq,*)
#else
complex(kind=ck) :: a(lda,matrixCols), q(ldq,matrixCols)
......
......@@ -254,7 +254,7 @@ module elpa1_auxiliary
implicit none
integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: a(lda,*)
#else
real(kind=rk) :: a(lda,matrixCols)
......@@ -457,7 +457,7 @@ module elpa1_auxiliary
implicit none
integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: a(lda,*)
#else
real(kind=rk) :: a(lda,matrixCols)
......@@ -619,7 +619,7 @@ module elpa1_auxiliary
implicit none
integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck) :: a(lda,*)
#else
complex(kind=ck) :: a(lda,matrixCols)
......@@ -821,7 +821,7 @@ module elpa1_auxiliary
implicit none
integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck) :: a(lda,*)
#else
complex(kind=ck) :: a(lda,matrixCols)
......@@ -1004,7 +1004,7 @@ module elpa1_auxiliary
integer(kind=ik) :: na, ncb, lda, ldb, nblk, mpi_comm_rows, mpi_comm_cols, ldc
integer(kind=ik) :: ldaCols, ldbCols, ldcCols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: a(lda,*), b(ldb,*), c(ldc,*)
#else
real(kind=rk) :: a(lda,ldaCols), b(ldb,ldbCols), c(ldc,ldcCols)
......@@ -1268,7 +1268,7 @@ module elpa1_auxiliary
integer(kind=ik) :: na, ncb, lda, ldb, nblk, mpi_comm_rows, mpi_comm_cols, ldc
integer(kind=ik) :: ldaCols, ldbCols, ldcCols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck) :: a(lda,*), b(ldb,*), c(ldc,*)
#else
complex(kind=ck) :: a(lda,ldaCols), b(ldb,ldbCols), c(ldc,ldcCols)
......@@ -1507,7 +1507,7 @@ module elpa1_auxiliary
implicit none
integer(kind=ik) :: na, nev, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
real(kind=rk) :: d(na), e(na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: q(ldq,*)
#else
real(kind=rk) :: q(ldq,matrixCols)
......
......@@ -129,7 +129,7 @@ module ELPA1_compute
integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
real(kind=rk) :: d(na), e(na), tau(na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: a(lda,*)
#else
real(kind=rk) :: a(lda,matrixCols)
......@@ -548,7 +548,7 @@ module ELPA1_compute
integer(kind=ik) :: na, nqc, lda, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
real(kind=rk) :: tau(na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: a(lda,*), q(ldq,*)
#else
real(kind=rk) :: a(lda,matrixCols), q(ldq,matrixCols)
......@@ -783,7 +783,7 @@ module ELPA1_compute
integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
complex(kind=ck) :: tau(na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck) :: a(lda,*)
#else
complex(kind=ck) :: a(lda,matrixCols)
......@@ -1228,7 +1228,7 @@ module ELPA1_compute
integer(kind=ik) :: na, nqc, lda, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
complex(kind=ck) :: tau(na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck) :: a(lda,*), q(ldq,*)
#else
complex(kind=ck) :: a(lda,matrixCols), q(ldq,matrixCols)
......@@ -1430,7 +1430,7 @@ module ELPA1_compute
integer(kind=ik) :: na, nev, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
real(kind=rk) :: d(na), e(na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: q(ldq,*)
#else
real(kind=rk) :: q(ldq,matrixCols)
......@@ -1709,7 +1709,7 @@ module ELPA1_compute
integer(kind=ik) :: na, nev, nqoff, ldq, nblk, matrixCols, mpi_comm_rows
real(kind=rk) :: d(na), e(na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: q(ldq,*)
#else
real(kind=rk) :: q(ldq,matrixCols)
......@@ -2041,7 +2041,7 @@ module ELPA1_compute
mpi_comm_cols, npc_0, npc_n
integer(kind=ik) :: l_col(na), p_col(na), l_col_out(na), p_col_out(na)
real(kind=rk) :: d(na), e
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: q(ldq,*)
#else
real(kind=rk) :: q(ldq,matrixCols)
......
......@@ -145,7 +145,7 @@ function solve_evp_real_2stage(na, nev, a, lda, ev, q, ldq, nblk, &
mpi_comm_cols, mpi_comm_all
integer(kind=ik), intent(in) :: nblk
real(kind=rk), intent(inout) :: ev(na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk), intent(inout) :: a(lda,*), q(ldq,*)
#else
real(kind=rk), intent(inout) :: a(lda,matrixCols), q(ldq,matrixCols)
......@@ -385,7 +385,7 @@ function solve_evp_complex_2stage(na, nev, a, lda, ev, q, ldq, nblk, &
integer(kind=ik), intent(in), optional :: THIS_COMPLEX_ELPA_KERNEL_API
integer(kind=ik) :: THIS_COMPLEX_ELPA_KERNEL
integer(kind=ik), intent(in) :: na, nev, lda, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: a(lda,*), q(ldq,*)
#else
complex(kind=ck), intent(inout) :: a(lda,matrixCols), q(ldq,matrixCols)
......
......@@ -138,7 +138,7 @@ module ELPA2_compute
implicit none
integer(kind=ik) :: na, lda, nblk, nbw, matrixCols, numBlocks, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: a(lda,*), tmat(nbw,nbw,*)
#else
real(kind=rk) :: a(lda,matrixCols), tmat(nbw,nbw,numBlocks)
......@@ -204,7 +204,7 @@ module ELPA2_compute
allocate(vmr(max(l_rows,1),na))
vmrCols = na
#ifdef DESPERATELY_WANT_ASSUMED_SIZE_QR
#ifdef USE_ASSUMED_SIZE_QR
call qr_pdgeqrf_2dcomm(a, lda, matrixCols, vmr, max(l_rows,1), vmrCols, tauvector(1), na, tmat(1,1,1), &
nbw, nbw, dwork_size, 1, -1, na, nbw, nblk, nblk, na, na, 1, 0, PQRPARAM(1:11), &
mpi_comm_rows, mpi_comm_cols, blockheuristic)
......@@ -248,7 +248,7 @@ module ELPA2_compute
if (which_qr_decomposition == 1) then
vmrCols = 2*n_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE_QR
#ifdef USE_ASSUMED_SIZE_QR
call qr_pdgeqrf_2dcomm(a, lda, matrixCols, vmr, max(l_rows,1), vmrCols, tauvector(1), &
na, tmat(1,1,istep), nbw, nbw, work_blocked, work_size, &
work_size, na, n_cols, nblk, nblk, &
......@@ -650,7 +650,7 @@ module ELPA2_compute
use precision
implicit none
integer(kind=ik) :: n, lda, ldb, comm
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: a(lda,*)
#else
real(kind=rk) :: a(lda,ldb)
......@@ -727,7 +727,7 @@ module ELPA2_compute
implicit none
integer(kind=ik) :: na, nqc, lda, ldq, nblk, nbw, matrixCols, numBlocks, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: a(lda,*), q(ldq,*), tmat(nbw,nbw,*)
#else
real(kind=rk) :: a(lda,matrixCols), q(ldq,matrixCols), tmat(nbw, nbw, numBlocks)
......@@ -987,7 +987,7 @@ module ELPA2_compute
implicit none
integer(kind=ik), intent(in) :: na, nb, nblk, lda, matrixCols, mpi_comm_rows, mpi_comm_cols, mpi_comm
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk), intent(in) :: a(lda,*)
#else
real(kind=rk), intent(in) :: a(lda,matrixCols)
......@@ -1751,7 +1751,7 @@ module ELPA2_compute
integer(kind=ik), intent(in) :: THIS_REAL_ELPA_KERNEL
integer(kind=ik), intent(in) :: na, nev, nblk, nbw, ldq, matrixCols, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk) :: q(ldq,*)
#else
real(kind=rk) :: q(ldq,matrixCols)
......@@ -2926,7 +2926,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
implicit none
integer(kind=ik) :: na, lda, nblk, nbw, matrixCols, numBlocks, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck) :: a(lda,*), tmat(nbw,nbw,*)
#else
complex(kind=ck) :: a(lda,matrixCols), tmat(nbw,nbw,numBlocks)
......@@ -3293,7 +3293,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
implicit none
integer(kind=ik) :: na, nqc, lda, ldq, nblk, nbw, matrixCols, numBlocks, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck) :: a(lda,*), q(ldq,*), tmat(nbw,nbw,*)
#else
complex(kind=ck) :: a(lda,matrixCols), q(ldq,matrixCols), tmat(nbw, nbw, numBlocks)
......@@ -3440,7 +3440,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
implicit none
integer(kind=ik), intent(in) :: na, nb, nblk, lda, matrixCols, mpi_comm_rows, mpi_comm_cols, mpi_comm
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck),intent(in) :: a(lda,*)
#else
complex(kind=ck), intent(in) :: a(lda,matrixCols)
......@@ -4182,7 +4182,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
integer(kind=ik), intent(in) :: THIS_COMPLEX_ELPA_KERNEL
integer(kind=ik), intent(in) :: na, nev, nblk, nbw, ldq, matrixCols, mpi_comm_rows, mpi_comm_cols
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck) :: q(ldq,*)
#else
complex(kind=ck) :: q(ldq,matrixCols)
......
......@@ -69,7 +69,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, nq, ldq
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(*)
#else
......@@ -91,7 +91,7 @@ contains
! Always a multiple of 4 Q-rows is transformed, even if nq is smaller
do i=1,nq-8,12
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
call hh_trafo_complex_kernel_12(q(i,1),hh, nb, ldq)
#else
call hh_trafo_complex_kernel_12(q(i:ldq,1:nb),hh(1:nb), nb, ldq)
......@@ -101,13 +101,13 @@ contains
! i > nq-8 now, i.e. at most 8 rows remain
if(nq-i+1 > 4) then
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
call hh_trafo_complex_kernel_8(q(i,1),hh, nb, ldq)
#else
call hh_trafo_complex_kernel_8(q(i:ldq,1:nb),hh(1:nb), nb, ldq)
#endif
else if(nq-i+1 > 0) then
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
call hh_trafo_complex_kernel_4(q(i,1),hh, nb, ldq)
#else
call hh_trafo_complex_kernel_4(q(i:ldq,1:nb),hh(1:nb), nb, ldq)
......@@ -128,7 +128,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, nq, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(ldh,*)
#else
......@@ -158,7 +158,7 @@ contains
! Always a multiple of 4 Q-rows is transformed, even if nq is smaller
do i=1,nq,4
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
call hh_trafo_complex_kernel_4_2hv(q(i,1),hh, nb, ldq, ldh, s)
#else
call hh_trafo_complex_kernel_4_2hv(q(i:ldq,1:nb+1),hh(1:ldh,1:2), nb, ldq, ldh, s)
......@@ -166,7 +166,7 @@ contains
enddo
!do i=1,nq-8,12
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
! call hh_trafo_complex_kernel_12_2hv(q(i,1),hh, nb, ldq, ldh, s)
#else
! call hh_trafo_complex_kernel_12_2hv(q(i:ldq,1:nb+1),hh(1:ldh,1:2), nb, ldq, ldh, s)
......@@ -176,13 +176,13 @@ contains
! i > nq-8 now, i.e. at most 8 rows remain
!if(nq-i+1 > 4) then
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
! call hh_trafo_complex_kernel_8_2hv(q(i,1),hh, nb, ldq, ldh, s)
#else
! call hh_trafo_complex_kernel_8_2hv(q(i:ldq,1:nb+1),hh(1:ldh,1:2), nb, ldq, ldh, s)
#endif
!else if(nq-i+1 > 0) then
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
! call hh_trafo_complex_kernel_4_2hv(q(i:ldq,1:nb+1),hh(1:ldh,1:2), nb, ldq, ldh, s)
#else
......@@ -204,7 +204,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, ldq
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(*)
#else
......@@ -311,7 +311,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, ldq
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(*)
#else
......@@ -397,7 +397,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, ldq
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(*)
#else
......@@ -462,7 +462,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(ldh,*)
#else
......@@ -561,7 +561,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(ldh,*)
#else
......@@ -707,7 +707,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(ldh,*)
#else
......
......@@ -71,7 +71,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, nq, ldq
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(*)
#else
......@@ -114,7 +114,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, nq, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq,*)
complex(kind=ck), intent(in) :: hh(ldh,*)
#else
......
......@@ -55,13 +55,13 @@
! --------------------------------------------------------------------------------------------------
#include "config-f90.h"
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
#define PACK_REAL_TO_COMPLEX
#else
#undef PACK_REAL_TO_COMPLEX
#endif
#ifndef DESPERATELY_WANT_ASSUMED_SIZE
#ifndef USE_ASSUMED_SIZE
module real_generic_kernel
private
......@@ -79,7 +79,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, nq, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk), intent(inout) :: q(ldq,*)
real(kind=rk), intent(in) :: hh(ldh,*)
#else
......@@ -107,14 +107,14 @@ contains
! Do the Householder transformations
#ifndef DESPERATELY_WANT_ASSUMED_SIZE
#ifndef USE_ASSUMED_SIZE
! ! assign real data to compplex pointer
! call c_f_pointer(c_loc(q), q_complex, [size(q,dim=1)/2,size(q,dim=2)])
#endif
! Always a multiple of 4 Q-rows is transformed, even if nq is smaller
do i=1,nq-8,12
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
call hh_trafo_kernel_12_generic(q(i,1),hh, nb, ldq, ldh, s)
#else
call hh_trafo_kernel_12_generic(q(i:ldq,1:nb+1),hh(1:ldh,1:2), nb, ldq, ldh, s)
......@@ -124,7 +124,7 @@ contains
! i > nq-8 now, i.e. at most 8 rows remain
if(nq-i+1 > 4) then
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
print *,"calling 8"
call hh_trafo_kernel_8_generic(q(i,1),hh, nb, ldq, ldh, s)
#else
......@@ -132,7 +132,7 @@ contains
#endif
else if(nq-i+1 > 0) then
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
print *,"calling 4"
call hh_trafo_kernel_4_generic(q(i,1),hh, nb, ldq, ldh, s)
#else
......@@ -160,7 +160,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq/2,*)
real(kind=rk), intent(in) :: hh(ldh,*)
#else
......@@ -379,7 +379,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq/2,*)
real(kind=rk), intent(in) :: hh(ldh,*)
#else
......@@ -551,7 +551,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=ck), intent(inout) :: q(ldq/2,*)
real(kind=rk), intent(in) :: hh(ldh,*)
#else
......@@ -668,7 +668,7 @@ contains
#endif
end subroutine hh_trafo_kernel_4_generic
#ifndef DESPERATELY_WANT_ASSUMED_SIZE
#ifndef USE_ASSUMED_SIZE
end module real_generic_kernel
#endif
! --------------------------------------------------------------------------------------------------
......@@ -71,7 +71,7 @@ contains
implicit none
integer(kind=ik), intent(in) :: nb, nq, ldq, ldh
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=rk), intent(inout) :: q(ldq,*)
real(kind=rk), intent(in) :: hh(ldh,*)
#else
......
......@@ -130,7 +130,7 @@
integer(kind=c_int) :: success
integer(kind=c_int), value, intent(in) :: na, nev, lda, ldq, nblk, matrixCols, mpi_comm_cols, mpi_comm_rows
real(kind=c_double) :: ev(1:na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=c_double) :: a(lda,*), q(ldq,*)
#else
real(kind=c_double) :: a(1:lda,1:matrixCols), q(1:ldq,1:matrixCols)
......@@ -181,7 +181,7 @@
implicit none
integer(kind=c_int) :: success
integer(kind=c_int), value, intent(in) :: na, nev, lda, ldq, nblk, matrixCols, mpi_comm_cols, mpi_comm_rows
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=c_double_complex) :: a(lda,*), q(ldq,*)
#else
complex(kind=c_double_complex) :: a(1:lda,1:matrixCols), q(1:ldq,1:matrixCols)
......@@ -239,7 +239,7 @@
mpi_comm_all
integer(kind=c_int), value, intent(in) :: THIS_REAL_ELPA_KERNEL_API, useQR
real(kind=c_double) :: ev(1:na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=c_double) :: a(lda,*), q(ldq,*)
#else
real(kind=c_double) :: a(1:lda,1:matrixCols), q(1:ldq,1:matrixCols)
......@@ -304,7 +304,7 @@
integer(kind=c_int), value, intent(in) :: na, nev, lda, ldq, nblk, matrixCols, mpi_comm_cols, mpi_comm_rows, &
mpi_comm_all
integer(kind=c_int), value, intent(in) :: THIS_COMPLEX_ELPA_KERNEL_API
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=c_double_complex) :: a(lda,*), q(ldq,*)
#else
complex(kind=c_double_complex) :: a(1:lda,1:matrixCols), q(1:ldq,1:matrixCols)
......@@ -353,7 +353,7 @@
integer(kind=c_int), value, intent(in) :: na, nev, ldq, nblk, matrixCols, mpi_comm_cols, mpi_comm_rows
integer(kind=c_int), value :: wantDebug
real(kind=c_double) :: d(1:na), e(1:na)
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=c_double) :: q(ldq,*)
#else
real(kind=c_double) :: q(1:ldq, 1:matrixCols)
......@@ -425,7 +425,7 @@
integer(kind=c_int), value :: na, ncb, lda, ldb, nblk, mpi_comm_rows, mpi_comm_cols, ldc, &
ldaCols, ldbCols, ldcCols
integer(kind=c_int) :: success
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=c_double) :: a(lda,*), b(ldb,*), c(ldc,*)
#else
real(kind=c_double) :: a(lda,ldaCols), b(ldb,ldbCols), c(ldc,ldcCols)
......@@ -492,7 +492,7 @@
character(1,C_CHAR), value :: uplo_a, uplo_c
integer(kind=c_int), value :: na, ncb, lda, ldb, nblk, mpi_comm_rows, mpi_comm_cols, ldc, ldaCols, ldbCols, ldcCols
integer(kind=c_int) :: success
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
complex(kind=c_double_complex) :: a(lda,*), b(ldb,*), c(ldc,*)
#else
complex(kind=c_double_complex) :: a(lda,ldaCols), b(ldb,ldbCols), c(ldc,ldcCols)
......@@ -538,7 +538,7 @@
integer(kind=c_int), value :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
integer(kind=c_int), value :: wantDebug
integer(kind=c_int) :: success
#ifdef DESPERATELY_WANT_ASSUMED_SIZE
#ifdef USE_ASSUMED_SIZE
real(kind=c_double) :: a(lda,*)
#else
real(kind=c_double) :: a(lda,matrixCols)
......@@ -590,7 +590,7 @@
integer(kind=c_int), value :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
integer(kind=c_int), value :: wantDebug