Skip to content

Commit

Permalink
Merge pull request #971 from edoapra/make44
Browse files Browse the repository at this point in the history
updates
  • Loading branch information
nwchemgit committed Apr 30, 2024
2 parents 3804d4c + 604f93f commit f1e947e
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 17 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/github_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,10 @@ 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
- os: macos-14
experimental: true
mpi_impl: openmpi
Expand Down Expand Up @@ -316,14 +317,15 @@ jobs:
nwchem_modules: "tce"
fc: gfortran-11
cc: gcc-11
xcode_version: 13.4.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: 13.4.1
cc: gcc-11
xcode_version: 15.4
- os: macos-latest
experimental: true
mpi_impl: openmpi
Expand All @@ -332,13 +334,13 @@ jobs:
fc: gfortran-13
blas: "accelerate"
blas_size: 4
- os: macos-13
- os: macos-12
experimental: true
mpi_impl: mpich
armci_network: MPI-PT
nwchem_modules: "nwdft solvation driver"
fc: ifort
xcode_version: 14.0.1
xcode_version: 15.4
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
Expand Down Expand Up @@ -446,6 +448,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
Expand Down
2 changes: 1 addition & 1 deletion src/config/fix_xcode15.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/config/makefile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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
Expand Down
12 changes: 9 additions & 3 deletions src/libext/openblas/build_openblas.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 '$?'
Expand Down
11 changes: 8 additions & 3 deletions src/tools/check_mpi_inc.sh
Original file line number Diff line number Diff line change
@@ -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
13 changes: 11 additions & 2 deletions travis/build_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ if [ -z "$DISTR" ] ; then
fi
echo DISTR is "$DISTR"
IONEAPI_ROOT=~/apps/oneapi
if [[ "$os" == "Darwin" ]]; then
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
Expand All @@ -52,6 +59,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 '
Expand Down Expand Up @@ -93,7 +102,7 @@ echo DISTR is "$DISTR"
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
Expand Down
2 changes: 1 addition & 1 deletion travis/run_qas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f1e947e

Please sign in to comment.