From 541e0fc5bfea8b175cbdf9a947f804d28e5dc9c5 Mon Sep 17 00:00:00 2001 From: edoapra Date: Sat, 27 Apr 2024 23:37:44 -0700 Subject: [PATCH 01/10] fix check_mpi_inc.sh --- src/config/makefile.h | 4 ++-- src/tools/check_mpi_inc.sh | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/config/makefile.h b/src/config/makefile.h index bfaeef83a5..cd95e9cbd0 100644 --- a/src/config/makefile.h +++ b/src/config/makefile.h @@ -3883,7 +3883,7 @@ ifdef USE_MPI endif endif # check if mpif90 is present - MPIF90YN := $(shell $(NWCHEM_TOP)/src/tools/check_mpi_inc.sh) + MPIF90YN := $(shell $(NWCHEM_TOP)/src/tools/check_mpi_inc.sh $(NWCHEM_TOP)) ifeq ($(MPIF90YN),mpif90notfound) errormpif90: $(info ) @@ -3893,7 +3893,7 @@ ifdef USE_MPI $(error ) endif - NWMPI_INCLUDE := $(shell $(NWCHEM_TOP)/src/tools/check_mpi_inc.sh) + NWMPI_INCLUDE := $(shell $(NWCHEM_TOP)/src/tools/check_mpi_inc.sh $(NWCHEM_TOP)) NWMPI_LIB := $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_lib) NWLIBMPI := $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --libmpi) endif diff --git a/src/tools/check_mpi_inc.sh b/src/tools/check_mpi_inc.sh index fdaebcc1ab..1b60875421 100755 --- a/src/tools/check_mpi_inc.sh +++ b/src/tools/check_mpi_inc.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash -if [ ! -f ${NWCHEM_TOP}/src/mpi_include.txt ]; then - ${NWCHEM_TOP}/src/tools/guess-mpidefs --mpi_include > ${NWCHEM_TOP}/src/mpi_include.txt +if [ $# -eq 0 ] + then + echo "NWCHEM_TOP arg missing" + exit 1 fi -cat ${NWCHEM_TOP}/src/mpi_include.txt +if [ ! -f $1/src/mpi_include.txt ]; then + $1/src/tools/guess-mpidefs --mpi_include > $1/src/mpi_include.txt +fi +cat $1/src/mpi_include.txt From b7d94d6b712c90ac5063748ba7db81fc723eb6a0 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Apr 2024 11:19:42 -0700 Subject: [PATCH 02/10] xcode-select XCODE_VERSION --- .github/workflows/github_actions.yml | 3 ++- travis/build_env.sh | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 8ca52b2e8a..65292fd7f4 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -338,7 +338,7 @@ jobs: armci_network: MPI-PT nwchem_modules: "nwdft solvation driver" fc: ifort - xcode_version: 14.0.1 + xcode_version: 14.3.1 - os: ubuntu-20.04 experimental: true mpi_impl: mpich @@ -446,6 +446,7 @@ jobs: BLAS_ENV: ${{ matrix.blas }} BLAS_SIZE: ${{ matrix.blas_size }} USE_OPENMP: ${{ matrix.use_openmp }} + XCODE_VERSION: ${{ matrix.xcode_version }} continue-on-error: ${{ matrix.experimental }} steps: - name: pkg cleanup diff --git a/travis/build_env.sh b/travis/build_env.sh index 3b608d4fdb..e480d958eb 100755 --- a/travis/build_env.sh +++ b/travis/build_env.sh @@ -30,7 +30,10 @@ if [ -z "$DISTR" ] ; then fi echo DISTR is "$DISTR" IONEAPI_ROOT=~/apps/oneapi - if [[ "$os" == "Darwin" ]]; then +if [[ "$os" == "Darwin" ]]; then + echo "XCODE_VERSION is $XCODE_VERSION" + echo " ls -l on App xcode " $(ls -l /Applications|grep -i xcode) + $MYSUDO xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app/Contents/Developer # HOMEBREW_NO_AUTO_UPDATE=1 brew cask uninstall oclint || true # HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc "$MPI_IMPL" openblas python3 ||true HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc "$MPI_IMPL" gsed grep automake autoconf ||true @@ -52,6 +55,8 @@ echo DISTR is "$DISTR" # ln -sf /usr/local/bin/$FC /usr/local/bin/gfortran $FC --version gfortran --version + echo "Xcode version " $(xcodebuild -version |tail -1) + echo "Clang version " $(clang -v) if [[ "$FC" == "ifort" ]] || [[ "$FC" == "ifx" ]] ; then if [[ -f "$IONEAPI_ROOT"/setvars.sh ]]; then echo ' using intel cache installation ' From 7b415be89240ba9b0f984edc80ed55798dce6dfb Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Apr 2024 12:24:07 -0700 Subject: [PATCH 03/10] do not quit on brew unlink open-mpi --- travis/build_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/build_env.sh b/travis/build_env.sh index e480d958eb..9f4a9b9843 100755 --- a/travis/build_env.sh +++ b/travis/build_env.sh @@ -98,7 +98,7 @@ if [[ "$os" == "Darwin" ]]; then if [[ "$MPI_IMPL" == "mpich" ]]; then # brew install mpich && brew upgrade mpich && brew unlink openmpi && brew unlink mpich && brew link --overwrite mpich ||true brew update || true - brew unlink open-mpi && brew install mpich && brew upgrade mpich && brew link --overwrite mpich || true + brew unlink open-mpi || true && brew install mpich && brew upgrade mpich && brew link --overwrite mpich || true fi if [[ "$BLAS_ENV" == "brew_openblas" ]]; then brew install openblas From ba698840c037e78f894f403ff5bb99101598c9f1 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Apr 2024 13:49:20 -0700 Subject: [PATCH 04/10] fix XCODE_VERSIO handling --- .github/workflows/github_actions.yml | 4 ++-- travis/build_env.sh | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 65292fd7f4..2d046ddf30 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -316,14 +316,14 @@ jobs: nwchem_modules: "tce" fc: gfortran-11 cc: gcc-11 - xcode_version: 13.4.1 + xcode_version: 14.3.1 - os: macos-latest experimental: true mpi_impl: openmpi armci_network: MPI-TS nwchem_modules: "tinyqmpw" fc: gfortran-11 - xcode_version: 13.4.1 + xcode_version: 14.3.1 - os: macos-latest experimental: true mpi_impl: openmpi diff --git a/travis/build_env.sh b/travis/build_env.sh index 9f4a9b9843..92becb2129 100755 --- a/travis/build_env.sh +++ b/travis/build_env.sh @@ -30,10 +30,14 @@ if [ -z "$DISTR" ] ; then fi echo DISTR is "$DISTR" IONEAPI_ROOT=~/apps/oneapi -if [[ "$os" == "Darwin" ]]; then - echo "XCODE_VERSION is $XCODE_VERSION" - echo " ls -l on App xcode " $(ls -l /Applications|grep -i xcode) - $MYSUDO xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app/Contents/Developer + if [[ "$os" == "Darwin" ]]; then + if [ -z $XCODE_VERSION ]; then + echo XCODE_VERSION is not set + else + echo "XCODE_VERSION is $XCODE_VERSION" + echo " ls -l on App xcode " $(ls -l /Applications|grep -i xcode) + $MYSUDO xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app/Contents/Developer + fi # HOMEBREW_NO_AUTO_UPDATE=1 brew cask uninstall oclint || true # HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc "$MPI_IMPL" openblas python3 ||true HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc "$MPI_IMPL" gsed grep automake autoconf ||true From 807726255d2ccc78ea0a4e93f12bba088d7bb62e Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Apr 2024 13:59:27 -0700 Subject: [PATCH 05/10] use xcode 15.3 to debug pspw_md failure --- .github/workflows/github_actions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 2d046ddf30..19b1ca9708 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -262,6 +262,7 @@ jobs: fc: gfortran-12 cc: gcc use_libxc: 1 + xcode_version: 15.3 - os: macos-14 experimental: true mpi_impl: openmpi From 924214f73c681172418cbcc8db8ce15137b24942 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Apr 2024 15:18:40 -0700 Subject: [PATCH 06/10] fix xcode version check --- src/config/fix_xcode15.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/fix_xcode15.sh b/src/config/fix_xcode15.sh index 01eabf579b..493a65ec10 100755 --- a/src/config/fix_xcode15.sh +++ b/src/config/fix_xcode15.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash if [[ $(uname -s) == "Darwin" ]]; then - xcode_v=$(clang --version|head -1 |cut -d ' ' -f 4 |cut -d . -f 1) + xcode_v=$(clang --version 2>&1 |head -1 |cut -d ' ' -f 4 |cut -d . -f 1) # echo $xcode_v if [[ $( [ $xcode_v -ge 15 ] && echo 1) ]] ; then echo got xcode15 From c7dec997d286db35b8e15463a1620b7a9cd98cd6 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Apr 2024 16:26:36 -0700 Subject: [PATCH 07/10] skip xcode14 since homebrew openmpi usese -ld_classic --- .github/workflows/github_actions.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 19b1ca9708..4486b20f24 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -259,7 +259,7 @@ jobs: mpi_impl: openmpi armci_network: MPI-TS nwchem_modules: "tinyqmpw" - fc: gfortran-12 + fc: gfortran-11 cc: gcc use_libxc: 1 xcode_version: 15.3 @@ -317,14 +317,14 @@ jobs: nwchem_modules: "tce" fc: gfortran-11 cc: gcc-11 - xcode_version: 14.3.1 + xcode_version: 15.4 - os: macos-latest experimental: true mpi_impl: openmpi armci_network: MPI-TS nwchem_modules: "tinyqmpw" - fc: gfortran-11 - xcode_version: 14.3.1 + fc: gfortran-12 + xcode_version: 15.4 - os: macos-latest experimental: true mpi_impl: openmpi @@ -339,7 +339,7 @@ jobs: armci_network: MPI-PT nwchem_modules: "nwdft solvation driver" fc: ifort - xcode_version: 14.3.1 + xcode_version: 15.4 - os: ubuntu-20.04 experimental: true mpi_impl: mpich From e3aa2711235e646b02c7208424649f7c171483bd Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Apr 2024 19:10:28 -0700 Subject: [PATCH 08/10] disable parallel make for make 4.4 (Fedora 40 failure) --- src/libext/openblas/build_openblas.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libext/openblas/build_openblas.sh b/src/libext/openblas/build_openblas.sh index 10314089be..b7c266ffa4 100755 --- a/src/libext/openblas/build_openblas.sh +++ b/src/libext/openblas/build_openblas.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash #set -v arch=`uname -m` -VERSION=0.3.26 +VERSION=0.3.27 #COMMIT=974acb39ff86121a5a94be4853f58bd728b56b81 BRANCH=develop if [ -f OpenBLAS-${VERSION}.tar.gz ]; then @@ -250,13 +250,19 @@ fi GOTFREEBSD=$(uname -o 2>&1|awk ' /FreeBSD/ {print "1";exit}') MYMAKE=make MAKEJ="MAKE_NB_JOBS=2" +MAKE_MAJOR=$(make --version 2>& 1|head -1| cut -d " " -f 3 |cut -d . -f 1) +MAKE_MINOR=$(make --version 2>& 1|head -1| cut -d " " -f 3 |cut -d . -f 2) +if [[ ${MAKE_MAJOR} -ge 4 ]] && [[ ${MAKE_MINOR} -ge 4 ]]; then + MAKEJ="MAKE_NB_JOBS=1" + echo MAKEJ is $MAKEJ +fi if [[ "${GOTFREEBSD}" == 1 ]]; then MAKEJ="MAKE_NB_JOBS=1" MYMAKE=gmake fi echo FC is $FC echo CC is $CC -echo $MYMAKE FC=$FC $FORCETARGET LAPACK_FPFLAGS=$LAPACK_FPFLAGS_VAL INTERFACE64=$sixty4_int BINARY=$binary NUM_THREADS=$MYNTS NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD=$THREADOPT libs netlib $MAKEJ +echo $MYMAKE FC=$FC $FORCETARGET LAPACK_FPFLAGS=$LAPACK_FPFLAGS_VAL INTERFACE64=$sixty4_int BINARY=$binary NUM_THREADS=$MYNTS NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD=$THREADOPT libs netlib $MAKEJ echo echo OpenBLAS compilation in progress echo output redirected to libext/openblas/OpenBLAS/openblas.log @@ -268,7 +274,7 @@ elif [[ ${FLANG_NEW} == "true" ]]; then echo $MYMAKE FC=$FC CC=$CC HOSTCC=gcc $FORCETARGET FCOMMON_OPT="$LAPACK_FPFLAGS_VAL" LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=128 NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD ="$THREADOPT" libs netlib $MAKEJ $MYMAKE FC=$FC CC=$CC HOSTCC=gcc $FORCETARGET FCOMMON_OPT="$LAPACK_FPFLAGS_VAL" LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=128 NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib $MAKEJ >& openblas.log else - $MYMAKE FC=$FC CC=$CC HOSTCC=gcc $FORCETARGET LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=128 NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib $MAKE >& openblas.log + $MYMAKE FC=$FC CC=$CC HOSTCC=gcc $FORCETARGET LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=128 NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib $MAKE $MAKEJ >& openblas.log fi if [[ "$?" != "0" ]]; then echo error code '$?' From 0cab711408239b6876a2ecd3bf19c473d6883d32 Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Apr 2024 19:14:26 -0700 Subject: [PATCH 09/10] use gfortran-11 instead of gfortran-12 --- .github/workflows/github_actions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 4486b20f24..59feb21045 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -323,7 +323,8 @@ jobs: mpi_impl: openmpi armci_network: MPI-TS nwchem_modules: "tinyqmpw" - fc: gfortran-12 + fc: gfortran-11 + cc: gcc-11 xcode_version: 15.4 - os: macos-latest experimental: true From 604f93f579b841b62d689165b7adb8f36a244205 Mon Sep 17 00:00:00 2001 From: edoapra Date: Tue, 30 Apr 2024 10:49:31 -0700 Subject: [PATCH 10/10] use macos-12 with ifort since QAs hang on macos-13 --- .github/workflows/github_actions.yml | 2 +- travis/run_qas.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 59feb21045..50b274c598 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -334,7 +334,7 @@ jobs: fc: gfortran-13 blas: "accelerate" blas_size: 4 - - os: macos-13 + - os: macos-12 experimental: true mpi_impl: mpich armci_network: MPI-PT diff --git a/travis/run_qas.sh b/travis/run_qas.sh index 0d1590dac7..2ad9e191e5 100755 --- a/travis/run_qas.sh +++ b/travis/run_qas.sh @@ -35,7 +35,7 @@ if [[ ! -z "$USE_OPENMP" ]]; then export OMP_NUM_THREADS="$USE_OPENMP" export OMP_STACKSIZE=32M fi -if [[ "$arch" == "aarch64" ]] || [[ "$os" == "Darwin" && "$BUILD_MPICH" == 1 ]] ; then +if [[ "$arch" == "aarch64" ]] || [[ "$os" == "Darwin" && "$BUILD_MPICH" == 1 ]] || [[ "$os" == "Darwin" && "$ARMCI_NETWORK" == MPI-PT ]] ; then nprocs=1 fi env|egrep MP