Skip to content

Commit

Permalink
Merge branch 'development' into set_periodic_PEC_corner_guards
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgrote committed Nov 13, 2023
2 parents 863bfb4 + ce82a69 commit 911b1ac
Show file tree
Hide file tree
Showing 591 changed files with 19,856 additions and 12,477 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
WARPX_CI_EB: 'TRUE'

# default: 60; maximum: 360
timeoutInMinutes: 120
timeoutInMinutes: 180

steps:
# set up caches:
Expand Down
92 changes: 82 additions & 10 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,17 +1,89 @@
Checks: '-*,
bugprone-argument-comment,
bugprone-assert-side-effect,
bugprone-bad-signal-to-kill-thread,
bugprone-bool-pointer-implicit-conversion,
bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
cppcoreguidelines-avoid-goto,
misc-const-correctness,
Checks: '
-*,
bugprone-*,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-misplaced-widening-cast,
-bugprone-unchecked-optional-access,
cert-*,
-cert-err58-cpp,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-no-malloc,
-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-avoid-bind,
modernize-concat-nested-namespaces,
modernize-deprecated-headers,
modernize-deprecated-ios-base-aliases,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-pass-by-value,
modernize-raw-string-literal,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-replace-disallow-copy-and-assign-macro,
modernize-replace-random-shuffle,
modernize-shrink-to-fit,
modernize-unary-static-assert,
modernize-use-nullptr,
-modernize-return-braced-init-list,
mpi-*,
performance-faster-string-find,
performance-for-range-copy,
readability-non-const-parameter
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-string-concatenation,
performance-inefficient-vector-operation,
performance-move-const-arg,
performance-move-constructor-init,
performance-no-automatic-move,
performance-no-int-to-ptr,
readability-avoid-const-params-in-decls,
readability-const-return-type,
readability-container-contains,
readability-container-data-pointer,
readability-container-size-empty,
readability-non-const-parameter,
readability-redundant-control-flow,
readability-redundant-declaration,
readability-redundant-function-ptr-dereference,
readability-redundant-member-init,
readability-redundant-preprocessor,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-redundant-string-init,
readability-simplify-boolean-expr,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-suspicious-call-argument,
readability-uniqueptr-delete-release,
readability-use-anyofallof,
-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$'
42 changes: 19 additions & 23 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ jobs:
# https://github.com/ComputationalRadiationPhysics/picongpu/blob/0.5.0/share/picongpu/dockerfiles/ubuntu-1604/Dockerfile
# https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/
build_nvcc:
name: NVCC 11.0.3 SP
name: NVCC 11.3 SP
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror"
CMAKE_GENERATOR: Ninja
# setuptools/mp4py work-around, see
# https://github.com/mpi4py/mpi4py/pull/159
# https://github.com/mpi4py/mpi4py/issues/157#issuecomment-1001022274
SETUPTOOLS_USE_DISTUTILS: stdlib
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -30,7 +26,7 @@ jobs:
python-version: '3.x'
- name: install dependencies
run: |
.github/workflows/dependencies/nvcc11-0.sh
.github/workflows/dependencies/nvcc11-3.sh
- name: CCache Cache
uses: actions/cache@v3
# - once stored under a key, they become immutable (even if local cache path content changes)
Expand Down Expand Up @@ -65,7 +61,7 @@ jobs:
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_COMPUTE=CUDA \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_PYTHON=ON \
-DAMReX_CUDA_ARCH=6.0 \
-DWarpX_OPENPMD=ON \
-DWarpX_openpmd_internal=OFF \
Expand All @@ -75,9 +71,11 @@ jobs:
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build_sp -j 2
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build packaging setuptools wheel
export WARPX_MPI=ON
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel .
export PYWARPX_LIB_DIR=$PWD/build_sp/lib/site-packages/pywarpx/
python3 -m pip wheel .
python3 -m pip install *.whl
# make sure legacy build system continues to build, i.e., that we don't forget
Expand Down Expand Up @@ -110,20 +108,16 @@ jobs:
which nvcc || echo "nvcc not in PATH!"
git clone https://github.com/AMReX-Codes/amrex.git ../amrex
cd ../amrex && git checkout --detach 0236a3732cc8e399e01eacd0253a782da40ce1f7 && cd -
cd ../amrex && git checkout --detach d36463103daed09a40cdea235041a6ab79ff280c && cd -
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_PSATD=TRUE USE_CCACHE=TRUE -j 2
build_nvhpc21-11-nvcc:
name: [email protected] NVCC/NVC++ Release [tests]
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
# For NVHPC, Ninja is slower than the default:
#CMAKE_GENERATOR: Ninja
# setuptools/mp4py work-around, see
# https://github.com/mpi4py/mpi4py/pull/159
# https://github.com/mpi4py/mpi4py/issues/157#issuecomment-1001022274
SETUPTOOLS_USE_DISTUTILS: stdlib
#env:
# # For NVHPC, Ninja is slower than the default:
# CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v3
- name: Dependencies
Expand Down Expand Up @@ -161,7 +155,7 @@ jobs:
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_COMPUTE=CUDA \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_PYTHON=ON \
-DAMReX_CUDA_ARCH=8.0 \
-DWarpX_OPENPMD=ON \
-DWarpX_PSATD=ON \
Expand All @@ -172,9 +166,11 @@ jobs:
# work-around for mpi4py 3.1.1 build system issue with using
# a GNU-built Python executable with non-GNU Python modules
# https://github.com/mpi4py/mpi4py/issues/114
export CFLAGS="-noswitcherror"
#export CFLAGS="-noswitcherror"
python3 -m pip install --upgrade pip setuptools wheel
export WARPX_MPI=ON
PYWARPX_LIB_DIR=$PWD/build/lib python3 -m pip wheel .
python3 -m pip install *.whl
#python3 -m pip install --upgrade pip
#python3 -m pip install --upgrade build packaging setuptools wheel
#export WARPX_MPI=ON
#export PYWARPX_LIB_DIR=$PWD/build/lib/site-packages/pywarpx/
#python3 -m pip wheel .
#python3 -m pip install *.whl
13 changes: 8 additions & 5 deletions .github/workflows/dependencies/dpcpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

# Ref.: https://github.com/rscohn2/oneapi-ci
# intel-basekit intel-hpckit are too large in size
wget -q -O - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB \
| sudo apt-key add -
echo "deb https://apt.repos.intel.com/oneapi all main" \
| sudo tee /etc/apt/sources.list.d/oneAPI.list

# download the key to system keyring
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null

# add signed entry to apt sources and configure the APT client to use Intel repository:
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list

sudo apt-get update

Expand All @@ -33,7 +36,7 @@ do
build-essential \
ccache \
cmake \
intel-oneapi-dpcpp-cpp-compiler intel-oneapi-mkl-devel \
intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel \
g++ gfortran \
libopenmpi-dev \
openmpi-bin \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright 2020-2022 The WarpX Community
# Copyright 2020-2023 The WarpX Community
#
# License: BSD-3-Clause-LBNL
# Authors: Axel Huebl
Expand All @@ -26,30 +26,27 @@ sudo apt-get install -y \
pkg-config \
wget

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" \
| sudo tee /etc/apt/sources.list.d/cuda.list
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb

sudo apt-get update
sudo apt-get install -y \
cuda-command-line-tools-11-0 \
cuda-compiler-11-0 \
cuda-cupti-dev-11-0 \
cuda-minimal-build-11-0 \
cuda-nvml-dev-11-0 \
cuda-nvtx-11-0 \
libcufft-dev-11-0 \
libcurand-dev-11-0
sudo ln -s cuda-11.0 /usr/local/cuda
cuda-command-line-tools-11-3 \
cuda-compiler-11-3 \
cuda-cupti-dev-11-3 \
cuda-minimal-build-11-3 \
cuda-nvml-dev-11-3 \
cuda-nvtx-11-3 \
libcufft-dev-11-3 \
libcurand-dev-11-3
sudo ln -s cuda-11.3 /usr/local/cuda

# if we run out of temporary storage in CI:
#du -sh /usr/local/cuda-11.0
#du -sh /usr/local/cuda-11.3
#echo "+++ REDUCING CUDA Toolkit install size +++"
#sudo rm -rf /usr/local/cuda-11.0/targets/x86_64-linux/lib/libcu{fft,pti,rand}_static.a
#sudo rm -rf /usr/local/cuda-11.0/targets/x86_64-linux/lib/libnvperf_host_static.a
#du -sh /usr/local/cuda-11.0/
#sudo rm -rf /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcu{fft,pti,rand}_static.a
#sudo rm -rf /usr/local/cuda-11.3/targets/x86_64-linux/lib/libnvperf_host_static.a
#du -sh /usr/local/cuda-11.3/
#df -h

# cmake-easyinstall
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/dependencies/nvhpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ set -eu -o pipefail
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

sudo apt-get -qqq update
sudo apt-get install -y \
sudo apt -qqq update
sudo apt install -y \
build-essential \
ca-certificates \
cmake \
Expand All @@ -27,8 +27,12 @@ sudo apt-get install -y \

echo 'deb [trusted=yes] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | \
sudo tee /etc/apt/sources.list.d/nvhpc.list
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends nvhpc-21-11
sudo apt update -y && \
sudo apt install -y --no-install-recommends nvhpc-21-11 && \
sudo rm -rf /var/lib/apt/lists/* && \
sudo rm -rf /opt/nvidia/hpc_sdk/Linux_x86_64/21.11/examples \
/opt/nvidia/hpc_sdk/Linux_x86_64/21.11/profilers \
/opt/nvidia/hpc_sdk/Linux_x86_64/21.11/math_libs/11.5/targets/x86_64-linux/lib/lib*_static*.a

# things should reside in /opt/nvidia/hpc_sdk now

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ jobs:
-DAMReX_AMD_ARCH=gfx900 \
-DWarpX_COMPUTE=HIP \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_PYTHON=ON \
-DWarpX_MPI=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=SINGLE \
-DWarpX_PSATD=ON
cmake --build build_sp -j 2
export WARPX_MPI=OFF
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel .
export PYWARPX_LIB_DIR=$PWD/build_sp/lib/site-packages/pywarpx/
python3 -m pip wheel .
python3 -m pip install *.whl
build_hip_2d_dp:
Expand Down Expand Up @@ -107,13 +108,14 @@ jobs:
-DWarpX_DIMS=2 \
-DWarpX_COMPUTE=HIP \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_PYTHON=ON \
-DWarpX_MPI=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=DOUBLE \
-DWarpX_PSATD=ON
cmake --build build_2d -j 2
export WARPX_MPI=OFF
PYWARPX_LIB_DIR=$PWD/build_2d/lib python3 -m pip wheel .
export PYWARPX_LIB_DIR=$PWD/build_2d/lib/site-packages/pywarpx/
python3 -m pip wheel .
python3 -m pip install *.whl
Loading

0 comments on commit 911b1ac

Please sign in to comment.