Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Browse files Browse the repository at this point in the history
… AllocateFewerGuardCells
  • Loading branch information
EZoni committed Sep 16, 2024
2 parents fb73a0f + 3c5ebd3 commit 8acd6b0
Show file tree
Hide file tree
Showing 2,050 changed files with 134,413 additions and 66,594 deletions.
124 changes: 83 additions & 41 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,40 @@ 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_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: 120
timeoutInMinutes: 240

steps:
# set up caches:
Expand All @@ -50,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 @@ -62,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 @@ -74,48 +73,91 @@ jobs:
set -eu -o pipefail
cat /proc/cpuinfo | grep "model name" | sort -u
df -h
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
sudo apt update
sudo apt install -y ccache curl gcc gfortran git g++ ninja-build \
openmpi-bin libopenmpi-dev \
libfftw3-dev libfftw3-mpi-dev libhdf5-openmpi-dev pkg-config make \
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
python3 -m pip install --upgrade pipx
python3 -m pipx install cmake
python3 -m pipx ensurepath
export PATH="$HOME/.local/bin:$PATH"
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
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://bitbucket.org/icl/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://bitbucket.org/icl/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_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 \
-DHeffte_ENABLE_FFTW=ON -DHeffte_ENABLE_TESTING=OFF \
-DHeffte_ENABLE_CUDA=OFF -DHeffte_ENABLE_ROCM=OFF \
-DHeffte_ENABLE_ONEAPI=OFF -DHeffte_ENABLE_MKL=OFF \
-DHeffte_ENABLE_PYTHON=OFF -DHeffte_ENABLE_FORTRAN=OFF \
-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'
60 changes: 60 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Checks: '
-*,
bugprone-*,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-misplaced-widening-cast,
-bugprone-unchecked-optional-access,
cert-*,
-cert-err58-cpp,
clang-analyzer-*,
-clang-analyzer-optin.performance.Padding,
-clang-analyzer-optin.mpi.MPI-Checker,
-clang-analyzer-osx.*,
-clang-analyzer-optin.osx.*,
clang-diagnostic-*,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-*,
google-build-explicit-make-pair,
google-build-namespaces,
google-global-names-in-headers,
misc-*,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-return-braced-init-list,
-modernize-use-trailing-return-type,
mpi-*,
performance-*,
portability-*,
readability-*,
-readability-convert-member-functions-to-static,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-implicit-bool-conversion,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-named-parameter,
-readability-uppercase-literal-suffix
'

CheckOptions:
- key: bugprone-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
value: "false"
- key: misc-definitions-in-headers.HeaderFileExtensions
value: "H,"
- key: modernize-pass-by-value.ValuesOnly
value: "true"


HeaderFilterRegex: 'Source[a-z_A-Z0-9\/]+\.H$'
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ indent_size = unset
[*.py]
# isort config
force_sort_within_sections = true
known_first_party = amrex,impactx,picmistandard,pywarpx,warpx
# same as the "black" multi-line import style
multi_line_output = 3
include_trailing_comma = True
6 changes: 6 additions & 0 deletions .github/codeql/warpx-codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: "WarpX CodeQL config"

# ignore AMReX, pyAMReX, PICSAR, openPMD et al.
# note: not yet suppored, thus doing post-analysis SARIF filtering
paths-ignore:
- build/_deps
Loading

0 comments on commit 8acd6b0

Please sign in to comment.