Skip to content

Implement photoionization and add tests #9462

Implement photoionization and add tests

Implement photoionization and add tests #9462

Workflow file for this run

name: 🔥 hip
on:
push:
branches: [ development ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ development ]
merge_group:
branches: [ development ]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-hip
cancel-in-progress: true
permissions:
contents: read
jobs:
check_changes:
uses: ./.github/workflows/check_changes.yml
with:
workflow_file: '.github/workflows/hip.yml'
tests-hip:
name: HIP ROCm C++20
runs-on: ubuntu-latest
needs: check_changes
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.2.2
with:
submodules: true
- name: AMReX Dependencies
run: |
.github/workflows/dependencies/dependencies_hip.sh
.github/workflows/dependencies/dependencies_ccache.sh
- name: Python and HDF5 dependencies
run: sudo apt-get update && sudo apt-get install python3-dev python3-numpy python3-matplotlib python3-pip libhdf5-mpi-dev
- name: Set Up Cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Build & Install
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=45M
ccache -z
source /etc/profile.d/rocm.sh
hipcc --version
which clang
which clang++
which flang
# "mpic++ --showme" forgets open-pal in Ubuntu 20.04 + OpenMPI 4.0.3
# https://bugs.launchpad.net/ubuntu/+source/openmpi/+bug/1941786
# https://github.com/open-mpi/ompi/issues/9317
export LDFLAGS="-lopen-pal"
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_GPU_BACKEND=HIP \
-DAMReX_AMD_ARCH=gfx908 \
-DAMReX_ROCTX=ON \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-ffp-exception-behavior=strict"
cmake --build build -j 2
ccache -s
du -hs ~/.cache/ccache