From 6cf0983e14a4186cbfa221c4f5c7e527548df02f Mon Sep 17 00:00:00 2001 From: edoapra Date: Thu, 10 Nov 2022 10:39:56 -0800 Subject: [PATCH 1/7] added LIBXC_VERSION to choose libxc version --- src/libext/libxc/GNUmakefile | 2 +- src/libext/libxc/build_libxc.sh | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/libext/libxc/GNUmakefile b/src/libext/libxc/GNUmakefile index 59045b817c..5e3b7ba83b 100644 --- a/src/libext/libxc/GNUmakefile +++ b/src/libext/libxc/GNUmakefile @@ -6,7 +6,7 @@ include ../../config/makefile.h install/lib/libxc.a: - ./build_libxc.sh + ./build_libxc.sh LIBXC_VERSION LIB_TARGETS += libxc diff --git a/src/libext/libxc/build_libxc.sh b/src/libext/libxc/build_libxc.sh index 01eafc33cf..af6ddf7afa 100755 --- a/src/libext/libxc/build_libxc.sh +++ b/src/libext/libxc/build_libxc.sh @@ -7,8 +7,11 @@ check_tgz() { [ -f $1 ] && gunzip -t $1 > /dev/null && myexit=1 echo $myexit } - -VERSION=6.0.0 +if [ $# -eq 0 ]; then + VERSION=6.0.0 +else + VERSION=$1 +fi TGZ=libxc-${VERSION}.tar.gz if [ `check_tgz $TGZ` == 1 ]; then echo "using existing $TGZ" @@ -78,7 +81,7 @@ fi cd libxc # patch pk09 to avoid compiler memory problems -patch -p0 -N < ../pk09.patch +#patch -p0 -N < ../pk09.patch mkdir -p build cd build if [[ -z "${NWCHEM_TOP}" ]]; then From 80baae304671ceba73f38c5ca80db70c7c67f1f2 Mon Sep 17 00:00:00 2001 From: edoapra Date: Thu, 10 Nov 2022 10:40:44 -0800 Subject: [PATCH 2/7] switch to latest linux oneapi. ifort 2021.7.1 --- travis/build_env.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/travis/build_env.sh b/travis/build_env.sh index be47736633..cd69a9db09 100755 --- a/travis/build_env.sh +++ b/travis/build_env.sh @@ -117,10 +117,10 @@ fi export TERM=dumb rm -f l_Base*sh l_HP*sh tries=0 ; until [ "$tries" -ge 10 ] ; do \ - dir_base="18673" - dir_hpc="18679" - base="l_BaseKit_p_2022.2.0.262" - hpc="l_HPCKit_p_2022.2.0.191" + dir_base="18970" + dir_hpc="18975" + base="l_BaseKit_p_2022.3.1.17310" + hpc="l_HPCKit_p_2022.3.1.16997" wget -nv https://registrationcenter-download.intel.com/akdlm/irc_nas/"$dir_hpc"/"$hpc".sh \ && wget -nv https://registrationcenter-download.intel.com/akdlm/irc_nas/"$dir_base"/"$base".sh \ && break ;\ From 0dba4476b45806587ece824e9b41120d6fa03aa1 Mon Sep 17 00:00:00 2001 From: edoapra Date: Thu, 10 Nov 2022 11:03:13 -0800 Subject: [PATCH 3/7] fix variable name --- src/libext/libxc/GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libext/libxc/GNUmakefile b/src/libext/libxc/GNUmakefile index 5e3b7ba83b..79e77784bf 100644 --- a/src/libext/libxc/GNUmakefile +++ b/src/libext/libxc/GNUmakefile @@ -6,7 +6,7 @@ include ../../config/makefile.h install/lib/libxc.a: - ./build_libxc.sh LIBXC_VERSION + ./build_libxc.sh $(LIBXC_VERSION) LIB_TARGETS += libxc From 3967ab238ddf47476799a78f67e357bffdf8f757 Mon Sep 17 00:00:00 2001 From: edoapra Date: Thu, 10 Nov 2022 11:03:44 -0800 Subject: [PATCH 4/7] macos oneapi update --- travis/build_env.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/travis/build_env.sh b/travis/build_env.sh index cd69a9db09..c7aa162b30 100755 --- a/travis/build_env.sh +++ b/travis/build_env.sh @@ -43,10 +43,10 @@ echo DISTR is "$DISTR" else mkdir -p ~/mntdmg $IONEAPI_ROOT || true cd ~/Downloads - dir_base="18675" - dir_hpc="18681" - base="m_BaseKit_p_2022.2.0.226" - hpc="m_HPCKit_p_2022.2.0.158" + dir_base="18971" + dir_hpc="18977" + base="m_BaseKit_p_2022.3.1.17244" + hpc="m_HPCKit_p_2022.3.1.15344" curl -sS -LJO https://registrationcenter-download.intel.com/akdlm/irc_nas/"$dir_base"/"$base".dmg curl -sS -LJO https://registrationcenter-download.intel.com/akdlm/irc_nas/"$dir_hpc"/"$hpc".dmg echo "installing BaseKit" From b723e9d2f643e086d802dc1fea5367d92484588a Mon Sep 17 00:00:00 2001 From: edoapra Date: Thu, 10 Nov 2022 11:16:18 -0800 Subject: [PATCH 5/7] check libxc version supplied with LIBXC_VERSION --- src/libext/libxc/build_libxc.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libext/libxc/build_libxc.sh b/src/libext/libxc/build_libxc.sh index af6ddf7afa..efc8e5b13f 100755 --- a/src/libext/libxc/build_libxc.sh +++ b/src/libext/libxc/build_libxc.sh @@ -12,6 +12,14 @@ if [ $# -eq 0 ]; then else VERSION=$1 fi +VERSION_MAJOR=$(echo $VERSION | cut -d . -f 1) +if [[ "$VERSION_MAJOR" -lt 4 ]]; then + echo + echo "LIBXC unsupported version " "$VERSION" + echo "please use 4.0.0 and later versions" + echo + exit 1 +fi TGZ=libxc-${VERSION}.tar.gz if [ `check_tgz $TGZ` == 1 ]; then echo "using existing $TGZ" From fb10f1742f99505e9a9ba25902d683d8a9ac0306 Mon Sep 17 00:00:00 2001 From: edoapra Date: Thu, 10 Nov 2022 13:54:11 -0800 Subject: [PATCH 6/7] disabling USE_OPENMP for tblite when using 2021.x.y ifort --- src/libext/tblite/build_tblite_cmake.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/libext/tblite/build_tblite_cmake.sh b/src/libext/tblite/build_tblite_cmake.sh index d20ff4bb74..a0653c1bc7 100755 --- a/src/libext/tblite/build_tblite_cmake.sh +++ b/src/libext/tblite/build_tblite_cmake.sh @@ -21,11 +21,11 @@ if [ `check_tgz $TGZ` == 1 ]; then echo "using existing $TGZ" else rm -rf tblite* - curl -L https://github.com/dmejiar/tblite/tarball/${VERSION} -o $TGZ + curl -sS -L https://github.com/dmejiar/tblite/tarball/${VERSION} -o $TGZ fi tar -xzf tblite-${VERSION}.tar.gz -ln -sf dmejiar-tblite-??????? tblite +ln -sf *tblite-??????? tblite if [[ -z "${MPIF90}" ]]; then @@ -202,6 +202,19 @@ if [[ -z "$USE_OPENMP" ]]; then else DOOPENMP=ON fi +# 2022 Intel compilers generate buggy code when USE_OPENMP=1 +if [[ ${FC} == ifort ]] || [[ ${FC} == ifx ]]; then + IFORTVER=$(ifort -v 2>&1|cut -d " " -f 3) + IFORTVER_YEAR=$(echo $IFORTVER | cut -d . -f 1) + if [[ "$IFORTVER_YEAR" -gt "2021" ]]; then + DOOPENMP=OFF + fi + if [[ ${FC} -eq "ifx" ]]; then + DOOPENMP=OFF + fi +fi + + cd tblite rm -rf _build From 4885bdfd3314dc8bd36c6d07453ca16b56a2a633 Mon Sep 17 00:00:00 2001 From: edoapra Date: Thu, 10 Nov 2022 13:54:47 -0800 Subject: [PATCH 7/7] force user to set BLAS_SIZE & SCALAPACK_SIZE --- src/config/makefile.h | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/config/makefile.h b/src/config/makefile.h index fbc06dbdfc..9e72aae2e1 100644 --- a/src/config/makefile.h +++ b/src/config/makefile.h @@ -292,9 +292,6 @@ ifdef BUILD_SCALAPACK $(error ) endif - ifndef SCALAPACK_SIZE - SCALAPACK_SIZE=8 - endif SCALAPACK=-L$(NWCHEM_TOP)/src/libext/lib -lnwc_scalapack endif @@ -2456,12 +2453,12 @@ ifneq ($(TARGET),LINUX) # ifeq ($(_IFCV15ORNEWER), Y) IFORTVER=$(shell ifort -v 2>&1|cut -d " " -f 3) - ifeq ($(IFORTVER),2021.7.0) - $(info ) - $(info ifort 2021.7.0 not validated) - $(info ) - $(error ) - endif +# ifeq ($(IFORTVER),2021.7.0) +# $(info ) +# $(info ifort 2021.7.0 not validated) +# $(info ) +# $(error ) +# endif # fpp seems to get lost with ifort 15 in the offload bit # only use EXPLICITF for offload because otherwise we want debugging to be easy # FOPTIONS += -Qoption,fpp,-P -Qoption,fpp,-c_com=no -allow nofpp_comments @@ -3884,8 +3881,24 @@ ifeq ($(shell echo $(BLASOPT) |awk '/lblas/ {print "Y"; exit}'),Y) DEFINES += -DBLAS_NOTHREADS endif -ifndef BLAS_SIZE - LIB_DEFINES += -DUSE_INTEGER8 +ifneq ($(or $(SCALAPACK),$(SCALAPACK_LIB)),) + ifndef SCALAPACK_SIZE + $(info ) + $(info You must set) + $(info SCALAPACK_SIZE) + $(info ) + $(error ) + endif +endif +ifneq ($(or $(BLASOPT),$(BLAS_LIB)),) + ifndef BLAS_SIZE + $(info ) + $(info You must set) + $(info BLAS_SIZE) + $(info see https://nwchemgit.github.io/Compiling-NWChem.html#how-to-deal-with-integer-size-of-linear-algebra-libraries) + $(info ) + $(error ) + endif endif ifeq ($(BLAS_SIZE),8) LIB_DEFINES += -DUSE_INTEGER8