From 35d7d6a743c3a18c298567e5b4d58e2570be4a65 Mon Sep 17 00:00:00 2001 From: Paolo Giannozzi Date: Tue, 15 Mar 2022 03:02:46 -0500 Subject: [PATCH 1/4] Small fixes for recent cray machines --- PW/src/input.f90 | 2 +- install/configure | 60 +++++++++++++++--------------------- install/m4/x_ac_qe_arch.m4 | 6 ++-- install/m4/x_ac_qe_cc.m4 | 2 +- install/m4/x_ac_qe_cuda.m4 | 32 +++++++++---------- install/m4/x_ac_qe_f90.m4 | 4 +-- install/m4/x_ac_qe_mpif90.m4 | 2 +- 7 files changed, 48 insertions(+), 60 deletions(-) diff --git a/PW/src/input.f90 b/PW/src/input.f90 index c4893134b..e21e67f3c 100644 --- a/PW/src/input.f90 +++ b/PW/src/input.f90 @@ -1682,7 +1682,7 @@ SUBROUTINE iosys() ! ! ... End of reading input parameters ! -#if ! defined (__INTEL_COMPILER) || (__INTEL_COMPILER >= 1300) +#if ( ! defined (__INTEL_COMPILER) || (__INTEL_COMPILER >= 1300) ) && ! defined (__CRAY) CALL pw_init_qexsd_input(qexsd_input_obj, obj_tagname="input") #endif CALL deallocate_input_parameters () diff --git a/install/configure b/install/configure index 84d59e4fd..7fc5be6db 100755 --- a/install/configure +++ b/install/configure @@ -736,7 +736,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -834,7 +833,6 @@ 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,15 +1085,6 @@ 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=* \ @@ -1233,7 +1222,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 runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1386,7 +1375,6 @@ 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] @@ -2335,14 +2323,14 @@ then $as_echo "$as_me: WARNING: Unrecognized build architecture" >&2;} ;; esac - # workaround for Cray-XT machines - test -d /proc/cray_xt && arch=crayxt + # workaround for Cray machines + test -d /proc/cray_xt && arch=crayxe # workaround for IBM BG machines test -d /bgsys && arch=ppc64-bg test -f /bgsys/drivers/ppcfloor/bin/runjob && arch=ppc64-bgq fi case $arch in - ia32 | ia64 | necsx | crayxt | ppc64-bg ) + ia32 | ia64 | necsx | ppc64-bg ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Obsolete architecture? $arch" >&5 $as_echo "$as_me: WARNING: Obsolete architecture? $arch" >&2;} ;; @@ -2881,7 +2869,7 @@ ia32 | ia64 | x86_64 ) arm ) try_f90="nvfortran pgf90 armflang $try_f90" ;; -crayxt* ) +crayxe* ) try_f90="ftn" try_mpif90="ftn" ;; @@ -3771,7 +3759,7 @@ case "$arch:$cc" in # Workaround for BEEF compilation with PGI v.19 and previous if test "$f90_flavor" = "pgf90"; then try_cflags="-c11 $try_cflags"; fi ;; -crayxt*:cc ) +crayxe*:cc ) # Actually we need something like is done for ftn to detect # the proper compiler used (NdFilippo) try_cflags="-O3" @@ -3952,7 +3940,7 @@ x86_64:nagfor* ) try_dflags="$try_dflags -D__NAG" have_cpp=0 ;; -crayxt*:cray* ) +crayxe*:cray* ) try_fflags_nomain="" #NOTE: by default OpenMP is always ON (see crayftn man page) try_fflags_openmp="-homp" @@ -3968,7 +3956,7 @@ crayxt*:cray* ) try_dflags="$try_dflags -D__CRAY" have_cpp=0 ;; -crayxt*:pgf* ) +crayxe*:pgf* ) # see comment above for pgf* try_fflags_nomain="-Mnomain" try_fflags_openmp="-mp" @@ -4214,24 +4202,24 @@ else fi -# NVHPC v. 21.11-22.2 buggy -if (test "$f90_major_version" -eq 21 && test "$f90_minor_version" -ge 11) || - (test "$f90_major_version" -eq 22 && test "$f90_minor_version" -lt 3 ) ; then - as_fn_error $? "Buggy compiler version, upgrade to 22.3 or downgrade to 21.9" "$LINENO" 5 -fi - -if test "$f90_major_version" -gt 20 || (test "$f90_major_version" -eq 20 && test "$f90_minor_version" -ge 7); then - # NVHPC v. 20.7 and later - mMcuda="-cuda -gpu" - mMcudalib="-cudalib" -else - # NVHPC previous to v. 20.7 - mMcuda="-Mcuda" - mMcudalib="-Mcudalib" -fi - if test "x$with_cuda" != "xno" then + # NVHPC v. 21.11-22.2 buggy + if (test "$f90_major_version" -eq 21 && test "$f90_minor_version" -ge 11) || + (test "$f90_major_version" -eq 22 && test "$f90_minor_version" -lt 3 ) ; then + as_fn_error $? "Buggy compiler version, upgrade to 22.3 or downgrade to 21.9" "$LINENO" 5 + fi + + if test "$f90_major_version" -gt 20 || (test "$f90_major_version" -eq 20 && test "$f90_minor_version" -ge 7); then + # NVHPC v. 20.7 and later + mMcuda="-cuda -gpu" + mMcudalib="-cudalib" + else + # NVHPC previous to v. 20.7 + mMcuda="-Mcuda" + mMcudalib="-Mcudalib" + fi + # ----------------------------------------- # Check compiler # ----------------------------------------- diff --git a/install/m4/x_ac_qe_arch.m4 b/install/m4/x_ac_qe_arch.m4 index 613485dad..67ad0549c 100644 --- a/install/m4/x_ac_qe_arch.m4 +++ b/install/m4/x_ac_qe_arch.m4 @@ -39,14 +39,14 @@ then * ) AC_MSG_WARN(Unrecognized build architecture) ;; esac - # workaround for Cray-XT machines - test -d /proc/cray_xt && arch=crayxt + # workaround for Cray machines + test -d /proc/cray_xt && arch=crayxe # workaround for IBM BG machines test -d /bgsys && arch=ppc64-bg test -f /bgsys/drivers/ppcfloor/bin/runjob && arch=ppc64-bgq fi case $arch in - ia32 | ia64 | necsx | crayxt | ppc64-bg ) + ia32 | ia64 | necsx | ppc64-bg ) AC_MSG_WARN(Obsolete architecture? $arch) ;; esac diff --git a/install/m4/x_ac_qe_cc.m4 b/install/m4/x_ac_qe_cc.m4 index 599ec996a..81dd83bdc 100644 --- a/install/m4/x_ac_qe_cc.m4 +++ b/install/m4/x_ac_qe_cc.m4 @@ -49,7 +49,7 @@ case "$arch:$cc" in # Workaround for BEEF compilation with PGI v.19 and previous if test "$f90_flavor" = "pgf90"; then try_cflags="-c11 $try_cflags"; fi ;; -crayxt*:cc ) +crayxe*:cc ) # Actually we need something like is done for ftn to detect # the proper compiler used (NdFilippo) try_cflags="-O3" diff --git a/install/m4/x_ac_qe_cuda.m4 b/install/m4/x_ac_qe_cuda.m4 index 8f7499315..804abb106 100644 --- a/install/m4/x_ac_qe_cuda.m4 +++ b/install/m4/x_ac_qe_cuda.m4 @@ -60,24 +60,24 @@ AC_ARG_ENABLE([openacc], [], [enable_openacc=yes]) -# NVHPC v. 21.11-22.2 buggy -if (test "$f90_major_version" -eq 21 && test "$f90_minor_version" -ge 11) || - (test "$f90_major_version" -eq 22 && test "$f90_minor_version" -lt 3 ) ; then - AC_MSG_ERROR([Buggy compiler version, upgrade to 22.3 or downgrade to 21.9]) -fi - -if test "$f90_major_version" -gt 20 || (test "$f90_major_version" -eq 20 && test "$f90_minor_version" -ge 7); then - # NVHPC v. 20.7 and later - mMcuda="-cuda -gpu" - mMcudalib="-cudalib" -else - # NVHPC previous to v. 20.7 - mMcuda="-Mcuda" - mMcudalib="-Mcudalib" -fi - if test "x$with_cuda" != "xno" then + # NVHPC v. 21.11-22.2 buggy + if (test "$f90_major_version" -eq 21 && test "$f90_minor_version" -ge 11) || + (test "$f90_major_version" -eq 22 && test "$f90_minor_version" -lt 3 ) ; then + AC_MSG_ERROR([Buggy compiler version, upgrade to 22.3 or downgrade to 21.9]) + fi + + if test "$f90_major_version" -gt 20 || (test "$f90_major_version" -eq 20 && test "$f90_minor_version" -ge 7); then + # NVHPC v. 20.7 and later + mMcuda="-cuda -gpu" + mMcudalib="-cudalib" + else + # NVHPC previous to v. 20.7 + mMcuda="-Mcuda" + mMcudalib="-Mcudalib" + fi + # ----------------------------------------- # Check compiler # ----------------------------------------- diff --git a/install/m4/x_ac_qe_f90.m4 b/install/m4/x_ac_qe_f90.m4 index 961ea50fe..300679b91 100644 --- a/install/m4/x_ac_qe_f90.m4 +++ b/install/m4/x_ac_qe_f90.m4 @@ -139,7 +139,7 @@ x86_64:nagfor* ) try_dflags="$try_dflags -D__NAG" have_cpp=0 ;; -crayxt*:cray* ) +crayxe*:cray* ) try_fflags_nomain="" #NOTE: by default OpenMP is always ON (see crayftn man page) try_fflags_openmp="-homp" @@ -155,7 +155,7 @@ crayxt*:cray* ) try_dflags="$try_dflags -D__CRAY" have_cpp=0 ;; -crayxt*:pgf* ) +crayxe*:pgf* ) # see comment above for pgf* try_fflags_nomain="-Mnomain" try_fflags_openmp="-mp" diff --git a/install/m4/x_ac_qe_mpif90.m4 b/install/m4/x_ac_qe_mpif90.m4 index 627c166b7..0875dbd48 100644 --- a/install/m4/x_ac_qe_mpif90.m4 +++ b/install/m4/x_ac_qe_mpif90.m4 @@ -26,7 +26,7 @@ ia32 | ia64 | x86_64 ) arm ) try_f90="nvfortran pgf90 armflang $try_f90" ;; -crayxt* ) +crayxe* ) try_f90="ftn" try_mpif90="ftn" ;; From 51575dc8bb73a1d90efabe569e77bc4621ea5af9 Mon Sep 17 00:00:00 2001 From: Paolo Giannozzi Date: Wed, 16 Mar 2022 03:48:47 -0500 Subject: [PATCH 2/4] Better FFTW3 detection --- install/configure | 2 +- install/m4/x_ac_qe_fft.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/configure b/install/configure index 7fc5be6db..c2a9913b4 100755 --- a/install/configure +++ b/install/configure @@ -6064,7 +6064,7 @@ fi orig_fflags="$FFLAGS" for inc in $try_incdir do - FFLAGS="$orig_fflags -I$inc -ffree-form" + FFLAGS="$orig_fflags -I$inc" cat > conftest.$ac_ext <<_ACEOF use iso_c_binding include "fftw3.f03" diff --git a/install/m4/x_ac_qe_fft.m4 b/install/m4/x_ac_qe_fft.m4 index 6fc77cf8a..ca96781bc 100644 --- a/install/m4/x_ac_qe_fft.m4 +++ b/install/m4/x_ac_qe_fft.m4 @@ -153,7 +153,7 @@ if test "$fft_libs" = ""; then orig_fflags="$FFLAGS" for inc in $try_incdir do - FFLAGS="$orig_fflags -I$inc -ffree-form" + FFLAGS="$orig_fflags -I$inc" AC_COMPILE_IFELSE([use iso_c_binding include "fftw3.f03" end],have_fft_include=1,) From 09f17886541b73c360feefed65dd97e05dee9411 Mon Sep 17 00:00:00 2001 From: Paolo Giannozzi Date: Wed, 16 Mar 2022 04:36:00 -0500 Subject: [PATCH 3/4] It's "craype", not "crayxe" --- install/configure | 10 +++++----- install/m4/x_ac_qe_arch.m4 | 2 +- install/m4/x_ac_qe_cc.m4 | 2 +- install/m4/x_ac_qe_f90.m4 | 4 ++-- install/m4/x_ac_qe_mpif90.m4 | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/install/configure b/install/configure index c2a9913b4..baf1df50e 100755 --- a/install/configure +++ b/install/configure @@ -2324,7 +2324,7 @@ $as_echo "$as_me: WARNING: Unrecognized build architecture" >&2;} ;; esac # workaround for Cray machines - test -d /proc/cray_xt && arch=crayxe + test -d /proc/cray_xt && arch=craype # workaround for IBM BG machines test -d /bgsys && arch=ppc64-bg test -f /bgsys/drivers/ppcfloor/bin/runjob && arch=ppc64-bgq @@ -2869,7 +2869,7 @@ ia32 | ia64 | x86_64 ) arm ) try_f90="nvfortran pgf90 armflang $try_f90" ;; -crayxe* ) +craype* ) try_f90="ftn" try_mpif90="ftn" ;; @@ -3759,7 +3759,7 @@ case "$arch:$cc" in # Workaround for BEEF compilation with PGI v.19 and previous if test "$f90_flavor" = "pgf90"; then try_cflags="-c11 $try_cflags"; fi ;; -crayxe*:cc ) +craype*:cc ) # Actually we need something like is done for ftn to detect # the proper compiler used (NdFilippo) try_cflags="-O3" @@ -3940,7 +3940,7 @@ x86_64:nagfor* ) try_dflags="$try_dflags -D__NAG" have_cpp=0 ;; -crayxe*:cray* ) +craype*:cray* ) try_fflags_nomain="" #NOTE: by default OpenMP is always ON (see crayftn man page) try_fflags_openmp="-homp" @@ -3956,7 +3956,7 @@ crayxe*:cray* ) try_dflags="$try_dflags -D__CRAY" have_cpp=0 ;; -crayxe*:pgf* ) +craype*:pgf* ) # see comment above for pgf* try_fflags_nomain="-Mnomain" try_fflags_openmp="-mp" diff --git a/install/m4/x_ac_qe_arch.m4 b/install/m4/x_ac_qe_arch.m4 index 67ad0549c..2d7473d32 100644 --- a/install/m4/x_ac_qe_arch.m4 +++ b/install/m4/x_ac_qe_arch.m4 @@ -40,7 +40,7 @@ then ;; esac # workaround for Cray machines - test -d /proc/cray_xt && arch=crayxe + test -d /proc/cray_xt && arch=craype # workaround for IBM BG machines test -d /bgsys && arch=ppc64-bg test -f /bgsys/drivers/ppcfloor/bin/runjob && arch=ppc64-bgq diff --git a/install/m4/x_ac_qe_cc.m4 b/install/m4/x_ac_qe_cc.m4 index 81dd83bdc..7cc436fcf 100644 --- a/install/m4/x_ac_qe_cc.m4 +++ b/install/m4/x_ac_qe_cc.m4 @@ -49,7 +49,7 @@ case "$arch:$cc" in # Workaround for BEEF compilation with PGI v.19 and previous if test "$f90_flavor" = "pgf90"; then try_cflags="-c11 $try_cflags"; fi ;; -crayxe*:cc ) +craype*:cc ) # Actually we need something like is done for ftn to detect # the proper compiler used (NdFilippo) try_cflags="-O3" diff --git a/install/m4/x_ac_qe_f90.m4 b/install/m4/x_ac_qe_f90.m4 index 300679b91..62fe40aa7 100644 --- a/install/m4/x_ac_qe_f90.m4 +++ b/install/m4/x_ac_qe_f90.m4 @@ -139,7 +139,7 @@ x86_64:nagfor* ) try_dflags="$try_dflags -D__NAG" have_cpp=0 ;; -crayxe*:cray* ) +craype*:cray* ) try_fflags_nomain="" #NOTE: by default OpenMP is always ON (see crayftn man page) try_fflags_openmp="-homp" @@ -155,7 +155,7 @@ crayxe*:cray* ) try_dflags="$try_dflags -D__CRAY" have_cpp=0 ;; -crayxe*:pgf* ) +craype*:pgf* ) # see comment above for pgf* try_fflags_nomain="-Mnomain" try_fflags_openmp="-mp" diff --git a/install/m4/x_ac_qe_mpif90.m4 b/install/m4/x_ac_qe_mpif90.m4 index 0875dbd48..2c81bfd71 100644 --- a/install/m4/x_ac_qe_mpif90.m4 +++ b/install/m4/x_ac_qe_mpif90.m4 @@ -26,7 +26,7 @@ ia32 | ia64 | x86_64 ) arm ) try_f90="nvfortran pgf90 armflang $try_f90" ;; -crayxe* ) +craype* ) try_f90="ftn" try_mpif90="ftn" ;; From 1288664a337aa840ffba3c4edb3e708a6a744c2b Mon Sep 17 00:00:00 2001 From: Paolo Giannozzi Date: Wed, 16 Mar 2022 04:41:15 -0500 Subject: [PATCH 4/4] User guide updated --- Doc/user_guide.tex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Doc/user_guide.tex b/Doc/user_guide.tex index 4aece316e..84529657a 100644 --- a/Doc/user_guide.tex +++ b/Doc/user_guide.tex @@ -1309,10 +1309,12 @@ properly. On another CRAY [...] there is also Intel compiler as option and the system is slightly different compared to the other. So my recipe should work, 99\% of the cases.'' (info by Filippo Spiga) -For Cray XT machines, use \texttt{./configure ARCH=crayxt4} or else -\configure\ will not recognize the Cray-specific software environment. +For recent Cray machines and "PrgEnv-cray" environment, +\texttt{./configure ARCH=craype} should do the job. +In case of internal compiler error, reduce the optimization level +for the compilation that fails. -Older Cray machines: T3D, T3E, X1, are no longer supported. +Old Cray machines: T3D, T3E, X1, etc, are no longer supported. \subsubsection{Obsolescent architectures}