diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index ac463a8621..5a35bd06d3 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -144,6 +144,13 @@ jobs: fc: gfortran-9 blas: "accelerate" xcode_version: 12.1 + - os: macos-10.15 + experimental: true + mpi_impl: mpich + armci_network: mpi-ts + nwchem_modules: "tinyqmpw" + fc: ifort + xcode_version: 12.5 - os: ubuntu-20.04 experimental: true mpi_impl: mpich @@ -189,6 +196,7 @@ jobs: with: path: | ~/cache + ~/apps key: ${{ matrix.os }}-${{ matrix.mpi_impl}}-${{ matrix.fc}}-xcode${{ matrix.xcode_version}}-simint${{ matrix.use_simint}}-blas${{ matrix.blas}}-simd${{ steps.get-simd.outputs.simd }}-nwchemcache-v007 - name: build environment run: | @@ -218,6 +226,7 @@ jobs: cat src/tools/build/comex/config.log || true - name: store cache run: | + mkdir -p ~/apps || true mkdir -p ~/cache/libext/lib ~/cache/libext/bin ~/cache/libext/include ~/cache/libext/mpich || true mkdir -p ~/cache/libext/mpich/mpich || true mkdir -p ~/cache/simint/simint_install || true diff --git a/travis/build_env.sh b/travis/build_env.sh index 4c9f96d97b..f5b78247a0 100755 --- a/travis/build_env.sh +++ b/travis/build_env.sh @@ -16,14 +16,51 @@ if [ -z "$DISTR" ] ; then DISTR=$dist fi echo DISTR is "$DISTR" +case "$os" in + Darwin) + IONEAPI_ROOT=~/apps/oneapi + ;; + Linux) + IONEAPI_ROOT=/opt/intel/oneapi + ;; +esac if [[ "$os" == "Darwin" ]]; then # 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" python3 ||true - #hack to fix Github actions mpif90 - ln -sf /usr/local/bin/$FC /usr/local/bin/gfortran - $FC --version - gfortran --version + if [[ "$FC" == "ifort" ]]; then + mkdir -p ~/mntdmg ~/apps/oneapi || true + cd ~/Downloads + dir_base="17714" + dir_hpc="17643" + base="m_BaseKit_p_2021.2.0.2855_offline" + hpc="m_HPCKit_p_2021.2.0.2903_offline" + curl -LJO https://registrationcenter-download.intel.com/akdlm/irc_nas/"$dir_base"/"$base".dmg + curl -LJO https://registrationcenter-download.intel.com/akdlm/irc_nas/"$dir_hpc"/"$hpc".dmg + echo "installing BaseKit" + hdiutil attach "$base".dmg -mountpoint ~/mntdmg -nobrowse + sudo ~/mntdmg/bootstrapper.app/Contents/MacOS/install.sh --cli --eula accept \ + --action install --components default --install-dir ~/apps/oneapi + hdiutil detach ~/mntdmg + # + echo "installing HPCKit" + hdiutil attach "$hpc".dmg -mountpoint ~/mntdmg -nobrowse + sudo ~/mntdmg/bootstrapper.app/Contents/MacOS/install.sh --cli --eula accept \ + --action install --components default --install-dir ~/apps/oneapi + hdiutil detach ~/mntdmg + ls -lrta ~/apps ||true + sudo rm -rf "$IONEAPI_ROOT"/intelpython "$IONEAPI_ROOT"/dal "$IONEAPI_ROOT"/advisor \ + "$IONEAPI_ROOT"/ipp "$IONEAPI_ROOT"/conda_channel "$IONEAPI_ROOT"/dnnl \ + "$IONEAPI_ROOT"/installer "$IONEAPI_ROOT"/vtune_profiler "$IONEAPI_ROOT"/tbb || true + source "$IONEAPI_ROOT"/setvars.sh || true + ifort -V + icc -V + else + #hack to fix Github actions mpif90 + ln -sf /usr/local/bin/$FC /usr/local/bin/gfortran + $FC --version + gfortran --version + fi # if [[ "$MPI_IMPL" == "openmpi" ]]; then # HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install scalapack # fi @@ -53,7 +90,7 @@ fi if [[ "$MPI_IMPL" == "mpich" ]]; then mpi_bin="mpich" ; mpi_libdev="libmpich-dev" scalapack_libdev="libscalapack-mpich-dev" fi - if [[ "$MPI_IMPL" == "intel" ]]; then + if [[ "$MPI_IMPL" == "intel" || "$FC" == "ifort" ]]; then export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 tries=0 ; until [ "$tries" -ge 5 ] ; do \ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ diff --git a/travis/compile_nwchem.sh b/travis/compile_nwchem.sh index 80351f11f2..4ab5d716ff 100755 --- a/travis/compile_nwchem.sh +++ b/travis/compile_nwchem.sh @@ -41,14 +41,18 @@ if [[ "$arch" == "aarch64" ]]; then else if [[ "$FC" == "ifort" ]] ; then FOPT=-O2 - export USE_FPICF=Y + if [[ "$os" == "Darwin" ]]; then + export BUILD_MPICH=1 + else + export USE_FPICF=Y + export SCALAPACK_LIB=" -lmkl_scalapack_ilp64 -lmkl_blacs_intelmpi_ilp64 -lpthread -lm -ldl" + export SCALAPACK_SIZE=8 + unset BUILD_OPENBLAS + unset BUILD_SCALAPACK + fi export BLASOPT=" -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl" - export LAPACK_LIB=" -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl" - export SCALAPACK_LIB=" -lmkl_scalapack_ilp64 -lmkl_blacs_intelmpi_ilp64 -lpthread -lm -ldl" export BLAS_SIZE=8 - export SCALAPACK_SIZE=8 - unset BUILD_OPENBLAS - unset BUILD_SCALAPACK + export LAPACK_LIB="$BLASOPT" elif [[ "$FC" == "flang" ]] || [[ "$(basename -- $FC | cut -d \- -f 1)" == "nvfortran" ]] ; then export BUILD_MPICH=1 if [[ "$FC" == "flang" ]]; then diff --git a/travis/nwchem.bashrc b/travis/nwchem.bashrc index 5052b05b28..060bcb381d 100644 --- a/travis/nwchem.bashrc +++ b/travis/nwchem.bashrc @@ -47,10 +47,18 @@ if [[ "$FC" == "nvfortran" ]]; then # export CC=gcc fi if [[ "$FC" == "ifort" ]]; then - source /opt/intel/oneapi/compiler/latest/env/vars.sh + case "$os" in + Darwin) + IONEAPI_ROOT=~/apps/oneapi + ;; + Linux) + IONEAPI_ROOT=/opt/intel/oneapi + ;; + esac + source "$IONEAPI_ROOT"/compiler/latest/env/vars.sh ifort -V - if [ -f /opt/intel/oneapi/mkl/latest/env/vars.sh ] ; then - source /opt/intel/oneapi/mkl/latest/env/vars.sh + if [ -f "$IONEAPI_ROOT"/mkl/latest/env/vars.sh ] ; then + source "$IONEAPI_ROOT"/mkl/latest/env/vars.sh fi fi if [[ "$MPI_IMPL" == "intel" ]]; then