Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ sudo apt-get update

sudo apt-get install -y \
build-essential \
clang-6.0
clang-18 \
lld \
libc++-18-dev \
libopenmpi-dev \
openmpi-bin
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ sudo apt-get update

sudo apt-get install -y --no-install-recommends\
build-essential \
g++-7 \
g++-14 \
libopenmpi-dev \
openmpi-bin
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ sudo apt-get install -y \
build-essential \
ca-certificates \
cmake \
g++ \
gfortran \
g++-10 \
gfortran-10 \
gnupg \
libopenmpi-dev \
openmpi-bin \
Expand All @@ -29,12 +29,12 @@ echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x8
| sudo tee /etc/apt/sources.list.d/cuda.list
sudo apt-get update
sudo apt-get install -y \
cuda-command-line-tools-11-2 \
cuda-compiler-11-2 \
cuda-cupti-dev-11-2 \
cuda-minimal-build-11-2 \
cuda-nvml-dev-11-2 \
cuda-nvtx-11-2 \
libcurand-dev-11-2 \
libcusparse-dev-11-2
sudo ln -s cuda-11.2 /usr/local/cuda
cuda-command-line-tools-12-2 \
cuda-compiler-12-2 \
cuda-cupti-dev-12-2 \
cuda-minimal-build-12-2 \
cuda-nvml-dev-12-2 \
cuda-nvtx-12-2 \
libcurand-dev-12-2 \
libcusparse-dev-12-2
sudo ln -s cuda-12.2 /usr/local/cuda
38 changes: 22 additions & 16 deletions .github/workflows/dependencies/hip.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/usr/bin/env bash
#
# Copyright 2022 The AMReX Community
# Copyright 2020 The AMReX Community
#
# License: BSD-3-Clause-LBNL
# Authors: Axel Huebl

# search recursive inside a folder if a file contains tabs
#
# @result 0 if no files are found, else 1
#

set -eu -o pipefail

# `man apt.conf`:
Expand All @@ -28,13 +33,16 @@ sudo apt-key add rocm.gpg.key

source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ...

echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${1-latest} ${UBUNTU_CODENAME} main" \
VERSION=${1-6.3.2}

echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${VERSION} ${UBUNTU_CODENAME} main" \
| sudo tee /etc/apt/sources.list.d/rocm.list
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' \
| sudo tee -a /etc/profile.d/rocm.sh

# we should not need to export HIP_PATH=/opt/rocm/hip with those installs

sudo apt-get clean
sudo apt-get update

# Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#installing-development-packages-for-cross-compilation
Expand All @@ -46,25 +54,23 @@ sudo apt-get install -y --no-install-recommends \
gfortran \
libnuma-dev \
libopenmpi-dev \
ninja-build \
openmpi-bin \
rocm-dev \
rocfft-dev \
rocprim-dev \
rocrand-dev \
rocsparse-dev \
hiprand-dev
rocm-dev${VERSION} \
roctracer-dev${VERSION} \
rocprofiler-dev${VERSION} \
rocrand-dev${VERSION} \
rocfft-dev${VERSION} \
rocprim-dev${VERSION} \
rocsparse-dev${VERSION}

# hiprand-dev is a new package that does not exist in old versions
sudo apt-get install -y --no-install-recommends hiprand-dev${VERSION} || true

# activate
#
source /etc/profile.d/rocm.sh
hipcc --version
hipconfig --full
which clang
which clang++

# cmake-easyinstall
#
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://raw.githubusercontent.com/ax3l/cmake-easyinstall/main/cmake-easyinstall
sudo chmod a+x /usr/local/bin/cmake-easyinstall
export CEI_SUDO="sudo"
export CEI_TMP="/tmp/cei"
which flang
16 changes: 10 additions & 6 deletions .github/workflows/hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ concurrency:

jobs:
build_hip:
name: ROCm HIP 6.1
runs-on: ubuntu-20.04
name: ROCm HIP 6.3.2
runs-on: ubuntu-22.04
env:
CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed"
CMAKE_GENERATOR: Ninja
Expand All @@ -18,7 +18,7 @@ jobs:
- name: install dependencies
shell: bash
run: |
.github/workflows/dependencies/hip.sh 6.1
.github/workflows/dependencies/hip.sh 6.3.2
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -27,7 +27,7 @@ jobs:
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: build ImpactX
- name: build pyAMReX
shell: bash
run: |
export CCACHE_COMPRESS=1
Expand All @@ -54,8 +54,12 @@ jobs:
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_GPU_BACKEND=HIP \
-DAMReX_AMD_ARCH=gfx900 \
-DAMReX_SPACEDIM="1;2;3"
-DAMReX_SPACEDIM="1;2;3" \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DAMReX_AMD_ARCH=gfx1010 \
-DAMReX_ROCTX=ON \
-DCMAKE_CXX_STANDARD=17
cmake --build build --target pip_install -j 4

ccache -s
Expand Down
58 changes: 30 additions & 28 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ concurrency:

jobs:
# Build and install libamrex as AMReX CMake project
gcc7:
name: GNU@7.5
runs-on: ubuntu-20.04
gcc10:
name: GNU@10.5 Release
runs-on: ubuntu-24.04
env:
CC: gcc-7
CXX: g++-7
CC: gcc-10
CXX: g++-10
CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names -Wno-array-bounds"
steps:
- uses: actions/checkout@v4
Expand All @@ -23,7 +23,7 @@ jobs:
python-version: '3.9'
- name: Dependencies
run: |
.github/workflows/dependencies/gcc7.sh
.github/workflows/dependencies/dependencies_gcc10.sh
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -56,15 +56,15 @@ jobs:
run: |
mpiexec -np 1 python3 -m pytest tests/

gcc10:
name: GNU@10.5 Debug
runs-on: ubuntu-22.04
gcc14:
name: GNU@14.5 Debug
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-Werror -Wno-error=deprecated-declarations -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc10.sh
.github/workflows/dependencies/dependencies_gcc14.sh
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -80,8 +80,8 @@ jobs:
export CCACHE_MAXSIZE=600M
ccache -z

export CC=$(which gcc-10)
export CXX=$(which g++-10)
export CC=$(which gcc-14)
export CXX=$(which g++-14)
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools[core] wheel
python3 -m pip install -U cmake
Expand All @@ -108,15 +108,15 @@ jobs:
rm -rf build
python3 -m pytest tests

clang6:
name: Clang@6.0 w/o MPI
runs-on: ubuntu-20.04
clang14:
name: Clang@14.0 w/o MPI
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names -Wno-pass-failed"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang6.sh
.github/workflows/dependencies/dependencies_clang14_libcpp.sh
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -134,8 +134,8 @@ jobs:

export CMAKE_BUILD_PARALLEL_LEVEL=4

export CC=$(which clang-6.0)
export CXX=$(which clang++-6.0)
export CC=$(which clang-14)
export CXX=$(which clang++-14)
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools[core] wheel
python3 -m pip install -U cmake pytest
Expand All @@ -151,9 +151,9 @@ jobs:
run: |
python3 -m pytest tests/

clang14:
name: Clang@14.0 w/ libc++ w/ MPI
runs-on: ubuntu-22.04
clang18:
name: Clang@18.0 w/ libc++ w/ MPI
runs-on: ubuntu-24.04
env:
CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names -Wno-pass-failed -stdlib=libc++"
LDFLAGS: "-fuse-ld=lld"
Expand All @@ -163,7 +163,7 @@ jobs:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang14_libcpp.sh
.github/workflows/dependencies/dependencies_clang18.sh
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -181,6 +181,8 @@ jobs:

export CMAKE_BUILD_PARALLEL_LEVEL=4

export CC=$(which clang-18)
export CXX=$(which clang++-18)
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools[core] wheel
python3 -m pip install -U cmake
Expand All @@ -198,14 +200,14 @@ jobs:
python3 -m pytest tests/

nvcc11:
name: CUDA@11.2 GNU@9.4.0
runs-on: ubuntu-20.04
name: CUDA@12.2 GNU@10.5
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_nvcc11.sh
.github/workflows/dependencies/dependencies_nvcc12.sh
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -225,9 +227,9 @@ jobs:
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
which nvcc || echo "nvcc not in PATH!"

export CC=$(which gcc)
export CXX=$(which g++)
export CUDAHOSTCXX=$(which g++)
export CC=$(which gcc-10)
export CXX=$(which g++-10)
export CUDAHOSTCXX=$(which g++-10)

python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools[core] wheel
Expand Down
Loading