Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into quik
Browse files Browse the repository at this point in the history
  • Loading branch information
roelof-groenewald committed Sep 29, 2024
2 parents e0b4838 + eef12e9 commit 31ce2d8
Show file tree
Hide file tree
Showing 1,114 changed files with 22,789 additions and 16,745 deletions.
111 changes: 70 additions & 41 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,37 @@ pr:

jobs:
- job:
# FIXME remove unused variables
variables:
BLASPP_HOME: '/usr/local'
CEI_SUDO: 'sudo'
CEI_TMP: '/tmp/cei'
CMAKE_GENERATOR: 'Ninja'
FFTW_HOME: '/usr'
LAPACKPP_HOME: '/usr/local'
OMP_NUM_THREADS: 1
WARPX_CI_CCACHE: 'TRUE'
WARPX_CI_CLEAN_TESTS: 'TRUE'
WARPX_CI_NUM_MAKE_JOBS: 2
WARPX_CI_OPENPMD: 'TRUE'
WARPX_CI_TMP: '/tmp/ci'
#WARPX_OPENPMD: 'TRUE'

strategy:
matrix:
cartesian1d:
WARPX_CI_REGULAR_CARTESIAN_1D: 'TRUE'
WARPX_CI_PSATD: 'FALSE'
cartesian2d:
WARPX_CI_REGULAR_CARTESIAN_2D: 'TRUE'
cartesian3d:
WARPX_CI_REGULAR_CARTESIAN_3D: 'TRUE'
single_precision:
WARPX_CI_SINGLE_PRECISION: 'TRUE'
rz_or_nompi:
WARPX_CI_RZ_OR_NOMPI: 'TRUE'
qed:
WARPX_CI_QED: 'TRUE'
embedded_boundary:
WARPX_CI_EB: 'TRUE'
# Cartesian 1D
cartesian_1d:
WARPX_CMAKE_FLAGS: -DWarpX_DIMS=1 -DWarpX_FFT=ON -DWarpX_PYTHON=ON
# Cartesian 2D
cartesian_2d:
WARPX_CMAKE_FLAGS: -DWarpX_DIMS=2 -DWarpX_FFT=ON -DWarpX_PYTHON=ON
# Cartesian 3D
cartesian_3d:
WARPX_CMAKE_FLAGS: -DWarpX_DIMS=3 -DWarpX_FFT=ON -DWarpX_PYTHON=ON
WARPX_HEFFTE: 'TRUE'
# Cylindrical RZ
cylindrical_rz:
WARPX_CMAKE_FLAGS: -DWarpX_DIMS=RZ -DWarpX_FFT=ON -DWarpX_PYTHON=ON
WARPX_RZ_FFT: 'TRUE'
# single precision
#single_precision:
# WARPX_CMAKE_FLAGS: -DWarpX_DIMS='1;2;3;RZ' -DWarpX_FFT=ON -DWarpX_PYTHON=ON -DWarpX_PRECISION=SINGLE
# WARPX_RZ_FFT: 'TRUE'

# default: 60; maximum: 360
timeoutInMinutes: 240
Expand All @@ -51,9 +51,8 @@ jobs:
- task: Cache@2
continueOnError: true
inputs:
key: 'Ccache | "$(System.JobName)" | .azure-pipelines.yml | cmake/dependencies/AMReX.cmake | run_test.sh'
key: 'Ccache | "$(System.JobName)" | .azure-pipelines.yml | cmake/dependencies/AMReX.cmake'
restoreKeys: |
Ccache | "$(System.JobName)" | .azure-pipelines.yml | cmake/dependencies/AMReX.cmake | run_test.sh
Ccache | "$(System.JobName)" | .azure-pipelines.yml | cmake/dependencies/AMReX.cmake
Ccache | "$(System.JobName)" | .azure-pipelines.yml
path: /home/vsts/.ccache
Expand All @@ -63,9 +62,8 @@ jobs:
- task: Cache@2
continueOnError: true
inputs:
key: 'Python3 | "$(System.JobName)" | .azure-pipelines.yml | run_test.sh'
key: 'Python3 | "$(System.JobName)" | .azure-pipelines.yml'
restoreKeys: |
Python3 | "$(System.JobName)" | .azure-pipelines.yml | run_test.sh
Python3 | "$(System.JobName)" | .azure-pipelines.yml
path: /home/vsts/.local/lib/python3.8
cacheHitVar: PYTHON38_CACHE_RESTORED
Expand All @@ -83,6 +81,8 @@ jobs:
python3 python3-pandas python3-pip python3-venv python3-setuptools libblas-dev liblapack-dev
ccache --set-config=max_size=10.0G
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
python3 -m pip install --upgrade packaging
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade wheel
python3 -m pip install --upgrade virtualenv
Expand All @@ -92,25 +92,29 @@ jobs:
export PATH="$HOME/.local/bin:$PATH"
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
if [ "${WARPX_CI_OPENPMD:-FALSE}" == "TRUE" ]; then
cmake-easyinstall --prefix=/usr/local \
git+https://github.com/openPMD/[email protected] \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI_TOOLS=OFF
python3 -m pip install --upgrade openpmd-api
fi
if [[ "${WARPX_CI_RZ_OR_NOMPI:-FALSE}" == "TRUE" ]]; then
cmake-easyinstall --prefix=/usr/local git+https://github.com/icl-utk-edu/blaspp.git \
#if [ "${WARPX_OPENPMD:-FALSE}" == "TRUE" ]; then
# cmake-easyinstall --prefix=/usr/local \
# git+https://github.com/openPMD/[email protected] \
# -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
# -DCMAKE_VERBOSE_MAKEFILE=ON \
# -DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI_TOOLS=OFF
# #python3 -m pip install --upgrade openpmd-api
#fi
if [ "${WARPX_RZ_FFT:-FALSE}" == "TRUE" ]; then
# BLAS++
cmake-easyinstall --prefix=/usr/local \
git+https://github.com/icl-utk-edu/blaspp.git \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_CXX_STANDARD=17 \
-Duse_openmp=OFF -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
cmake-easyinstall --prefix=/usr/local git+https://github.com/icl-utk-edu/lapackpp.git \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_CXX_STANDARD=17 \
# LAPACK++
cmake-easyinstall --prefix=/usr/local \
git+https://github.com/icl-utk-edu/lapackpp.git \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_CXX_STANDARD=17 \
-Duse_cmake_find_lapack=ON -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
fi
if [[ "${WARPX_CI_REGULAR_CARTESIAN_3D:-FALSE}" == "TRUE" ]]; then
if [ "${WARPX_HEFFTE:-FALSE}" == "TRUE" ]; then
cmake-easyinstall --prefix=/usr/local git+https://github.com/icl-utk-edu/[email protected] \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_CXX_STANDARD=17 -DHeffte_ENABLE_DOXYGEN=OFF \
Expand All @@ -121,14 +125,39 @@ jobs:
-DHeffte_ENABLE_MAGMA=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
fi
# Python modules required for test analysis
python3 -m pip install --upgrade -r Regression/requirements.txt
python3 -m pip cache purge
# external repositories required for test analysis
cd ..
git clone --depth 1 https://github.com/ECP-WarpX/warpx-data.git
# TODO select only specific datasets?
git clone --depth 1 https://github.com/openPMD/openPMD-example-datasets.git
cd -
rm -rf ${CEI_TMP}
df -h
displayName: 'Install dependencies'
- bash: |
set -eu -o pipefail
df -h
./run_test.sh
rm -rf ${WARPX_CI_TMP}
# configure
export AMReX_CMAKE_FLAGS="-DAMReX_ASSERTIONS=ON -DAMReX_TESTING=ON"
cmake -S . -B build \
${AMReX_CMAKE_FLAGS} \
${WARPX_CMAKE_FLAGS} \
-DWarpX_TEST_CLEANUP=ON \
-DWarpX_TEST_FPETRAP=ON
# build
cmake --build build -j 2
df -h
displayName: 'Build & test'
displayName: 'Build'
- bash: |
set -eu -o pipefail
# run tests (exclude pytest.AMReX when running Python tests)
ctest --test-dir build --output-on-failure -E AMReX
displayName: 'Test'
44 changes: 17 additions & 27 deletions .github/workflows/clang_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
build_UB_sanitizer:
name: Clang UB sanitizer
runs-on: ubuntu-22.04
container: ubuntu:23.10
if: github.event.pull_request.draft == false
env:
CC: clang
Expand All @@ -20,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/clang15.sh
.github/workflows/dependencies/clang17.sh
- name: CCache Cache
uses: actions/cache@v4
with:
Expand All @@ -35,8 +36,8 @@ jobs:
export CCACHE_MAXSIZE=100M
ccache -z
export CXX=$(which clang++-15)
export CC=$(which clang-15)
export CXX=$(which clang++-17)
export CC=$(which clang-17)
export CXXFLAGS="-fsanitize=undefined,address,pointer-compare -fno-sanitize-recover=all"
cmake -S . -B build \
Expand All @@ -58,15 +59,19 @@ 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
export "ASAN_OPTIONS=detect_leaks=0"
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_rz
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_1d
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_2d
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_3d
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_test_1d_laser_acceleration
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d
build_thread_sanitizer:
name: Clang thread sanitizer
Expand Down Expand Up @@ -144,29 +149,14 @@ jobs:
export OMP_NUM_THREADS=2
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_rz warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_1d warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_2d warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_3d warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_test_1d_laser_acceleration warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d warpx.serialize_initial_conditions = 0
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d warpx.serialize_initial_conditions = 0
git clone https://github.com/ECP-WarpX/warpx-data ../warpx-data
cd Examples/Tests/embedded_circle
ulimit -c unlimited
mpirun -n 2 ../../../build_EB/bin/warpx.2d inputs_2d warpx.serialize_initial_conditions = 0
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
mpirun -n 2 ../../../build_EB/bin/warpx.2d inputs_test_2d_embedded_circle warpx.serialize_initial_conditions = 0
17 changes: 1 addition & 16 deletions .github/workflows/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
dim: [1, 2, RZ, 3]
name: clang-tidy-${{ matrix.dim }}D
runs-on: ubuntu-22.04
timeout-minutes: 120
timeout-minutes: 180
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -60,18 +60,3 @@ jobs:
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
7 changes: 5 additions & 2 deletions .github/workflows/cleanup-cache-postpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ jobs:
REPO=${{ github.repository }}
gh run download ${{ github.event.workflow_run.id }} -n pr_number
pr_number=`cat pr_number.txt`
# For debugging cat ${GITHUB_EVENT_PATH} to see the payload.
pr_head_sha=${{ github.event.workflow_run.head_sha }}
pr_number=$(gh pr list --state all --search $pr_head_sha --json number --jq '.[0].number')
echo "Post-PR cache cleanup for PR ${pr_number}"
BRANCH=refs/pull/${pr_number}/merge
# Setting this to not fail the workflow while deleting cache keys.
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CleanUpCache

on:
workflow_run:
workflows: [🧹 clang-tidy, 🔍 CodeQL, 🐧 CUDA, 🐧 HIP, 🐧 Intel, 🍏 macOS, 🐧 OpenMP]
workflows: [🧴 clang sanitizers, 🧹 clang-tidy, 🔍 CodeQL, 🐧 CUDA, 🐧 HIP, 🐧 Intel, 🍏 macOS, 🐧 OpenMP]
types:
- completed

Expand All @@ -29,9 +29,12 @@ jobs:
# Triggering workflow run name (e.g., LinuxClang)
WORKFLOW_NAME="${{ github.event.workflow_run.name }}"
# For debugging, cat ${GITHUB_EVENT_PATH} to see the payload.
if [[ $EVENT == "pull_request" ]]; then
gh run download ${{ github.event.workflow_run.id }} -n pr_number
pr_number=`cat pr_number.txt`
pr_head_sha=${{ github.event.workflow_run.head_sha }}
pr_number=$(gh pr list --search $pr_head_sha --json number --jq '.[0].number')
echo "Clean up cache for PR ${pr_number}"
BRANCH=refs/pull/${pr_number}/merge
else
BRANCH=refs/heads/${{ github.event.workflow_run.head_branch }}
Expand All @@ -54,6 +57,7 @@ jobs:
IFS=$'\n'
for j in $cached_jobs
do
# Delete all entries except the last used one
old_keys=$(gh actions-cache list -L 100 -R $REPO -B $BRANCH --key "${j}-git-" --sort last-used | cut -f 1 | tail -n +2)
for k in $old_keys
do
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,3 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif

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
17 changes: 1 addition & 16 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
which nvcc || echo "nvcc not in PATH!"
git clone https://github.com/AMReX-Codes/amrex.git ../amrex
cd ../amrex && git checkout --detach 6dcaa1223845bacdad3447b80aec5ecc2f03bf19 && cd -
cd ../amrex && git checkout --detach 3734079379bb6b2a3850d197241f6b2c3b3bfa7d && cd -
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_FFT=TRUE USE_CCACHE=TRUE -j 4
ccache -s
Expand Down Expand Up @@ -203,18 +203,3 @@ jobs:
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
Loading

0 comments on commit 31ce2d8

Please sign in to comment.