diff --git a/.github/workflows/dependencies/dependencies_clang6.sh b/.github/workflows/dependencies/dependencies_clang18.sh similarity index 62% rename from .github/workflows/dependencies/dependencies_clang6.sh rename to .github/workflows/dependencies/dependencies_clang18.sh index c7f3dca5..517a7111 100755 --- a/.github/workflows/dependencies/dependencies_clang6.sh +++ b/.github/workflows/dependencies/dependencies_clang18.sh @@ -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 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/dependencies/dependencies_nvcc11.sh b/.github/workflows/dependencies/dependencies_nvcc12.sh similarity index 67% rename from .github/workflows/dependencies/dependencies_nvcc11.sh rename to .github/workflows/dependencies/dependencies_nvcc12.sh index cf91137c..029bcf20 100755 --- a/.github/workflows/dependencies/dependencies_nvcc11.sh +++ b/.github/workflows/dependencies/dependencies_nvcc12.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 \ @@ -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/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 diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 9920751b..2ba76ca4 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 5e2d6186..bd698ff5 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 - 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 @@ -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 @@ -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 @@ -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 @@ -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.sh .github/workflows/dependencies/dependencies_ccache.sh - name: Set Up Cache uses: actions/cache@v4 @@ -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 @@ -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 @@ -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