diff --git a/.github/workflows/github_actions_selfhosted.yml b/.github/workflows/github_actions_selfhosted.yml new file mode 100644 index 00000000000..0f9ad25d864 --- /dev/null +++ b/.github/workflows/github_actions_selfhosted.yml @@ -0,0 +1,169 @@ +name: NWChem_CI_selfhosted + +on: + release: + schedule: + - cron: '0 4 * * SAT' + repository_dispatch: + types: [backend_automation] + workflow_dispatch: +jobs: + build_workflow: + uses: ./.github/workflows/update_main.yml + secrets: + inherit + build: + if: | + github.event_name == 'schedule' || + (!contains(github.event.head_commit.message, 'ci skip')) + needs: [build_workflow] + runs-on: ${{ matrix.os }} + timeout-minutes: 2880 + strategy: + matrix: + os: + - [self-hosted, ubuntu1604] + - [self-hosted, osx-arm64] + blas: [build_openblas] + blas_size: + - 8 + experimental: [false] + armci_network: + - MPI-PR + nwchem_modules: + - "all python xtb" + fc: + - gfortran + use_simint: + - 1 + use_libxc: + - 1 + use_tblite: + - 1 + build_plumed: + - 1 + branch: + - main + include: + - os: [self-hosted, ubuntu1804] + experimental: false + mpi_impl: intel + armci_network: MPI-TS + nwchem_modules: "all python xtb" + fc: ifort + blas: "build_openblas" + use_libxc: 1 + use_openmp: 2 + use_tblite: 1 + - os: [self-hosted, ubuntu1604] + experimental: false + mpi_impl: intel + armci_network: SOCKETS + nwchem_modules: "all python xtb" + fc: ifx + blas: "build_openblas" + use_libxc: 1 + use_tblite: 1 + - os: [self-hosted, fedora] + experimental: false + mpi_impl: openmpi + armci_network: MPI-TS + nwchem_modules: "all python xtb" + fc: gfortran + blas: "build_openblas" + use_libxc: 1 + use_simint: 1 + use_openmp: 2 + use_tblite: 1 + branch: hotfix/release-7-2-0 + - os: [self-hosted, ubuntu2304] + experimental: false + mpi_impl: openmpi + armci_network: MPI-PT + nwchem_modules: "all python xtb" + fc: gfortran + blas: "build_openblas" + use_libxc: 1 + use_openmp: 2 + use_tblite: 1 + branch: hotfix/release-7-2-0 + 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 }} + USE_TBLITE: ${{ matrix.use_tblite }} + BUILD_PLUMED: ${{ matrix.build_plumed }} + FC: ${{ matrix.fc }} + CC: ${{ matrix.cc }} + COMEX_MAX_NB_OUTSTANDING: 16 + SIMINT_MAXAM: 4 + SIMINT_VECTOR: avx2 + BLAS_ENV: ${{ matrix.blas }} + BLAS_SIZE: ${{ matrix.blas_size }} + USE_OPENMP: ${{ matrix.use_openmp }} + continue-on-error: ${{ matrix.experimental }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 32 + ref: ${{ matrix.branch }} + clean: true + - name: Get Instruction + id: get-simd + run: | + echo "simd=$(./travis/guess_simd.sh)" >> $GITHUB_ENV + shell: bash + - name: Clear cache dir + run: | + rm -rf ~/cache || true + shell: bash + - name: Setup cache + id: setup-cache + uses: actions/cache@v3 + with: + path: | + ~/cache + key: ${{ runner.os }}-${{ matrix.mpi_impl}}-${{ matrix.fc}}-xcode${{ matrix.xcode_version}}-simint${{ matrix.use_simint}}-blas${{ matrix.blas}}-blas_size${{ matrix.blas_size}}-libxc${{matrix.use_libxc}}-tblite${{matrix.use_tblite}}-simd${{ env.simd }}-nwchemcache-v003 + - name: fetch cache + if: steps.setup-cache.outputs.cache-hit == 'true' + run: | + ./travis/cache_fetch.sh + - name: compile + id: compile + run: | + ./travis/config_nwchem.sh + ./travis/compile_nwchem.sh + - name: Check compilation result + if: ${{ failure() }} + run: | + ./travis/compile_check.sh + - name: store cache + run: | + ./travis/cache_store.sh + - name: qa_test + id: qa_test + if: steps.compile.conclusion == 'success' + run: | + export TRAVIS_BUILD_DIR=`pwd` + unset USE_SIMINT + mytee=tee + if [[ `uname -s` == "Darwin" ]]; then mytee=gtee; dist=Darwin; fi + if test -f "/usr/lib/os-release"; then dist=$(grep ID= /etc/os-release |grep -v VERSION|head -1 |cut -c4-| sed 's/\"//g') ; fi + if [[ $dist == "fedora" ]]; then nprocs=2; else nprocs=3 ;fi + echo nprocs is $nprocs + source travis/nwchem.bashrc; cd QA && ./doqmtests.mpi $nprocs | $mytee >(ts "%d%b%Y %H:%M:%S" > ../../../../doqmtests.mpi.log.` date +%b%d%Y_%H:%M`) + shell: bash + - name: Check if QA testing has failed + if: ${{ failure() }} && steps.qa_test.outcome == 'failure' + run: | + ./travis/check_qas.sh + + + + + + diff --git a/.github/workflows/github_actions_tahoma.yml b/.github/workflows/github_actions_tahoma.yml new file mode 100644 index 00000000000..fc4d223d74d --- /dev/null +++ b/.github/workflows/github_actions_tahoma.yml @@ -0,0 +1,83 @@ +name: NWChem_CI_tahoma + +on: + repository_dispatch: + types: [backend_automation] + workflow_dispatch: +jobs: + build_workflow: + uses: edoapra/nwchem/.github/workflows/update_main.yml@main + secrets: + inherit + build_singularity: + needs: [build_workflow] + uses: edoapra/nwchem-singularity/.github/workflows/apptainer_action.ifx.yml@master + secrets: + inherit + test_on_tahoma: + needs: [build_singularity] + runs-on: ${{ matrix.os }} + timeout-minutes: 2880 + strategy: + matrix: + os: + - [self-hosted, centos7] + branch: + - hotfix/release-7-2-0 + - master + sing_image: + - ompi41x.ifx + - ompi41x.ifort + - ompi41x + - mpi-ts.ompi41x.ifort + fail-fast: false + env: + USE_LIBXC: 1 + COMEX_MAX_NB_OUTSTANDING: 8 + SINGULARITYENV_NWCHEM_BASIS_LIBRARY: /cluster/apps/nwchem/nwchem/src/basis/libraries/ + SINGULARITYENV_SCRATCH_DIR: /big_scratch + APPTAINERENV_NWCHEM_BASIS_LIBRARY: /cluster/apps/nwchem/nwchem/src/basis/libraries/ + APPTAINERENV_SCRATCH_DIR: /big_scratch + MPIRUN_NPOPT: -n + NWCHEM_EXECUTABLE: "singularity exec /big_scratch/nwchems.img nwchem " + steps: + - name: nwchem version tag + run: | + if [[ ${{ matrix.branch }} == master ]]; then + echo "nwversion=dev" >> $GITHUB_ENV + else + echo "nwversion=720" >> $GITHUB_ENV + fi + - name: dir name + run: | + echo "dirname=nwchem-${{ env.nwversion }}${{ github.nwversion }}.${{ github.run_id }}.${{ github.run_number }}.${{ matrix.sing_image }}" >> $GITHUB_ENV + - name: Checkout QA code + run: | + pwd + cd .. + rm -rf ${{ env.dirname }} + wget -q https://github.com/nwchemgit/nwchem/tarball/${{ matrix.branch }} -O - | tar -xz --exclude=src --exclude=contrib --exclude=web --exclude=examples --exclude=doc --exclude=travis --exclude="nwxc*" --exclude="chem-library-tests" + mv nwchemgit-nwchem-* ${{ env.dirname }} + ls -lr ${{ env.dirname }}/QA + shell: bash + + - name: load singularity image + run: | + export https_proxy=http://proxy.emsl.pnl.gov:3128 + singularity pull -F --name ./nwchems_`id -u`.img oras://ghcr.io/edoapra/nwchem/nwchem-${{ env.nwversion }}.${{ matrix.sing_image }}:latest + srun -N $SLURM_NNODES -n $SLURM_NNODES cp ./nwchems_`id -u`.img /big_scratch/nwchems.img + shell: bash + - name: run qa tests + run: | + cd ../${{ env.dirname }}/QA + env|egrep SLUR + source /etc/profile.d/modules.sh + module purge + module load gcc/9.3.0 + module load openmpi/4.1.4 + export https_proxy=http://proxy.emsl.pnl.gov:3128 + export MPIRUN_PATH=`which srun` + MYNN=$(( $SLURM_NNODES*$SLURM_NTASKS_PER_NODE )) + echo MYNN is $MYNN + (echo ${{ env.nwversion }}.${{ matrix.sing_image }}; ./doqmtests.mpi $MYNN flaky ; echo ${{ env.nwversion }}.${{ matrix.sing_image }}) | tee >(ts "%d%b%Y %H:%M:%S" > ../../../../doqmtests.mpi.log.` date +%b%d%Y_%H:%M`) + shell: bash diff --git a/.github/workflows/update_main.yml b/.github/workflows/update_main.yml new file mode 100644 index 00000000000..4628e18e45e --- /dev/null +++ b/.github/workflows/update_main.yml @@ -0,0 +1,45 @@ +name: update_main_branch + +on: + schedule: + - cron: '0 0 * * *' + repository_dispatch: + types: [backend_automation] + workflow_dispatch: + workflow_call: +jobs: + update_branch: + if: | + github.event_name == 'schedule' || + (!contains(github.event.head_commit.message, 'ci skip')) + runs-on: [ubuntu-latest] + steps: + - name: Checkout nwchem + uses: actions/checkout@v3 + with: + repository: nwchemgit/nwchem + persist-credentials: false + fetch-depth: 0 + - name: update with cherrypicks + run: | + set -ex + echo " pwd " `pwd` + git remote rename origin upstream + git remote add origin https://github.com/edoapra/nwchem + git fetch origin + git config user.name "edoapra" + git config user.email "edoardo.apra@gmail.com" + cd .github/workflows + rm -f update_main.yml github_actions_selfhosted.yml + curl -L https://raw.githubusercontent.com/nwchemgit/nwchem/master/contrib/git.nwchem/update_main.txt > update_main.yml + curl -L https://raw.githubusercontent.com/nwchemgit/nwchem/master/contrib/git.nwchem/github_actions_selfhosted.txt > github_actions_selfhosted.yml + curl -L https://raw.githubusercontent.com/nwchemgit/nwchem/master/contrib/git.nwchem/github_actions_tahoma.txt > github_actions_tahoma.yml + git add update_main.yml github_actions_selfhosted.yml github_actions_tahoma.yml + git commit -m 'update main from nwchemgit master plus selfhosted [ci skip]' update_main.yml github_actions_selfhosted.yml github_actions_tahoma.yml + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.UPDATE_TOKEN }} + repository: edoapra/nwchem + force: true + branch: ${{ github.ref }}