Skip to content

Cholla Compile

Cholla Compile #341

Workflow file for this run

name: Cholla Compile
on:
pull_request:
schedule:
- cron: "37 07 * * 1" # run every Monday at 07:37UTC. Crontab computed with crontab.guru
workflow_dispatch:
jobs:
Build:
name: >
Build
${{ matrix.container.name }}
TYPE=${{ matrix.make-type }}
# if: ${{ false }} # If uncommented this line will disable this job
# Choose OS/Runner
runs-on: ubuntu-latest
container:
image: ${{matrix.container.link}}
defaults:
run:
shell: bash
# Matrix for different make types
strategy:
fail-fast: false
matrix:
make-type: [hydro, gravity, disk, particles, cosmology, mhd]
container: [{name: "CUDA", link: "docker://alwinm/cholla:cuda_github"}, {name: "HIP",link: "docker://alwinm/cholla:hip_github"},]
# Setup environment variables
env:
CHOLLA_MACHINE: github
CHOLLA_MAKE_TYPE: ${{ matrix.make-type }}
CUDA_ROOT: /usr/local/cuda
HDF5_ROOT: /usr/lib/x86_64-linux-gnu/hdf5/serial
MPI_ROOT: /usr/lib/x86_64-linux-gnu/openmpi
# Run the job itself
steps:
# Install required Tools
- uses: actions/checkout@v3
# Show versions
- name: Show MPI version
run: mpirun --version
- name: Show HDF5 config
run: |
h5cc -showconfig
- name: Git Safe Directory
run: |
git --version
git config --global --add safe.directory /__w/cholla/cholla
git config --global --add safe.directory '*'
- name: Show CUDA and gcc version
if: matrix.container.name == 'CUDA'
run: |
cc --version
c++ --version
nvcc -V
- name: Show HIP and hipcc version
if: matrix.container.name == 'HIP'
run: |
hipcc --version
hipconfig --full
# Perform Build
- name: Cholla setup
run: |
source builds/run_tests.sh
setupTests -c gcc
echo "CHOLLA_ROOT = ${CHOLLA_ROOT}"
echo "CHOLLA_LAUNCH_COMMAND = ${CHOLLA_LAUNCH_COMMAND}"
echo "CHOLLA_ROOT=${CHOLLA_ROOT}" >> $GITHUB_ENV
echo "CHOLLA_LAUNCH_COMMAND=${CHOLLA_LAUNCH_COMMAND}" >> $GITHUB_ENV
echo "F_OFFLOAD=${F_OFFLOAD} >> $GITHUB_ENV
echo "CHOLLA_ENVSET=${CHOLLA_ENVSET} >> $GITHUB_ENV
- name: Build GoogleTest
run: |
source builds/run_tests.sh
buildGoogleTest
echo "GOOGLETEST_ROOT=${GOOGLETEST_ROOT}" >> $GITHUB_ENV
- name: Build Cholla
run: |
source builds/run_tests.sh
buildCholla OPTIMIZE
- name: Build Tests
run: |
source builds/run_tests.sh
buildChollaTests