build with sundials v7 #32
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: hip | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.ref }}-${{ github.head_ref }}-hip | |
cancel-in-progress: true | |
jobs: | |
tests-hip: | |
name: HIP ROCm Flang C++17 [tests] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Dependencies | |
run: | | |
.github/workflows/dependencies/dependencies_hip.sh | |
.github/workflows/dependencies/dependencies_ccache.sh | |
- name: Set Up Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/ccache | |
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }} | |
restore-keys: | | |
ccache-${{ github.workflow }}-${{ github.job }}-git- | |
- name: Build & Install | |
# Have to have -Wno-deprecated-declarations due to deprecated atomicAddNoRet | |
# Have to have -Wno-gnu-zero-variadic-macro-arguments to avoid | |
# amrex/Src/Base/AMReX_GpuLaunchGlobal.H:15:5: error: must specify at least one argument for '...' parameter of variadic macro [-Werror,-Wgnu-zero-variadic-macro-arguments] | |
# __launch_bounds__(amrex_launch_bounds_max_threads) | |
# ^ | |
# /opt/rocm-4.1.1/hip/include/hip/hcc_detail/hip_runtime.h:178:71: note: expanded from macro '__launch_bounds__' | |
# select_impl_(__VA_ARGS__, launch_bounds_impl1, launch_bounds_impl0)(__VA_ARGS__) | |
# ^ | |
# /opt/rocm-4.1.1/hip/include/hip/hcc_detail/hip_runtime.h:176:9: note: macro 'select_impl_' defined here | |
# #define select_impl_(_1, _2, impl_, ...) impl_ | |
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-deprecated-declarations -Wno-gnu-zero-variadic-macro-arguments"} | |
run: | | |
export CCACHE_COMPRESS=1 | |
export CCACHE_COMPRESSLEVEL=10 | |
export CCACHE_MAXSIZE=100M | |
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_EB=ON \ | |
-DAMReX_ENABLE_TESTS=ON \ | |
-DAMReX_FORTRAN=ON \ | |
-DAMReX_LINEAR_SOLVERS=ON \ | |
-DAMReX_GPU_BACKEND=HIP \ | |
-DAMReX_AMD_ARCH=gfx908 \ | |
-DAMReX_ROCTX=ON \ | |
-DCMAKE_C_COMPILER=$(which clang) \ | |
-DCMAKE_CXX_COMPILER=$(which clang++) \ | |
-DCMAKE_Fortran_COMPILER=$(which flang) \ | |
-DCMAKE_CXX_STANDARD=17 \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
cmake --build build -j 4 | |
ccache -s | |
du -hs ~/.cache/ccache | |
tests-hip-wrapper: | |
name: HIP ROCm [email protected] C++17 [tests-hipcc] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Dependencies | |
run: | | |
.github/workflows/dependencies/dependencies_hip.sh | |
.github/workflows/dependencies/dependencies_ccache.sh | |
- name: Set Up Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/ccache | |
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }} | |
restore-keys: | | |
ccache-${{ github.workflow }}-${{ github.job }}-git- | |
- name: Build & Install | |
# Have to have -Wno-deprecated-declarations due to deprecated atomicAddNoRet | |
# Have to have -Wno-gnu-zero-variadic-macro-arguments to avoid | |
# amrex/Src/Base/AMReX_GpuLaunchGlobal.H:15:5: error: must specify at least one argument for '...' parameter of variadic macro [-Werror,-Wgnu-zero-variadic-macro-arguments] | |
# __launch_bounds__(amrex_launch_bounds_max_threads) | |
# ^ | |
# /opt/rocm-4.1.1/hip/include/hip/hcc_detail/hip_runtime.h:178:71: note: expanded from macro '__launch_bounds__' | |
# select_impl_(__VA_ARGS__, launch_bounds_impl1, launch_bounds_impl0)(__VA_ARGS__) | |
# ^ | |
# /opt/rocm-4.1.1/hip/include/hip/hcc_detail/hip_runtime.h:176:9: note: macro 'select_impl_' defined here | |
# #define select_impl_(_1, _2, impl_, ...) impl_ | |
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-deprecated-declarations -Wno-gnu-zero-variadic-macro-arguments"} | |
run: | | |
export CCACHE_COMPRESS=1 | |
export CCACHE_COMPRESSLEVEL=10 | |
export CCACHE_MAXSIZE=40M | |
ccache -z | |
source /etc/profile.d/rocm.sh | |
hipcc --version | |
# "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_full_legacywrapper \ | |
-DCMAKE_VERBOSE_MAKEFILE=ON \ | |
-DAMReX_EB=OFF \ | |
-DAMReX_ENABLE_TESTS=ON \ | |
-DAMReX_FORTRAN=ON \ | |
-DAMReX_GPU_RDC=OFF \ | |
-DAMReX_LINEAR_SOLVERS=ON \ | |
-DAMReX_GPU_BACKEND=HIP \ | |
-DAMReX_AMD_ARCH=gfx908 \ | |
-DAMReX_ROCTX=ON \ | |
-DCMAKE_C_COMPILER=$(which clang) \ | |
-DCMAKE_CXX_COMPILER=$(which hipcc) \ | |
-DCMAKE_Fortran_COMPILER=$(which gfortran) \ | |
-DCMAKE_CXX_STANDARD=17 \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
cmake --build build_full_legacywrapper -j 4 | |
ccache -s | |
du -hs ~/.cache/ccache | |
# Build 2D libamrex hip build with configure | |
configure-2d-single-hip: | |
name: HIP EB [configure 2D] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Dependencies | |
run: | | |
.github/workflows/dependencies/dependencies_hip.sh | |
.github/workflows/dependencies/dependencies_ccache.sh | |
- name: Set Up Cache | |
uses: actions/cache@v4 | |
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=60M | |
ccache -z | |
./configure --dim 2 --with-hip yes --enable-eb yes --enable-xsdk-defaults yes --with-mpi no --with-omp no --single-precision yes --single-precision-particles yes | |
make -j4 WARN_ALL=TRUE XTRA_CXXFLAGS="-fno-operator-names" AMD_ARCH=gfx90a CCACHE=ccache | |
make install | |
ccache -s | |
du -hs ~/.cache/ccache | |
# Build 3D EB hip with gnu make | |
hip-3d-eb-gmake: | |
name: HIP EB 3D GMake | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Dependencies | |
run: | | |
.github/workflows/dependencies/dependencies_hip.sh | |
.github/workflows/dependencies/dependencies_ccache.sh | |
- name: Set Up Cache | |
uses: actions/cache@v4 | |
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=120M | |
ccache -z | |
cd Tests/LinearSolvers/NodeEB | |
make -j4 USE_HIP=TRUE USE_MPI=FALSE BL_NO_FORT=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS=-fno-operator-names AMD_ARCH=gfx90a CCACHE=ccache | |
ccache -s | |
du -hs ~/.cache/ccache | |
save_pr_number: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Save PR number | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
run: | | |
echo $PR_NUMBER > pr_number.txt | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pr_number | |
path: pr_number.txt | |
retention-days: 1 |