Skip to content

Commit

Permalink
Merge pull request #64 from ecmwf-ifs/naan-disable-hpc-ci
Browse files Browse the repository at this point in the history
Add hpc-ci with CPU and temporarily disable hpc-ci with GPU until GPU offload is reenabled
  • Loading branch information
wdeconinck authored Feb 7, 2025
2 parents 3d6c939 + a40f147 commit 90d1c4d
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 25 deletions.
86 changes: 61 additions & 25 deletions .github/workflows/build-hpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
# Allow workflow to be dispatched on demand
workflow_dispatch: ~

# Trigger after public PR approved for CI
pull_request_target:
types: [labeled]

env:
ECWAM_TOOLS: ${{ github.workspace }}/.github/tools
CTEST_PARALLEL_LEVEL: 1
Expand All @@ -17,25 +21,57 @@ env:
jobs:
ci-hpc:
name: ci-hpc
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}

strategy:
fail-fast: false # false: try to complete all jobs

matrix:
name:
- ac-gpu nvhpc sp
# - ac-gpu nvhpc sp
- ac-cpu intel sp

include:
- name: ac-gpu nvhpc sp
# - name: ac-gpu nvhpc sp
# site: ac-batch
# sbatch_options: |
# #SBATCH --time=00:20:00
# #SBATCH --nodes=1
# #SBATCH --ntasks=4
# #SBATCH --cpus-per-task=32
# #SBATCH --gpus-per-task=1
# #SBATCH --mem=0
# #SBATCH --qos=dg
# modules:
# - cmake
# - fcm
# - ninja
# - ecbuild
# - prgenv/nvidia
# - hpcx-openmpi/2.14.0-cuda
# - python3
# gpu: 1

- name: ac-cpu intel sp
site: ac-batch
sbatch_options: |
#SBATCH --time=00:20:00
#SBATCH --nodes=1
#SBATCH --ntasks=4
#SBATCH --cpus-per-task=32
#SBATCH --gpus-per-task=1
#SBATCH --mem=0
#SBATCH --qos=dg
#SBATCH --hint=nomultithread
#SBATCH --mem=60GB
#SBATCH --qos=np
modules:
- cmake
- fcm
- ninja
- ecbuild
- prgenv/intel
- intel/2021.4.0
- hpcx-openmpi/2.9.0
- python3
gpu: 0

runs-on: [self-hosted, linux, hpc]
env:
Expand All @@ -47,53 +83,51 @@ jobs:
troika_user: ${{ secrets.HPC_CI_SSH_USER }}
sbatch_options: ${{ matrix.sbatch_options }}
template_data: |
modules:
- cmake
- fcm
- ninja
- ecbuild
- prgenv/nvidia
- hpcx-openmpi/2.14.0-cuda
- python3
cmake_options:
- -DENABLE_MPI=ON
- -DENABLE_LOKI=ON
- -DENABLE_ACC=ON
- -DENABLE_CUDA=ON
- -DENABLE_GPU_AWARE_MPI=ON
- -DENABLE_LOKI=${{ matrix.gpu }}
- -DENABLE_ACC=${{ matrix.gpu }}
- -DENABLE_CUDA=${{ matrix.gpu }}
- -DENABLE_GPU_AWARE_MPI=${{ matrix.gpu }}
- -DENABLE_SINGLE_PRECISION=ON
- -DBUILD_SHARED_LIBS=${{ !matrix.gpu }}
dependencies:
ecmwf/eccodes:
version: develop
cmake_options:
- -DENABLE_MEMFS=ON
- -DENABLE_JPG=OFF
- -DENABLE_PNG=OFF
- -DBUILD_SHARED_LIBS=${{ !matrix.gpu }}
ecmwf/fckit:
version: 0.13.0
cmake_options:
- -DENABLE_TESTS=OFF
- -DENABLE_FCKIT_VENV=ON
- -DBUILD_SHARED_LIBS=${{ !matrix.gpu }}
ecmwf-ifs/fiat:
version: 1.4.1
cmake_options:
- -DENABLE_MPI=ON
- -DENABLE_SINGLE_PRECISION=ON
- -DENABLE_DOUBLE_PRECISION=OFF
- -DBUILD_SHARED_LIBS=${{ !matrix.gpu }}
ecmwf-ifs/field_api:
version: v0.3.1
cmake_options:
- -DENABLE_TESTS=OFF
- -DENABLE_ACC=ON
- -DENABLE_CUDA=ON
- -DENABLE_ACC=${{ matrix.gpu }}
- -DENABLE_CUDA=${{ matrix.gpu }}
- -DENABLE_SINGLE_PRECISION=ON
- -DENABLE_DOUBLE_PRECISION=OFF
- -DBUILD_SHARED_LIBS=${{ !matrix.gpu }}
ecmwf-ifs/loki:
version: v0.2.9
cmake_options:
- -DENABLE_NO_INSTALL=${{ !matrix.gpu }}
- -DENABLE_TESTS=OFF
template: |
{% for module in modules %}
{% for module in "${{ join(matrix.modules, ',') }}".split(',') %}
module load {{module}}
{% endfor %}
Expand All @@ -119,15 +153,17 @@ jobs:
popd
{% endfor %}
mkdir -p ${{ github.repository }}
pushd ${{ github.repository }}
REPO=${{ github.event.pull_request.head.repo.full_name || github.repository }}
SHA=${{ github.event.pull_request.head.sha || github.sha }}
mkdir -p $REPO
pushd $REPO
git init
git remote add origin ${{ github.server_url }}/${{ github.repository }}
git fetch origin ${{ github.sha }}
git remote add origin ${{ github.server_url }}/$REPO
git fetch origin $SHA
git reset --hard FETCH_HEAD
popd
cmake -G Ninja -S ${{ github.repository }} -B build \
cmake -G Ninja -S $REPO -B build \
{% for name in dependencies %}
{% set org, proj = name.split('/') %}
-D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/label-public-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Manage labels of pull requests that originate from forks
name: label-public-pr

on:
pull_request_target:
types: [opened, synchronize]

jobs:
label:
uses: ecmwf-actions/reusable-workflows/.github/workflows/label-pr.yml@v2

0 comments on commit 90d1c4d

Please sign in to comment.