address timestep and cfl violation for Spherical2D #3076
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# from https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_network | |
run: | | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin | |
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 | |
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub | |
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" | |
sudo apt-get update | |
sudo apt-get -y install cuda-toolkit-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 |