From 334f9f67981742219eaea949512e553b4c6b67be Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 13:31:15 -0700 Subject: [PATCH 01/18] Bump Ubuntu from 20.04 -> 24.04 in CI --- .github/workflows/hip.yml | 4 ++-- .github/workflows/ubuntu.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 9920751b..c1020c58 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -9,7 +9,7 @@ concurrency: jobs: build_hip: name: ROCm HIP 6.1 - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 env: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" CMAKE_GENERATOR: Ninja @@ -46,7 +46,7 @@ jobs: python3 -m pip install -U build packaging setuptools[core] wheel python3 -m pip install -U cmake - # "mpic++ --showme" forgets open-pal in Ubuntu 20.04 + OpenMPI 4.0.3 + # "mpic++ --showme" forgets open-pal in Ubuntu 24.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" diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 5e2d6186..6531fcec 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -10,7 +10,7 @@ jobs: # Build and install libamrex as AMReX CMake project gcc7: name: GNU@7.5 - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 env: CC: gcc-7 CXX: g++-7 @@ -110,7 +110,7 @@ jobs: clang6: name: Clang@6.0 w/o MPI - runs-on: ubuntu-20.04 + 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 @@ -199,7 +199,7 @@ jobs: nvcc11: name: CUDA@11.2 GNU@9.4.0 - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 env: {CXXFLAGS: "-fno-operator-names"} steps: - uses: actions/checkout@v4 From 22df56599ba8c67eac4cd4b57184a9691a84ec63 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 14:23:04 -0700 Subject: [PATCH 02/18] bump gcc versions --- .../{gcc7.sh => dependencies_gcc14.sh} | 2 +- .github/workflows/ubuntu.yml | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) rename .github/workflows/dependencies/{gcc7.sh => dependencies_gcc14.sh} (92%) diff --git a/.github/workflows/dependencies/gcc7.sh b/.github/workflows/dependencies/dependencies_gcc14.sh similarity index 92% rename from .github/workflows/dependencies/gcc7.sh rename to .github/workflows/dependencies/dependencies_gcc14.sh index 46106887..53272601 100755 --- a/.github/workflows/dependencies/gcc7.sh +++ b/.github/workflows/dependencies/dependencies_gcc14.sh @@ -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 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 6531fcec..5035d1f9 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -8,12 +8,12 @@ concurrency: jobs: # Build and install libamrex as AMReX CMake project - gcc7: - name: GNU@7.5 + 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 @@ -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 @@ -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 @@ -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 From 4bbc841998671e98e764897ab3a1ded76323142f Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 14:40:17 -0700 Subject: [PATCH 03/18] bump compiler versions for clang and cuda CI --- ...cies_clang6.sh => dependencies_clang18.sh} | 2 +- .../dependencies/dependencies_nvcc11.sh | 4 ++-- .github/workflows/ubuntu.yml | 20 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) rename .github/workflows/dependencies/{dependencies_clang6.sh => dependencies_clang18.sh} (93%) diff --git a/.github/workflows/dependencies/dependencies_clang6.sh b/.github/workflows/dependencies/dependencies_clang18.sh similarity index 93% rename from .github/workflows/dependencies/dependencies_clang6.sh rename to .github/workflows/dependencies/dependencies_clang18.sh index c7f3dca5..c1cdf778 100755 --- a/.github/workflows/dependencies/dependencies_clang6.sh +++ b/.github/workflows/dependencies/dependencies_clang18.sh @@ -11,4 +11,4 @@ sudo apt-get update sudo apt-get install -y \ build-essential \ - clang-6.0 + clang-18.0 diff --git a/.github/workflows/dependencies/dependencies_nvcc11.sh b/.github/workflows/dependencies/dependencies_nvcc11.sh index cf91137c..cd08ef65 100755 --- a/.github/workflows/dependencies/dependencies_nvcc11.sh +++ b/.github/workflows/dependencies/dependencies_nvcc11.sh @@ -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 \ diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 5035d1f9..bbf296c6 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -108,15 +108,15 @@ jobs: rm -rf build python3 -m pytest tests - clang6: - name: Clang@6.0 w/o MPI + 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.sh .github/workflows/dependencies/dependencies_ccache.sh - name: Set Up Cache uses: actions/cache@v4 @@ -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.0) + export CXX=$(which clang++-14.0) python3 -m pip install -U pip python3 -m pip install -U build packaging setuptools[core] wheel python3 -m pip install -U cmake pytest @@ -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" @@ -163,7 +163,7 @@ jobs: - uses: actions/checkout@v4 - name: Dependencies run: | - .github/workflows/dependencies/dependencies_clang14_libcpp.sh + .github/workflows/dependencies/dependencies_clang18_libcpp.sh .github/workflows/dependencies/dependencies_ccache.sh - name: Set Up Cache uses: actions/cache@v4 @@ -198,7 +198,7 @@ jobs: python3 -m pytest tests/ nvcc11: - name: CUDA@11.2 GNU@9.4.0 + name: CUDA@11.2 GNU@10.5 runs-on: ubuntu-24.04 env: {CXXFLAGS: "-fno-operator-names"} steps: From 248592a4cc495e2b8af3379fad99c9bdfc077310 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 15:54:55 -0700 Subject: [PATCH 04/18] fix CI --- .github/workflows/dependencies/dependencies_nvcc11.sh | 2 +- .github/workflows/ubuntu.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependencies/dependencies_nvcc11.sh b/.github/workflows/dependencies/dependencies_nvcc11.sh index cd08ef65..439b8e9e 100755 --- a/.github/workflows/dependencies/dependencies_nvcc11.sh +++ b/.github/workflows/dependencies/dependencies_nvcc11.sh @@ -16,7 +16,7 @@ sudo apt-get install -y \ build-essential \ ca-certificates \ cmake \ - g++=10 \ + g++-10 \ gfortran-10 \ gnupg \ libopenmpi-dev \ diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index bbf296c6..6c22957a 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -116,7 +116,7 @@ jobs: - uses: actions/checkout@v4 - name: Dependencies run: | - .github/workflows/dependencies/dependencies_clang14.sh + .github/workflows/dependencies/dependencies_clang14_libcpp.sh .github/workflows/dependencies/dependencies_ccache.sh - name: Set Up Cache uses: actions/cache@v4 @@ -163,7 +163,7 @@ jobs: - uses: actions/checkout@v4 - name: Dependencies run: | - .github/workflows/dependencies/dependencies_clang18_libcpp.sh + .github/workflows/dependencies/dependencies_clang18.sh .github/workflows/dependencies/dependencies_ccache.sh - name: Set Up Cache uses: actions/cache@v4 From 9ef96156bca076d3198faa7dfa7e9d9fa037963a Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 16:09:16 -0700 Subject: [PATCH 05/18] fix CI --- .../dependencies/dependencies_clang18.sh | 2 +- ...encies_nvcc11.sh => dependencies_nvcc12.sh} | 18 +++++++++--------- .github/workflows/ubuntu.yml | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) rename .github/workflows/dependencies/{dependencies_nvcc11.sh => dependencies_nvcc12.sh} (72%) diff --git a/.github/workflows/dependencies/dependencies_clang18.sh b/.github/workflows/dependencies/dependencies_clang18.sh index c1cdf778..3a191b48 100755 --- a/.github/workflows/dependencies/dependencies_clang18.sh +++ b/.github/workflows/dependencies/dependencies_clang18.sh @@ -11,4 +11,4 @@ sudo apt-get update sudo apt-get install -y \ build-essential \ - clang-18.0 + clang-18 diff --git a/.github/workflows/dependencies/dependencies_nvcc11.sh b/.github/workflows/dependencies/dependencies_nvcc12.sh similarity index 72% rename from .github/workflows/dependencies/dependencies_nvcc11.sh rename to .github/workflows/dependencies/dependencies_nvcc12.sh index 439b8e9e..029bcf20 100755 --- a/.github/workflows/dependencies/dependencies_nvcc11.sh +++ b/.github/workflows/dependencies/dependencies_nvcc12.sh @@ -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 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 6c22957a..33d63bf7 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -198,14 +198,14 @@ jobs: python3 -m pytest tests/ nvcc11: - name: CUDA@11.2 GNU@10.5 + 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 From 200f65bb522ec22db4370b1aacec760930a56aec Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 16:19:43 -0700 Subject: [PATCH 06/18] fix CI --- .github/workflows/ubuntu.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 33d63bf7..38fe27fd 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -181,6 +181,8 @@ jobs: export CMAKE_BUILD_PARALLEL_LEVEL=4 + export CC=$(which clang-18.0) + export CXX=$(which clang++-18.0) python3 -m pip install -U pip python3 -m pip install -U build packaging setuptools[core] wheel python3 -m pip install -U cmake @@ -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 From 629f464dd250693e3f032fc4935c18f05ea446e0 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 16:41:30 -0700 Subject: [PATCH 07/18] fix CI --- .github/workflows/dependencies/dependencies_clang18.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dependencies/dependencies_clang18.sh b/.github/workflows/dependencies/dependencies_clang18.sh index 3a191b48..3b62b92c 100755 --- a/.github/workflows/dependencies/dependencies_clang18.sh +++ b/.github/workflows/dependencies/dependencies_clang18.sh @@ -11,4 +11,7 @@ sudo apt-get update sudo apt-get install -y \ build-essential \ - clang-18 + clang-18 \ + lld \ + libopenmpi-dev \ + openmpi-bin From c28a02b7d2014437bda7ce09e4ced38f70add917 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 16:58:36 -0700 Subject: [PATCH 08/18] fix CI --- .github/workflows/ubuntu.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 38fe27fd..bd698ff5 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -134,8 +134,8 @@ jobs: export CMAKE_BUILD_PARALLEL_LEVEL=4 - export CC=$(which clang-14.0) - export CXX=$(which clang++-14.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 @@ -181,8 +181,8 @@ jobs: export CMAKE_BUILD_PARALLEL_LEVEL=4 - export CC=$(which clang-18.0) - export CXX=$(which clang++-18.0) + 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 From 4acfa3ed7d16c423f5403e7f936ffe53a7d64aab Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 17:10:38 -0700 Subject: [PATCH 09/18] fix CI --- .github/workflows/dependencies/dependencies_clang18.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dependencies/dependencies_clang18.sh b/.github/workflows/dependencies/dependencies_clang18.sh index 3b62b92c..be30da02 100755 --- a/.github/workflows/dependencies/dependencies_clang18.sh +++ b/.github/workflows/dependencies/dependencies_clang18.sh @@ -13,5 +13,6 @@ sudo apt-get install -y \ build-essential \ clang-18 \ lld \ + libstdc++-18-dev \ libopenmpi-dev \ openmpi-bin From 58edd7442ad1c62afd9c59452fc771ac45215332 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 16 Apr 2025 17:24:48 -0700 Subject: [PATCH 10/18] fix CI --- .github/workflows/dependencies/dependencies_clang18.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies/dependencies_clang18.sh b/.github/workflows/dependencies/dependencies_clang18.sh index be30da02..517a7111 100755 --- a/.github/workflows/dependencies/dependencies_clang18.sh +++ b/.github/workflows/dependencies/dependencies_clang18.sh @@ -13,6 +13,6 @@ sudo apt-get install -y \ build-essential \ clang-18 \ lld \ - libstdc++-18-dev \ + libc++-18-dev \ libopenmpi-dev \ openmpi-bin From 52e86b895411b5cf7b3503d324832dce4aac96f2 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Thu, 24 Apr 2025 10:13:08 -0700 Subject: [PATCH 11/18] also bump hip version --- .github/workflows/hip.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index c1020c58..7cd96712 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -8,7 +8,7 @@ concurrency: jobs: build_hip: - name: ROCm HIP 6.1 + name: ROCm HIP 6.3.2 runs-on: ubuntu-24.04 env: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" @@ -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 @@ -46,11 +46,6 @@ jobs: python3 -m pip install -U build packaging setuptools[core] wheel python3 -m pip install -U cmake - # "mpic++ --showme" forgets open-pal in Ubuntu 24.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 \ From 385b416327bb9a08ce900dc89b050311e00cfa22 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Thu, 24 Apr 2025 12:24:19 -0700 Subject: [PATCH 12/18] update hip dependencies file --- .github/workflows/dependencies/hip.sh | 38 ++++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dependencies/hip.sh b/.github/workflows/dependencies/hip.sh index 9a556ad2..76a2abd0 100755 --- a/.github/workflows/dependencies/hip.sh +++ b/.github/workflows/dependencies/hip.sh @@ -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`: @@ -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 @@ -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 From 3d76122868708499b7206f3daba01b85e2a7a61f Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Fri, 25 Apr 2025 10:14:50 -0700 Subject: [PATCH 13/18] try to fix HIP loading --- .github/workflows/hip.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 7cd96712..746b6a13 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -46,6 +46,11 @@ jobs: python3 -m pip install -U build packaging setuptools[core] wheel python3 -m pip install -U cmake + # "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 \ From 330dd42ba5a33fd3fb7d3b6d945a163238360e53 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Mon, 28 Apr 2025 12:40:14 -0700 Subject: [PATCH 14/18] tweak hip ci test --- .github/workflows/hip.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 746b6a13..c6c21056 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -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 From 3e2f4ef18830fae687c86fe8fad8457d77d9239f Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Mon, 28 Apr 2025 14:49:44 -0700 Subject: [PATCH 15/18] bump HIP version again --- .github/workflows/dependencies/hip.sh | 2 +- .github/workflows/hip.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependencies/hip.sh b/.github/workflows/dependencies/hip.sh index 76a2abd0..58ff8383 100755 --- a/.github/workflows/dependencies/hip.sh +++ b/.github/workflows/dependencies/hip.sh @@ -33,7 +33,7 @@ sudo apt-key add rocm.gpg.key source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ... -VERSION=${1-6.3.2} +VERSION=${1-6.4} echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${VERSION} ${UBUNTU_CODENAME} main" \ | sudo tee /etc/apt/sources.list.d/rocm.list diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index c6c21056..1769d968 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -8,7 +8,7 @@ concurrency: jobs: build_hip: - name: ROCm HIP 6.3.2 + name: ROCm HIP 6.4 runs-on: ubuntu-24.04 env: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" @@ -18,7 +18,7 @@ jobs: - name: install dependencies shell: bash run: | - .github/workflows/dependencies/hip.sh 6.3.2 + .github/workflows/dependencies/hip.sh 6.4 .github/workflows/dependencies/dependencies_ccache.sh - name: Set Up Cache uses: actions/cache@v4 @@ -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 From 1e40ae3cb99fe71f298d76ed4ebd8d32174ccfb9 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Mon, 28 Apr 2025 15:25:21 -0700 Subject: [PATCH 16/18] try 6.3.4 --- .github/workflows/dependencies/hip.sh | 2 +- .github/workflows/hip.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependencies/hip.sh b/.github/workflows/dependencies/hip.sh index 58ff8383..89545a87 100755 --- a/.github/workflows/dependencies/hip.sh +++ b/.github/workflows/dependencies/hip.sh @@ -33,7 +33,7 @@ sudo apt-key add rocm.gpg.key source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ... -VERSION=${1-6.4} +VERSION=${1-6.3.4} echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${VERSION} ${UBUNTU_CODENAME} main" \ | sudo tee /etc/apt/sources.list.d/rocm.list diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 1769d968..e4fc10d0 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -8,7 +8,7 @@ concurrency: jobs: build_hip: - name: ROCm HIP 6.4 + name: ROCm HIP 6.3.4 runs-on: ubuntu-24.04 env: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" @@ -18,7 +18,7 @@ jobs: - name: install dependencies shell: bash run: | - .github/workflows/dependencies/hip.sh 6.4 + .github/workflows/dependencies/hip.sh 6.3.4 .github/workflows/dependencies/dependencies_ccache.sh - name: Set Up Cache uses: actions/cache@v4 From 92f08f4ef9940b28cf42186455c7a3f381495686 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Mon, 28 Apr 2025 16:49:44 -0700 Subject: [PATCH 17/18] try 6.2.4 --- .github/workflows/dependencies/hip.sh | 2 +- .github/workflows/hip.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependencies/hip.sh b/.github/workflows/dependencies/hip.sh index 89545a87..be78c3a7 100755 --- a/.github/workflows/dependencies/hip.sh +++ b/.github/workflows/dependencies/hip.sh @@ -33,7 +33,7 @@ sudo apt-key add rocm.gpg.key source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ... -VERSION=${1-6.3.4} +VERSION=${1-6.2.4} echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${VERSION} ${UBUNTU_CODENAME} main" \ | sudo tee /etc/apt/sources.list.d/rocm.list diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index e4fc10d0..9cdb650e 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -8,7 +8,7 @@ concurrency: jobs: build_hip: - name: ROCm HIP 6.3.4 + name: ROCm HIP 6.2.4 runs-on: ubuntu-24.04 env: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" @@ -18,7 +18,7 @@ jobs: - name: install dependencies shell: bash run: | - .github/workflows/dependencies/hip.sh 6.3.4 + .github/workflows/dependencies/hip.sh 6.2.4 .github/workflows/dependencies/dependencies_ccache.sh - name: Set Up Cache uses: actions/cache@v4 From 9fc64a14df6ef257d236f6fb24b42e1342e52660 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Thu, 1 May 2025 09:13:08 -0700 Subject: [PATCH 18/18] Try rocm 6.3.2 and ubuntu 22.04 --- .github/workflows/dependencies/hip.sh | 2 +- .github/workflows/hip.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependencies/hip.sh b/.github/workflows/dependencies/hip.sh index be78c3a7..76a2abd0 100755 --- a/.github/workflows/dependencies/hip.sh +++ b/.github/workflows/dependencies/hip.sh @@ -33,7 +33,7 @@ sudo apt-key add rocm.gpg.key source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ... -VERSION=${1-6.2.4} +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 diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 9cdb650e..2ba76ca4 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -8,8 +8,8 @@ concurrency: jobs: build_hip: - name: ROCm HIP 6.2.4 - runs-on: ubuntu-24.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 @@ -18,7 +18,7 @@ jobs: - name: install dependencies shell: bash run: | - .github/workflows/dependencies/hip.sh 6.2.4 + .github/workflows/dependencies/hip.sh 6.3.2 .github/workflows/dependencies/dependencies_ccache.sh - name: Set Up Cache uses: actions/cache@v4