NWChem/.github/workflows/github_actions.yml

362 lines
12 KiB
YAML

name: NWChem_CI
on:
push:
pull_request:
release:
schedule:
- cron: '0 0 * * SUN'
repository_dispatch:
types: [backend_automation]
workflow_dispatch:
jobs:
build:
if: |
github.event_name == 'schedule' ||
(!contains(github.event.head_commit.message, 'ci skip'))
runs-on: ${{ matrix.os }}
strategy:
matrix:
blas: [build_openblas]
os: [ubuntu-20.04, macos-10.15]
experimental: [false]
mpi_impl:
- openmpi
- mpich
armci_network:
- MPI-TS
xcode_version:
- 11.7
nwchem_modules:
- "tinyqmpw python"
- "qmandpw qmd"
- "tce"
fc:
- gfortran
exclude:
- os: macos-10.15
mpi_impl: mpich
nwchem_modules: "tinyqmpw python"
- os: macos-10.15
mpi_impl: mpich
nwchem_modules: "qmandpw qmd"
include:
- os: ubuntu-latest
experimental: true
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "all"
fc: gfortran
blas: "internal"
- os: ubuntu-18.04
experimental: false
mpi_impl: mpich
armci_network: MPI-PR
nwchem_modules: "tinyqmpw python"
fc: gfortran-11
cc: gcc-11
- os: ubuntu-20.04
experimental: false
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "tce"
fc: gfortran-11
cc: gcc-11
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "qmandpw qmd"
fc: gfortran-11
cc: gcc-11
- os: ubuntu-18.04
experimental: true
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "tinyqmpw python"
fc: amdflang
cc: amdclang
- os: ubuntu-18.04
experimental: true
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "tce"
fc: amdflang
cc: amdclang
- os: ubuntu-20.04
experimental: true
mpi_impl: intel
armci_network: MPI-PR
nwchem_modules: "tinyqmpw python"
fc: ifort
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "tinyqmpw python"
fc: nvfortran
cc: gcc
- os: ubuntu-20.04
experimental: true
mpi_impl: intel
armci_network: SOCKETS
nwchem_modules: "tce"
fc: ifort
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "tce"
fc: flang
cc: clang
- os: ubuntu-20.04
experimental: true
mpi_impl: intel
armci_network: MPI-PR
nwchem_modules: "tinyqmpw python"
fc: ifort
- os: ubuntu-20.04
experimental: true
mpi_impl: intel
armci_network: SOCKETS
nwchem_modules: "tce"
fc: ifort
- os: ubuntu-18.04
experimental: true
mpi_impl: intel
armci_network: MPI-PR
nwchem_modules: "tinyqmpw python"
fc: ifx
- os: ubuntu-18.04
experimental: true
mpi_impl: intel
armci_network: SOCKETS
nwchem_modules: "tce"
fc: ifx
- os: ubuntu-18.04
experimental: true
mpi_impl: openmpi
armci_network: MPI-TS
nwchem_modules: "tinyqmpw"
fc: gfortran
cc: gcc
use_libxc: 1
- os: ubuntu-18.04
experimental: true
mpi_impl: intel
armci_network: MPI-TS
nwchem_modules: "tinyqmpw"
fc: ifort
cc: icc
use_libxc: 1
- os: macos-10.15
experimental: true
mpi_impl: openmpi
armci_network: MPI-TS
nwchem_modules: "tinyqmpw"
fc: gfortran-10
cc: gcc
xcode_version: 12.4
use_libxc: 1
- os: ubuntu-18.04
experimental: true
mpi_impl: mpich
armci_network: MPI-PT
nwchem_modules: "nwdft solvation driver"
fc: gfortran-10
cc: gcc-10
use_simint: 1
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "nwdft solvation driver"
fc: nvfortran
cc: gcc
use_simint: 1
- os: ubuntu-20.04
experimental: true
mpi_impl: intel
armci_network: MPI-TS
nwchem_modules: "nwdft solvation driver"
fc: ifort
cc: icc
use_simint: 1
- os: ubuntu-18.04
experimental: true
mpi_impl: mpich
armci_network: MPI-PR
nwchem_modules: "tinyqmpw python"
fc: gfortran-10
cc: gcc-10
use_libxc: 1
- os: macos-10.15
experimental: true
mpi_impl: openmpi
armci_network: MPI-PR
nwchem_modules: "qmandpw qmd"
fc: gfortran-10
cc: gcc-10
xcode_version: 12.3
- os: macos-11.0
experimental: true
mpi_impl: openmpi
armci_network: MPI-PR
nwchem_modules: "tce"
fc: gfortran-10
cc: gcc-10
xcode_version: 12.5.1
- os: macos-11.0
experimental: true
mpi_impl: openmpi
armci_network: MPI-TS
nwchem_modules: "tinyqmpw"
fc: gfortran-11
xcode_version: 13.2.1
- os: macos-10.15
experimental: true
mpi_impl: openmpi
armci_network: MPI-TS
nwchem_modules: "tinyqmpw"
fc: gfortran-9
blas: "accelerate"
xcode_version: 12.1.1
- os: macos-10.15
experimental: true
mpi_impl: mpich
armci_network: SOCKETS
nwchem_modules: "tinyqmpw"
fc: ifort
xcode_version: 12.4
- os: ubuntu-18.04
experimental: true
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "qmandpw qmd"
fc: gfortran-10
cc: gcc-10
use_openmp: 2
blas: "build_openblas"
- os: ubuntu-20.04
experimental: true
mpi_impl: intel
armci_network: MPI-TS
nwchem_modules: "qmandpw qmd"
fc: ifort
use_openmp: 2
fail-fast: false
env:
MPI_IMPL: ${{ matrix.mpi_impl }}
ARMCI_NETWORK: ${{ matrix.armci_network }}
NWCHEM_MODULES: ${{ matrix.nwchem_modules }}
USE_SIMINT: ${{ matrix.use_simint }}
USE_LIBXC: ${{ matrix.use_libxc }}
FC: ${{ matrix.fc }}
CC: ${{ matrix.cc }}
COMEX_MAX_NB_OUTSTANDING: 4
SIMINT_MAXAM: 4
SIMINT_VECTOR: avx2
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version}}.app/Contents/Developer
BLAS_ENV: ${{ matrix.blas }}
USE_OPENMP: ${{ matrix.use_openmp }}
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 40
- name: Get Instruction
id: get-simd
run: |
echo "::set-output name=simd::$(./travis/guess_simd.sh)"
shell: bash
- name: Setup cache
id: setup-cache
uses: actions/cache@v2
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-v017
- name: fetch apps cache
if: steps.setup-cache.outputs.cache-hit == 'true'
run: |
if [[ -f ~/apps/oneapi/setvars.sh ]]; then \
echo "apps oneapi cache fetched" ; \
export GOT_APPSCACHE="Y" ; fi
- name: build environment
run: |
pwd
ls -lart
./travis/build_env.sh
- name: fetch cache
if: steps.setup-cache.outputs.cache-hit == 'true'
run: |
ls -Rla ~/cache
[ -d ~/cache/libext ] && rsync -av ~/cache/libext/* src/libext/.
[ -d ~/cache/simint/simint_install/lib ] && \
mkdir -p src/NWints/simint/libsimint_source/simint_install && \
rsync -av ~/cache/simint/simint_install/* src/NWints/simint/libsimint_source/simint_install/. || true
[ -f ~/cache/tarballs/dftd3.tgz ] && rsync -av ~/cache/tarballs/dftd3.tgz src/nwpw/nwpwlib/nwpwxc/dftd3.tgz || true
echo "cache fetched"
- name: compile
id: compile
run: |
cc -v
./travis/config_nwchem.sh
./travis/compile_nwchem.sh
- name: Check compilation result
if: ${{ failure() }}
run: |
cat src/tools/build/config.log || true
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
mkdir -p ~/cache/tarballs || true
ls -la src/libext ||true
[ -d "src/libext/lib" ] && rsync -av src/libext/lib/* ~/cache/libext/lib/. || true
[ -d "src/libext/bin" ] && rsync -av src/libext/bin/* ~/cache/libext/bin/. || true
[ -d "src/libext/include" ] && rsync -av src/libext/include/* ~/cache/libext/include/. || true
[ -d "src/NWints/simint/libsimint_source/simint_install/lib" ] && rsync -av src/NWints/simint/libsimint_source/simint_install/* ~/cache/simint/simint_install/. || true
[ -f "src/nwpw/nwpwlib/nwpwxc/dftd3.tgz" ] && rsync -av src/nwpw/nwpwlib/nwpwxc/dftd3.tgz ~/cache/tarballs/dftd3.tgz || true
echo "cache stored"
ls -Rla ~/cache
- name: qa_test
id: qa_test
if: steps.compile.conclusion == 'success'
run: |
./travis/run_qas.sh
- name: Check if QA testing has failed
# if: steps.qa_test.outcome == 'failure' || steps.qa_test.outcome == 'cancelled'
if: ${{ failure() }} && steps.qa_test.outcome == 'failure'
run: |
echo "The steps context is:"
echo "${{ toJson(steps) }}"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!"
if [[ -f QA/testoutputs/dft_he2+.out ]]; then \
grep d= QA/testoutputs/dft_he2+.out || true ; fi
if [[ -f QA/testoutputs/h2o_opt.out ]]; then \
grep @ QA/testoutputs/h2o_opt.out || true ; fi
if [[ -f QA/testoutputs/h2o2-response.out ]]; then \
tail -490 QA/testoutputs/h2o2-response.out || true; fi
if [[ -f QA/testoutputs/prop_mep_gcube.out ]]; then \
tail -30 QA/testoutputs/prop_mep_gcube.out || true; fi
if [[ -f QA/testoutputs/pspw.out ]]; then \
tail -490 QA/testoutputs/pspw.out || true; fi
if [[ -f QA/testoutputs/dft_smear.out ]]; then \
grep @ QA/testoutputs/dft_smear.out || true; fi
if [[ -f QA/testoutputs/dft_smear.out ]]; then \
egrep d= QA/testoutputs/dft_smear.out || true; fi
if [[ -f QA/testoutputs/dft_smear.out ]]; then \
tail -2000 QA/testoutputs/dft_smear.out || true; fi
if [[ -f QA/testoutputs/pspw_md.out ]]; then \
grep 'PSPW energy' QA/testoutputs/pspw_md.out || true; fi