Commit 284f52ad authored by Andreas Marek's avatar Andreas Marek

Fix problems with gcc compiler v10

parent 80eea42b
......@@ -107,6 +107,7 @@ fi
dnl C
AC_LANG_PUSH([C])
AX_PROG_CC_MPI([test x"$with_mpi" = x"yes"],[found_mpi_c=yes],[found_mpi_c=no])
if test x"$with_mpi" = x"yes"; then
if test x"$found_mpi_c" = x"no"; then
......@@ -233,8 +234,6 @@ if test x"${enable_64bit_integer_mpi_support}" = x"yes"; then
fi
AM_CONDITIONAL([HAVE_64BIT_INTEGER_MPI_SUPPORT],[test x"$enable_64bit_integer_mpi_support" = x"yes"])
AC_MSG_CHECKING(whether C compiler can use _Generic )
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
int main(int argc, char **argv) {
......@@ -267,6 +266,7 @@ AC_LANG_POP([C])
# Fortran
AC_LANG_PUSH([Fortran])
m4_include([m4/ax_prog_fc_mpi.m4])
AX_PROG_FC_MPI([test x"$with_mpi" = x"yes"],[found_mpi_f=yes],[found_mpi_f=no])
if test x"$with_mpi" = x"yes"; then
......@@ -281,6 +281,50 @@ AC_FC_MODULE_FLAG
AC_FC_MODULE_OUTPUT_FLAG
AC_FC_LIBRARY_LDFLAGS
AC_MSG_CHECKING(whether Fortran compiler infers interfaces )
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
program test
implicit none
integer :: a
real*8 :: b
call foo(a)
call foo(b)
end program
])],
[FC_does_infer_interfaces=no],
[FC_does_infer_interfaces=yes]
)
AC_MSG_RESULT([${FC_does_infer_interfaces}])
if test x"${FC_does_infer_interfaces}" = x"yes"; then
#test whether compiler allows switching of argument-checking
FCFLAGS_SAVE2="$FCFLAGS"
FCFLAGS="$FCFLAGS -fallow-argument-mismatch"
# test again
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
program test
implicit none
integer :: a
real*8 :: b
call foo(a)
call foo(b)
end program
])],
[FC_does_still_infer_interfaces=no],
[FC_does_still_infer_interfaces=yes]
)
if test x"${FC_does_still_infer_interfaces}" = x"yes"; then
FCFLAGS = "$FCFLAGS_SAVE2"
AC_MSG_ERROR([Fortran compiler infers interfaces])
fi
else
AC_DEFINE([PACK_REAL_TO_COMPLEX], [1], [In some kernels pack real to complex])
fi
if test x"${enable_openmp}" = x"yes"; then
AX_ELPA_OPENMP
......
......@@ -55,7 +55,6 @@
! --------------------------------------------------------------------------------------------------
#include "config-f90.h"
#ifdef USE_ASSUMED_SIZE
#define PACK_REAL_TO_COMPLEX
#else
#undef PACK_REAL_TO_COMPLEX
#endif
......
......@@ -255,15 +255,21 @@ subroutine qr_pdlarft_pdlarfb_1dcomm_&
! update matrix (pdlarfb)
! Z' = T * Z'
#ifdef DOUBLE_PRECISION_REAL
call strmm("Left","Upper","Notrans","Nonunit",k,n,1.0_rk8,t,ldt,work(1,recvoffset+k),k)
call dtrmm("Left","Upper","Notrans","Nonunit",int(k,kind=BLAS_KIND), int(n,kind=BLAS_KIND),1.0_rk8, &
t,int(ldt,kind=BLAS_KIND),work(1,recvoffset+k),int(k,kind=BLAS_KIND))
! A = A - Y * V'
call sgemm("Notrans","Notrans",localsize,n,k,-1.0_rk8,v(baseoffset,1),ldv,work(1,recvoffset+k),k,1.0_rk8,a(offset,1),lda)
call dgemm("Notrans","Notrans",int(localsize,kind=BLAS_KIND),int(n,kind=BLAS_KIND),int(k,kind=BLAS_KIND), &
-1.0_rk8,v(baseoffset,1),int(ldv,kind=BLAS_KIND),work(1,recvoffset+k), int(k,kind=BLAS_KIND), &
1.0_rk8,a(offset,1), int(lda,kind=BLAS_KIND))
#else
call strmm("Left","Upper","Notrans","Nonunit",k,n,1.0_rk4,t,ldt,work(1,recvoffset+k),k)
call strmm("Left","Upper","Notrans","Nonunit",int(k,kind=BLAS_KIND), int(n,kind=BLAS_KIND),1.0_rk4, &
t,int(ldt,kind=BLAS_KIND),work(1,recvoffset+k),int(k,kind=BLAS_KIND))
! A = A - Y * V'
call sgemm("Notrans","Notrans",localsize,n,k,-1.0_rk4,v(baseoffset,1),ldv,work(1,recvoffset+k),k,1.0_rk4,a(offset,1),lda)
call sgemm("Notrans","Notrans",int(localsize,kind=BLAS_KIND),int(n,kind=BLAS_KIND),int(k,kind=BLAS_KIND), &
-1.0_rk4,v(baseoffset,1),int(ldv,kind=BLAS_KIND),work(1,recvoffset+k), int(k,kind=BLAS_KIND), &
1.0_rk4,a(offset,1), int(lda,kind=BLAS_KIND))
#endif
end subroutine
......
......@@ -52,6 +52,7 @@ subroutine qr_pdlarfb_kernel_local_&
&PRECISION &
(m,n,k,a,lda,v,ldv,t,ldt,z,ldz)
use precision
use elpa_blas_interfaces
implicit none
! input variables (local)
......@@ -180,14 +181,18 @@ subroutine qr_pdlarfb_kernel_local_&
! reference implementation
#ifdef DOUBLE_PRECISION_REAL
! V' = T * Z'
call dtrmm("Left","Upper","Notrans","Nonunit",k,n,1.0_rk8,t,ldt,z,ldz)
call dtrmm("Left","Upper","Notrans","Nonunit",int(k,kind=BLAS_KIND),int(n,kind=BLAS_KIND), &
1.0_rk8,t,int(ldt,kind=BLAS_KIND),z,int(ldz,kind=BLAS_KIND))
! A = A - Y * V'
call dgemm("Notrans","Notrans",m,n,k,-1.0_rk8,v,ldv,z,ldz,1.0_rk8,a,lda)
call dgemm("Notrans","Notrans",int(m,kind=BLAS_KIND),int(n,kind=BLAS_KIND),int(k,kind=BLAS_KIND),&
-1.0_rk8,v,int(ldv,kind=BLAS_KIND),z,int(ldz,kind=BLAS_KIND),1.0_rk8,a,int(lda,kind=BLAS_KIND))
#else
! V' = T * Z'
call dtrmm("Left","Upper","Notrans","Nonunit",k,n,1.0_rk4,t,ldt,z,ldz)
call strmm("Left","Upper","Notrans","Nonunit",int(k,kind=BLAS_KIND),int(n,kind=BLAS_KIND),1.0_rk4,t,&
int(ldt,kind=BLAS_KIND),z,int(ldz,kind=BLAS_KIND))
! A = A - Y * V'
call dgemm("Notrans","Notrans",m,n,k,-1.0_rk4,v,ldv,z,ldz,1.0_rk4,a,lda)
call sgemm("Notrans","Notrans",int(m,kind=BLAS_KIND),int(n,kind=BLAS_KIND),int(k,kind=BLAS_KIND),&
-1.0_rk4,v,int(ldv,kind=BLAS_KIND),z,int(ldz,kind=BLAS_KIND),1.0_rk4,a,int(lda,kind=BLAS_KIND))
#endif
end if
......
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