diff --git a/.github/workflows/clang_sanitizers.yml b/.github/workflows/clang_sanitizers.yml index e89cb676a03..65976f0bdcf 100644 --- a/.github/workflows/clang_sanitizers.yml +++ b/.github/workflows/clang_sanitizers.yml @@ -15,8 +15,7 @@ concurrency: jobs: build_UB_sanitizer: name: Clang UB sanitizer - runs-on: ubuntu-22.04 - container: ubuntu:23.10 + runs-on: ubuntu-24.04 if: github.event.pull_request.draft == false env: CC: clang @@ -27,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: install dependencies run: | - .github/workflows/dependencies/clang17.sh + .github/workflows/dependencies/clang18.sh - name: CCache Cache uses: actions/cache@v4 with: @@ -42,8 +41,8 @@ jobs: export CCACHE_MAXSIZE=100M ccache -z - export CXX=$(which clang++-17) - export CC=$(which clang-17) + export CXX=$(which clang++-18) + export CC=$(which clang-18) export CXXFLAGS="-fsanitize=undefined,address,pointer-compare -fno-sanitize-recover=all" cmake -S . -B build \ @@ -65,10 +64,6 @@ jobs: - name: run with UB sanitizer run: | - # We need these two lines because these tests run inside a docker container - export OMPI_ALLOW_RUN_AS_ROOT=1 - export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 - export OMP_NUM_THREADS=2 #MPI implementations often leak memory @@ -81,8 +76,7 @@ jobs: build_thread_sanitizer: name: Clang thread sanitizer - runs-on: ubuntu-22.04 - container: ubuntu:23.10 + runs-on: ubuntu-24.04 if: github.event.pull_request.draft == false env: CC: clang @@ -93,7 +87,7 @@ jobs: - uses: actions/checkout@v4 - name: install dependencies run: | - .github/workflows/dependencies/clang17.sh + .github/workflows/dependencies/clang18.sh - name: CCache Cache uses: actions/cache@v4 with: @@ -108,35 +102,39 @@ jobs: export CCACHE_MAXSIZE=100M ccache -z - export CXX=$(which clang++-17) - export CC=$(which clang-17) + export CXX=$(which clang++-18) + export CC=$(which clang-18) export CXXFLAGS="-fsanitize=thread" - cmake -S . -B build \ - -GNinja \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DWarpX_DIMS="RZ;1;2;3" \ - -DWarpX_FFT=ON \ - -DWarpX_QED=ON \ - -DWarpX_QED_TABLE_GEN=ON \ - -DWarpX_OPENPMD=ON \ - -DWarpX_EB=OFF \ - -DWarpX_PRECISION=DOUBLE \ + cmake -S . -B build \ + -GNinja \ + -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=thread" \ + -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=thread" \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DWarpX_DIMS="RZ;1;2;3" \ + -DWarpX_FFT=ON \ + -DWarpX_QED=ON \ + -DWarpX_QED_TABLE_GEN=ON \ + -DWarpX_OPENPMD=ON \ + -DWarpX_EB=OFF \ + -DWarpX_PRECISION=DOUBLE \ -DWarpX_PARTICLE_PRECISION=DOUBLE cmake --build build -j 4 - cmake -S . -B build_EB \ - -GNinja \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DWarpX_DIMS="2" \ - -DWarpX_FFT=ON \ - -DWarpX_QED=ON \ - -DWarpX_QED_TABLE_GEN=ON \ - -DWarpX_OPENPMD=ON \ - -DWarpX_EB=ON \ - -DWarpX_PRECISION=DOUBLE \ + cmake -S . -B build_EB \ + -GNinja \ + -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=thread" \ + -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=thread" \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DWarpX_DIMS="2" \ + -DWarpX_FFT=ON \ + -DWarpX_QED=ON \ + -DWarpX_QED_TABLE_GEN=ON \ + -DWarpX_OPENPMD=ON \ + -DWarpX_EB=ON \ + -DWarpX_PRECISION=DOUBLE \ -DWarpX_PARTICLE_PRECISION=DOUBLE cmake --build build_EB -j 4 @@ -149,10 +147,6 @@ jobs: export TSAN_OPTIONS='ignore_noninstrumented_modules=1' export ARCHER_OPTIONS="verbose=1" - # We need these two lines because these tests run inside a docker container - export OMPI_ALLOW_RUN_AS_ROOT=1 - export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 - export OMP_NUM_THREADS=2 mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz warpx.serialize_initial_conditions = 0 diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml index edb3e8b1988..a8a3749adb9 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -18,7 +18,7 @@ jobs: matrix: dim: [1, 2, RZ, 3] name: clang-tidy-${{ matrix.dim }}D - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 180 if: github.event.pull_request.draft == false steps: diff --git a/.github/workflows/dependencies/clang17.sh b/.github/workflows/dependencies/clang18.sh similarity index 84% rename from .github/workflows/dependencies/clang17.sh rename to .github/workflows/dependencies/clang18.sh index d208a9f3f3b..f503684299b 100755 --- a/.github/workflows/dependencies/clang17.sh +++ b/.github/workflows/dependencies/clang18.sh @@ -7,11 +7,6 @@ set -eu -o pipefail -# This dependency file is currently used within a docker container, -# which does not come with sudo. -apt-get -qqq update -apt-get -y install sudo - # `man apt.conf`: # Number of retries to perform. If this is non-zero APT will retry # failed files the given number of times. @@ -23,17 +18,18 @@ echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries sudo apt-get -qqq update sudo apt-get install -y \ cmake \ - clang-17 \ - clang-tidy-17 \ + clang-18 \ + clang-tidy-18 \ libblas-dev \ - libc++-17-dev \ + libc++-18-dev \ libboost-math-dev \ libfftw3-dev \ libfftw3-mpi-dev \ libhdf5-openmpi-dev \ liblapack-dev \ libopenmpi-dev \ - libomp-17-dev \ + libomp-18-dev \ + libtsan2 \ ninja-build \ wget \ xz-utils \ @@ -42,9 +38,9 @@ sudo apt-get install -y \ ccache \ pkg-config -# Use clang 17 -export CXX=$(which clang++-17) -export CC=$(which clang-17) +# Use clang 18 +export CXX=$(which clang++-18) +export CC=$(which clang-18) # cmake-easyinstall #