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

Add Support for Building with Kokkos in Actions #72

Merged
merged 27 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d6e6ef4
Add support for building with kokkos in actions
matthew-mccall Nov 7, 2023
155a9ab
Fix PIC error with GCC
matthew-mccall Nov 7, 2023
13a982a
Replace runner.workspace with github.workspace
matthew-mccall Nov 7, 2023
05193d0
Add support for memory pool
matthew-mccall Nov 7, 2023
00a79a7
Add CUDA support
matthew-mccall Nov 27, 2023
72cf4a0
Pass approrpriate flags to CUDA installer
matthew-mccall Nov 27, 2023
e3a84db
Add architecture for CUDA and disabled GCC for CUDA
matthew-mccall Nov 27, 2023
47b9921
Add explicit architecture to Omega_h
matthew-mccall Nov 27, 2023
9c91814
Fix syntax
matthew-mccall Nov 27, 2023
30099a5
Disable Kokkos+CUDA to see if Omega_h+CUDA builds
matthew-mccall Nov 27, 2023
3bf7d8d
Switch to using CUDA docker image
matthew-mccall Nov 27, 2023
4994b5d
Fix matrix
matthew-mccall Nov 27, 2023
851b3b7
Install CMake in CUDA container
matthew-mccall Nov 27, 2023
64dc438
Remove sudo
matthew-mccall Nov 27, 2023
e708548
apt update
matthew-mccall Nov 27, 2023
28412f6
Install clang
matthew-mccall Nov 27, 2023
097e086
Install zlib
matthew-mccall Nov 27, 2023
ec61ee2
Update name of workflow
matthew-mccall Nov 27, 2023
0671236
Trigger Workflow
matthew-mccall Nov 28, 2023
d3c1f3b
Merge branch 'kokkosWorkflow' of https://github.com/matthew-mccall/om…
matthew-mccall Nov 28, 2023
8b0af11
Remove clang
matthew-mccall Dec 4, 2023
a1196e6
Always enable Kokkos
matthew-mccall Dec 14, 2023
5e91487
Support parallel builds
matthew-mccall Dec 14, 2023
a3160d8
Merge master into kokkosWorkflow
matthew-mccall Dec 14, 2023
1fedae5
Fix Print step
matthew-mccall Dec 14, 2023
9731fa6
Merge branch 'master' into kokkosWorkflow
matthew-mccall Dec 14, 2023
2146fe5
Remove unused workflow steps
matthew-mccall Dec 14, 2023
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
61 changes: 61 additions & 0 deletions .github/workflows/cmake-cuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CMake test matrix with CUDA
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
container: nvidia/cuda:12.3.0-devel-ubuntu22.04

strategy:
matrix:
mempool: [on, off]

steps:
- uses: actions/checkout@v4
with:
path: omega_h

- uses: actions/checkout@v4
with:
repository: kokkos/kokkos
path: kokkos

- name: Install CMake and ZLib
run: apt update && apt install -y cmake zlib1g-dev

- name: Configure Kokkos
shell: bash
working-directory: ${{github.workspace}}/kokkos
run: cmake .
-Bbuild
-DKokkos_ENABLE_CUDA=on
-DKokkos_ARCH_TURING75=on
-DCMAKE_INSTALL_PREFIX=build/install

- name: Build Kokkos
shell: bash
run: cmake --build $GITHUB_WORKSPACE/kokkos/build --target install

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/omega_h
run: cmake .
-Bbuild
-DCMAKE_VERBOSE_MAKEFILE=on
-DOmega_h_USE_MPI=off
-DOmega_h_USE_CUDA=on
-DOmega_h_CUDA_ARCH=75
-DOmega_h_USE_Kokkos=on
-DKokkos_PREFIX=$GITHUB_WORKSPACE/kokkos/build/install
-DBUILD_TESTING=on
-DBUILD_SHARED_LIBS=off
-DENABLE_CTEST_MEMPOOL=${{ matrix.mempool }}

- name: Build
working-directory: ${{github.workspace}}/omega_h/build
shell: bash
run: cmake --build . -j2
48 changes: 38 additions & 10 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,61 @@ jobs:
strategy:
matrix:
compiler: [g++, clang++]
kokkos: [on, off]
mempool: [on, off]
exclude:
- kokkos: off
mempool: on

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
path: omega_h

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- uses: actions/checkout@v4
if: ${{ matrix.kokkos == 'on' }}
with:
repository: kokkos/kokkos
path: kokkos

- name: Configure Kokkos
if: ${{ matrix.kokkos == 'on' }}
shell: bash
working-directory: ${{github.workspace}}/kokkos
run: cmake .
-Bbuild
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_INSTALL_PREFIX=build/install

- name: Build Kokkos
if: ${{ matrix.kokkos == 'on' }}
shell: bash
run: cmake --build $GITHUB_WORKSPACE/kokkos/build --target install

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE
working-directory: ${{github.workspace}}/omega_h
run: cmake .
-Bbuild
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_VERBOSE_MAKEFILE=on
-DOmega_h_USE_MPI=off
-DOmega_h_USE_CUDA=off
-DOmega_h_USE_Kokkos=${{ matrix.kokkos }}
-DKokkos_PREFIX=$GITHUB_WORKSPACE/kokkos/build/install
-DBUILD_TESTING=ON
-DBUILD_SHARED_LIBS=OFF
-DENABLE_CTEST_MEMPOOL=${{ matrix.mempool }}

- name: Build
working-directory: ${{runner.workspace}}/build
working-directory: ${{github.workspace}}/omega_h/build
shell: bash
run: cmake --build .
run: cmake --build . -j2

- name: Test
working-directory: ${{runner.workspace}}/build
working-directory: ${{github.workspace}}/omega_h/build
shell: bash
run: ctest

- name: Print
if: always()
run: cat ${{runner.workspace}}/build/Testing/Temporary/LastTest.log
run: cat ${{github.workspace}}/omega_h/build/Testing/Temporary/LastTest.log