From 693ac9b8464ea4d34810b78a36e4a0ce3d2cc2c6 Mon Sep 17 00:00:00 2001 From: Paolo Giannozzi Date: Sun, 3 Jul 2022 12:02:31 +0200 Subject: [PATCH 1/2] [skip-CI] Remove any references to F77 in configure --- Modules/Makefile | 5 - install/configure | 704 +++++++------------------------- install/configure.ac | 5 +- install/m4/x_ac_qe_cuda.m4 | 3 - install/m4/x_ac_qe_fft.m4 | 3 - install/m4/x_ac_qe_hdf5.m4 | 8 +- install/m4/x_ac_qe_mpif90.m4 | 2 - install/m4/x_ac_qe_scalapack.m4 | 1 - 8 files changed, 150 insertions(+), 581 deletions(-) diff --git a/Modules/Makefile b/Modules/Makefile index 7469d2551..e0df5404f 100644 --- a/Modules/Makefile +++ b/Modules/Makefile @@ -227,11 +227,6 @@ TLDEPS= libfox libla libfft libutil libmbd librxc libupf all : libqemod.a -## The following is needed only for lapack compiled from sources - -dlamch.o : dlamch.f - $(F77) $(FFLAGS_NOOPT) -c $< - libqemod.a: $(MODULES) $(OBJS) $(RISMLIB) $(AR) $(ARFLAGS) $@ $? $(RANLIB) $@ diff --git a/install/configure b/install/configure index c8f62eb73..063ae8e02 100755 --- a/install/configure +++ b/install/configure @@ -673,9 +673,6 @@ lapack_target lapack_libs blas_line blas_libs -ac_ct_F77 -FFLAGS -F77 f90rule SET_MAKE cuda_extlibs @@ -737,6 +734,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -774,7 +772,6 @@ with_libxc with_libxc_prefix with_libxc_include with_scalapack -with_scalapack_qrcp with_elpa_include with_elpa_lib with_elpa_version @@ -794,9 +791,7 @@ LDFLAGS LIBS CC CFLAGS -CPPFLAGS -F77 -FFLAGS' +CPPFLAGS' # Initialize some variables set by options. @@ -835,6 +830,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1087,6 +1083,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1224,7 +1229,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1377,6 +1382,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1477,8 +1483,6 @@ Some influential environment variables: CFLAGS C compiler flags CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1636,90 +1640,6 @@ fi } # ac_fn_c_try_compile -# ac_fn_f77_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_f77_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_f77_try_compile - -# ac_fn_f77_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_f77_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_f77_try_link - # ac_fn_fc_try_link LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -2403,7 +2323,11 @@ fi -# Checking MPIF90... +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -2841,13 +2765,68 @@ if test $ac_compiler_gnu = yes; then else GFC= fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=f90 +ac_fcflags_srcext_save=$ac_fcflags_srcext +ac_fcflags_srcext= +ac_cv_fc_srcext_f90=unknown +case $ac_ext in #( + [fF]77) ac_try=f77;; #( + *) ac_try=f95;; +esac +for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do + test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_srcext_f90=$ac_flag; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest.$ac_objext conftest.f90 +ac_fcflags_srcext=$ac_fcflags_srcext_save + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } +if test "x$ac_cv_fc_srcext_f90" = xunknown; then + as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 +else + ac_fc_srcext=f90 + if test "x$ac_cv_fc_srcext_f90" = xnone; then + ac_fcflags_srcext="" + FCFLAGS_f90="" + else + ac_fcflags_srcext=$ac_cv_fc_srcext_f90 + FCFLAGS_f90=$ac_cv_fc_srcext_f90 + fi + + +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + +# Checking MPIF90... # Check whether --enable-parallel was given. @@ -3162,11 +3141,10 @@ if test $ac_compiler_gnu = yes; then else GFC= fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu # this avoids that an empty MPIF90 field is produced if the corresponding # environment variable MPIF90 does not contain an acceptable compiler @@ -3285,62 +3263,6 @@ ftn ) ;; esac -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f90=$ac_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 -else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 - fi - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - echo setting F90... $f90 echo setting MPIF90... $mpif90 @@ -3722,11 +3644,10 @@ if test "x$ac_cv_prog_cc_c89" != xno; then : fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu cc=$CC @@ -4209,65 +4130,6 @@ then # ----------------------------------------- # Check compiler # ----------------------------------------- - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f90=$ac_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 -else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 - fi - - -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - as_CACHEVAR=`$as_echo "ax_cv_check_fcflags__$mMcuda=cuda$with_cuda_runtime" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran compiler accepts $mMcuda=cuda$with_cuda_runtime" >&5 $as_echo_n "checking whether Fortran compiler accepts $mMcuda=cuda$with_cuda_runtime... " >&6; } @@ -4297,12 +4159,6 @@ else have_cudafor=no fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "x$have_cudafor" != "xyes" then as_fn_error $? "You do not have the cudafor module. Are you using NVHPC compiler?" "$LINENO" 5 @@ -4406,227 +4262,10 @@ fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - -F77=$f90 # use Fortran 90 actually FFLAGS="$test_fflags" LDFLAGS="$test_ldflags" # Checking BLAS... -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_F77+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -$as_echo "$F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_F77+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if ${ac_cv_f77_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if ${ac_cv_prog_f77_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - FFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_cv_prog_f77_g=yes -else - ac_cv_prog_f77_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -if test $ac_compiler_gnu = yes; then - G77=yes -else - G77= -fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - have_blas=0 @@ -4742,7 +4381,7 @@ for ac_lib in '' $mkl_lib; do ac_res=-l$ac_lib LIBS="-l$ac_lib -lmkl_sequential -lmkl_core $add_mkl_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -4791,7 +4430,7 @@ for ac_lib in '' $mkl_lib; do ac_res=-l$ac_lib LIBS="-l$ac_lib -l$mkl_omp -lmkl_core $add_mkl_omp $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -4852,7 +4491,7 @@ for ac_lib in '' essl; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -4952,7 +4591,7 @@ for ac_lib in '' armpl_arm; do ac_res=-l$ac_lib LIBS="-l$ac_lib yes $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5027,7 +4666,7 @@ for ac_lib in '' armpl; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5075,7 +4714,7 @@ for ac_lib in '' armpl_mp; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5149,7 +4788,7 @@ for ac_lib in '' acml; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5194,7 +4833,7 @@ for ac_lib in '' acml_mp; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5262,7 +4901,7 @@ for ac_lib in '' blas; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5323,7 +4962,7 @@ for ac_lib in '' blas; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5388,7 +5027,7 @@ for ac_lib in '' f77blas; do ac_res=-l$ac_lib LIBS="-l$ac_lib -lg2c $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5455,7 +5094,7 @@ for ac_lib in '' blas-3 openblas blas; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dgemm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5558,7 +5197,7 @@ for ac_lib in '' lapack; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dspev=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5627,7 +5266,7 @@ for ac_lib in '' lapack-3 lapack; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dspev=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5769,7 +5408,7 @@ for ac_lib in '' fft; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_zftfax=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5837,7 +5476,7 @@ for ac_lib in '' asl; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_zfc3cl=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5922,7 +5561,7 @@ for ac_lib in '' fftw3_omp; do ac_res=-l$ac_lib LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dfftw_execute_dft=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -5969,7 +5608,7 @@ for ac_lib in '' fftw3_omp; do ac_res=-l$ac_lib LIBS="-l$ac_lib -lfftw3 -lm $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dfftw_execute_dft=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6015,7 +5654,7 @@ for ac_lib in '' fftw3; do ac_res=-l$ac_lib LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_dfftw_execute_dft=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6045,65 +5684,6 @@ fi if test "$have_fft" -eq 1 then - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f90=$ac_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 -else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 - fi - - -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - try_dflags="$try_dflags -D__FFTW3" try_incdir="$FFTW_INCLUDE $FFTW_INC $INCLUDE_PATH $CPATH $FPATH" orig_fflags="$FFLAGS" @@ -6126,11 +5706,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi done FFLAGS="$orig_fflags" - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - break fi @@ -6308,10 +5883,10 @@ else as_fn_error $? "Could not find required libxc library." "$LINENO" 5 fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu fi @@ -6366,7 +5941,7 @@ for ac_lib in '' massvp4 massv; do ac_res=-l$ac_lib LIBS="-l$ac_lib -lmass $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_vexp=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6434,7 +6009,7 @@ for ac_lib in '' massv; do ac_res=-l$ac_lib LIBS="-l$ac_lib -lmass_simd $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_vexp=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6502,7 +6077,7 @@ for ac_lib in '' massvp4_64; do ac_res=-l$ac_lib LIBS="-l$ac_lib -lmass_64 $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_vexp=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6605,7 +6180,7 @@ for ac_lib in '' mpi; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_mpi_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6696,7 +6271,6 @@ for dummy in x # to allow simple 'break' do test "$have_mpi" -eq 0 && break - F77=$mpif90 LIBS="$mpi_libs" # look for scalapack if required @@ -6721,7 +6295,7 @@ for ac_lib in '' "" ; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_pdgemr2d=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6776,7 +6350,7 @@ for ac_lib in '' "mkl_scalapack_lp64" ; do ac_res=-l$ac_lib LIBS="-l$ac_lib "$scalapack_libs" $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_pdgemr2d=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6828,7 +6402,7 @@ for ac_lib in '' "" ; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_pdgemr2d=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6878,7 +6452,7 @@ for ac_lib in '' "" ; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_pdgemr2d=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6929,7 +6503,7 @@ for ac_lib in '' "" ; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_pdgemr2d=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -6982,7 +6556,7 @@ for ac_lib in '' "" ; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_f77_try_link "$LINENO"; then : + if ac_fn_fc_try_link "$LINENO"; then : ac_cv_search_pdgemr2d=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ @@ -7016,16 +6590,24 @@ fi done # Enable QRCP with scalapack if --with-scalapack-qrcp==yes is set. -# Requires Scalapack >= 2.1.0 or MKL >= 2020, but the version is not checked. -# If an old version is used, QRCP results might be buggy. -if test "${with_scalapack_qrcp+set}" = set; then : - withval=$with_scalapack_qrcp - if test "$withval" = "yes" && test "$have_scalapack" -eq 1; then - try_dflags="$try_dflags -D__SCALAPACK_QRCP" - fi + +# Check whether --with-scalapack was given. +if test "${with_scalapack+set}" = set; then : + withval=$with_scalapack; if test "$withval" = "yes" ; then + with_scalapack_qrcp=1 + else + with_scalapack_qrcp=0 + fi +else + with_scalapack_qrcp=0 + fi +if test "$have_scalapack" -eq 1 && test "$with_scalapack_qrcp" -eq 1; then + try_dflags="$try_dflags -D__SCALAPACK_QRCP" +fi + # Configuring output message if test "$have_scalapack" -eq 1; then scalapack_line="SCALAPACK_LIBS=$scalapack_libs" @@ -7310,10 +6892,10 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "$have_hdf5" -eq 1 ; then @@ -7553,10 +7135,10 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "$have_hdf5" -eq 1 ; then diff --git a/install/configure.ac b/install/configure.ac index 3e66318ac..c4807269b 100644 --- a/install/configure.ac +++ b/install/configure.ac @@ -35,6 +35,9 @@ X_AC_QE_AR() # Checking OpenMP... X_AC_QE_OPENMP() +AC_LANG_PUSH(Fortran) +AC_FC_SRCEXT(f90) + # Checking MPIF90... X_AC_QE_MPIF90() @@ -56,8 +59,6 @@ X_AC_QE_CUDA() # Checking F90 rule... X_AC_QE_F90RULE() -AC_LANG_PUSH(Fortran 77) -F77=$f90 # use Fortran 90 actually FFLAGS="$test_fflags" LDFLAGS="$test_ldflags" diff --git a/install/m4/x_ac_qe_cuda.m4 b/install/m4/x_ac_qe_cuda.m4 index a22f5cf53..576793e6a 100644 --- a/install/m4/x_ac_qe_cuda.m4 +++ b/install/m4/x_ac_qe_cuda.m4 @@ -81,10 +81,7 @@ then # ----------------------------------------- # Check compiler # ----------------------------------------- - AC_LANG_PUSH([Fortran]) - AC_FC_SRCEXT([f90]) AX_CHECK_COMPILE_FLAG([$mMcuda=cuda$with_cuda_runtime], [have_cudafor=yes], [have_cudafor=no], [], [MODULE test; use cudafor; END MODULE]) - AC_LANG_POP([Fortran]) if test "x$have_cudafor" != "xyes" then AC_MSG_ERROR([You do not have the cudafor module. Are you using NVHPC compiler?]) diff --git a/install/m4/x_ac_qe_fft.m4 b/install/m4/x_ac_qe_fft.m4 index 9cab22e9e..ca96781bc 100644 --- a/install/m4/x_ac_qe_fft.m4 +++ b/install/m4/x_ac_qe_fft.m4 @@ -148,8 +148,6 @@ if test "$fft_libs" = ""; then if test "$have_fft" -eq 1 then - AC_LANG_PUSH([Fortran]) - AC_FC_SRCEXT(f90) try_dflags="$try_dflags -D__FFTW3" try_incdir="$FFTW_INCLUDE $FFTW_INC $INCLUDE_PATH $CPATH $FPATH" orig_fflags="$FFLAGS" @@ -166,7 +164,6 @@ end],have_fft_include=1,) fi done FFLAGS="$orig_fflags" - AC_LANG_POP([Fortran]) break fi diff --git a/install/m4/x_ac_qe_hdf5.m4 b/install/m4/x_ac_qe_hdf5.m4 index b10383a20..8fd8e36a5 100644 --- a/install/m4/x_ac_qe_hdf5.m4 +++ b/install/m4/x_ac_qe_hdf5.m4 @@ -59,7 +59,7 @@ if test "$use_parallel" -ne 0; then else # Test if it is really installed where it has been specified - AC_LANG_POP(Fortran 77) + AC_LANG_POP(Fortran) AC_LANG_PUSH(C) if test -e $with_hdf5_path/bin/h5pcc; then @@ -100,7 +100,7 @@ if test "$use_parallel" -ne 0; then done AC_LANG_POP(C) - AC_LANG_PUSH(Fortran 77) + AC_LANG_PUSH(Fortran) if test "$have_hdf5" -eq 1 ; then if test "$with_hdf5_include" -eq 1 ; then @@ -184,7 +184,7 @@ else else # Test if it is really installed where it has been specified - AC_LANG_POP(Fortran 77) + AC_LANG_POP(Fortran) AC_LANG_PUSH(C) if test -e $with_hdf5_path/bin/h5cc ; then @@ -219,7 +219,7 @@ else done AC_LANG_POP(C) - AC_LANG_PUSH(Fortran 77) + AC_LANG_PUSH(Fortran) if test "$have_hdf5" -eq 1 ; then AC_CHECK_FILE($with_hdf5_path/include/hdf5.mod,,[ diff --git a/install/m4/x_ac_qe_mpif90.m4 b/install/m4/x_ac_qe_mpif90.m4 index 1369374bb..f3afc95ea 100644 --- a/install/m4/x_ac_qe_mpif90.m4 +++ b/install/m4/x_ac_qe_mpif90.m4 @@ -221,8 +221,6 @@ ftn ) ;; esac -AC_FC_SRCEXT(f90) - echo setting F90... $f90 echo setting MPIF90... $mpif90 diff --git a/install/m4/x_ac_qe_scalapack.m4 b/install/m4/x_ac_qe_scalapack.m4 index 5f9adf6cb..83bb0770d 100644 --- a/install/m4/x_ac_qe_scalapack.m4 +++ b/install/m4/x_ac_qe_scalapack.m4 @@ -21,7 +21,6 @@ for dummy in x # to allow simple 'break' do test "$have_mpi" -eq 0 && break - F77=$mpif90 LIBS="$mpi_libs" # look for scalapack if required From 93441f511accaf8a5929460d7e032cc2b1cc32ce Mon Sep 17 00:00:00 2001 From: Paolo Giannozzi Date: Sun, 3 Jul 2022 21:45:01 +0200 Subject: [PATCH 2/2] [skip-CI] small updates --- PHonon/Doc/user_guide.tex | 12 ++++++------ install/configure | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/PHonon/Doc/user_guide.tex b/PHonon/Doc/user_guide.tex index 622fce8d6..cd8a43dfd 100644 --- a/PHonon/Doc/user_guide.tex +++ b/PHonon/Doc/user_guide.tex @@ -87,15 +87,15 @@ potential. Weicheng Bao (Nanjing University) and Norge Cruz Hernandez \section{Installation} -\PHonon\ is a package tightly bound to \qe. +\PHonon\ is a \qe\ package and it is tightly bound to \qe. For instruction on how to download and compile \qe, please refer to the general Users' Guide, available in file \texttt{Doc/user\_guide.pdf} under the main \qe\ directory, or in web site \texttt{http://www.quantum-espresso.org}. -Once \qe\ is correctly configured, \PHonon\ can be automatically -downloaded, unpacked and compiled by -just typing \texttt{make ph}, from the main \qe\ directory. +Once \qe\ is correctly configured, \PHonon\ is compiled by +just typing \texttt{make ph}, from the main \qe\ directory; +or, if you use CMake, by just typing \texttt{make}. \subsection{Structure of the \PHonon\ package} @@ -182,8 +182,8 @@ In the following, we will indicate by ${\bf q}$ the phonon wavevectors, while ${\bf k}$ will indicate Bloch vectors used for summing over the Brillouin Zone. -The main code \phx\ can be used whenever \PWscf\ can be used, -with the exceptions of DFT+U, hybrid functionals, external electric fields, +The main code \phx\ can be used whenever \PWscf\ can be used, with the +exceptions of hybrid and meta-GGA functionals, external electric fields, constraints on magnetization, nonperiodic boundary conditions. USPP and PAW are not implemented for higher-order response calculations. See the header of file \texttt{PHonon/PH/phonon.f90} for a complete and diff --git a/install/configure b/install/configure index 3437e4544..2ad2c5ac6 100755 --- a/install/configure +++ b/install/configure @@ -5918,8 +5918,7 @@ fi foxlibs="" else extfox="libfox" - foxlibs="-L\$(TOPDIR)/FoX/lib -lFoX_dom -lFoX_sax -lFoX_wxml \ - -lFoX_common -lFoX_utils -lFoX_fsys " + foxlibs="-L\$(TOPDIR)/FoX/lib -lFoX_dom -lFoX_sax -lFoX_wxml -lFoX_common -lFoX_utils -lFoX_fsys " try_iflags="$try_iflags -I\$(TOPDIR)/FoX/finclude " fi