Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Move CUDA CI to Hamilton #1136

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 48 additions & 8 deletions .github/workflows/ci-short.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# map to local user id on CI machine to allow writing to build cache
options: --user 1001
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: cpplint
Expand All @@ -33,7 +33,7 @@ jobs:
run: |
cmake -DCMAKE_CXX_FLAGS=-Werror -Bbuild-copyright-check
cmake --build build-copyright-check -t check-copyright
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: configure-log-style
path: build-copyright-check/CMakeFiles/CMakeOutput.log
Expand All @@ -49,7 +49,7 @@ jobs:
# map to local user id on CI machine to allow writing to build cache
options: --user 1001
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Configure
Expand All @@ -65,7 +65,7 @@ jobs:
# Pick GPU with most available memory
export CUDA_VISIBLE_DEVICES=$(nvidia-smi --query-gpu=memory.free,index --format=csv,nounits,noheader | sort -nr | head -1 | awk '{ print $NF }')
ctest -LE 'performance|regression'
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: configure-log-unit-${{ matrix.device }}
path: build/CMakeFiles/CMakeOutput.log
Expand All @@ -81,7 +81,7 @@ jobs:
# map to local user id on CI machine to allow writing to build cache
options: --user 1001
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Configure
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
if grep HtoD profile.txt; then exit 1; fi
if grep DtoH profile.txt; then exit 1; fi

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: configure-log-integration-${{ matrix.device }}
path: |
Expand All @@ -143,7 +143,7 @@ jobs:
CMAKE_GENERATOR: Ninja
CMAKE_BUILD_PARALLEL_LEVEL: 8 # num threads for build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Configure
Expand All @@ -166,10 +166,50 @@ jobs:
cd build
ctest -R regression_mpi_test:particle_leapfrog

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: configure-log-integration-amdgpu
path: |
build/CMakeFiles/CMakeOutput.log
retention-days: 3

integration-nvidia-hamilton:
runs-on: [self-hosted, navi1030]
container:
image: ghcr.io/parthenon-hpc-lab/cuda11.6-mpi-hdf5-ascent
# Map to local user id on CI machine to allow writing to build cache
options: --user 1000 --gpus all
env:
CMAKE_GENERATOR: Ninja
CMAKE_BUILD_PARALLEL_LEVEL: 8 # num threads for build
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Configure
run: |
cmake -B build \
-DMACHINE_CFG=${PWD}/cmake/machinecfg/GitHubActions.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DMACHINE_VARIANT=cuda-mpi \
-DCMAKE_CXX_COMPILER=${PWD}/external/Kokkos/bin/nvcc_wrapper
# Test example with "variables" and output
- name: advection
run: |
nvidia-smi
cmake --build build -t advection-example
cd build
ctest -R regression_mpi_test:output_hdf5
# Test example with swarms
- name: particle-leapfrog
run: |
cmake --build build -t particle-leapfrog
cd build
ctest -R regression_mpi_test:particle_leapfrog

- uses: actions/upload-artifact@v4
with:
name: configure-log-integration-amdgpu
path: |
build/CMakeFiles/CMakeOutput.log
retention-days: 3
6 changes: 3 additions & 3 deletions cmake/machinecfg/GitHubActions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ message(STATUS "Loading machine configuration for GitHub Actions CI. ")

# common options
set(NUM_MPI_PROC_TESTING "2" CACHE STRING "CI runs tests with 2 MPI ranks")
set(Kokkos_ARCH_ZEN2 ON CACHE BOOL "Enable Zen2")

set(MACHINE_CXX_FLAGS "")
if (${MACHINE_VARIANT} MATCHES "cuda")
# using an arbitrary arch as GitHub Action runners don't have GPUs
set(Kokkos_ARCH_VOLTA70 ON CACHE BOOL "GPU architecture")
# using an arch that matches Hamilton at Hamburg Obs
set(Kokkos_ARCH_AMPERE86 ON CACHE BOOL "GPU architecture")
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "Enable Cuda")
if (${CMAKE_CXX_COMPILER} MATCHES "clang")
set(MACHINE_CXX_FLAGS "${MACHINE_CXX_FLAGS} -Wno-unknown-cuda-version")
Expand All @@ -32,7 +33,6 @@ elseif (${MACHINE_VARIANT} MATCHES "hip")
# using an arch that matches Hamilton at Hamburg Obs
set(Kokkos_ARCH_NAVI1030 ON CACHE BOOL "GPU architecture")
set(Kokkos_ENABLE_HIP ON CACHE BOOL "Enable HIP")
set(Kokkos_ENABLE_ZEN3 ON CACHE BOOL "Enable Zen3")
else()
set(MACHINE_CXX_FLAGS "${MACHINE_CXX_FLAGS} -fopenmp-simd")
endif()
Expand Down
Loading