Skip to content

sync GPU dependencies with AMReX #3231

sync GPU dependencies with AMReX

sync GPU dependencies with AMReX #3231

Workflow file for this run

name: GPU compilation
on: [pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
gpu-compilation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get submodules
run: |
git submodule update --init
cd external/Microphysics
git fetch; git checkout development
cd ../amrex
git fetch; git checkout development
cd ../..
- name: Install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get -qq -y install curl cmake jq clang g++>=9.3.0
- name: Install CUDA
run: .github/workflows/dependencies/dependencies_nvcc.sh 11.8
- name: Install hypre
run: |
wget -q https://github.com/hypre-space/hypre/archive/refs/tags/v2.28.0.tar.gz
tar xfz v2.28.0.tar.gz
cd hypre-2.28.0/src
CUDA_HOME=/usr/local/cuda HYPRE_CUDA_SM=60 ./configure --with-cxxstandard=17 --with-cuda --enable-unified-memory --without-MPI
make -j 4
make install
cd ../../
- name: Get cpp linter repo
run: |
cd external
git clone https://github.com/AMReX-Astro/cpp-linter-action.git
cd ..
- name: Check header includes
run: |
echo 'HEADER_INCLUDES=$(grep -rIE --include="*.cpp" --include="*.H" --exclude-dir=external "#\s?include\s+\"\w+\.\w+\"")' >> $GITHUB_ENV
echo $HEADER_INCLUDES
if [[ -n "${HEADER_INCLUDES}" ]]; then exit 1; fi
- name: Compile problems for GPU
run: |
export PATH=$PATH:/usr/local/cuda/bin
export AMREX_HYPRE_HOME=${PWD}/hypre-2.28.0/src/hypre
python3 external/cpp-linter-action/run_on_changed_files.py ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -header-filter=Castro -ignore-files="amrex|Microphysics" -gpu