Skip to content

Commit

Permalink
Merge ECP-WarpX:development into EZoni:psatd_secondorder
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Aug 24, 2023
2 parents f5e0c62 + b88db16 commit 4885bb3
Show file tree
Hide file tree
Showing 363 changed files with 8,230 additions and 8,633 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
68 changes: 68 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,10 +1,78 @@
Checks: '-*,
bugprone-*
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-misplaced-widening-cast,
cert-*
-cert-err58-cpp,
cppcoreguidelines-avoid-goto,
cppcoreguidelines-interfaces-global-init,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-owning-memory,
misc-const-correctness,
misc-misleading-bidirectional,
misc-misleading-identifier,
misc-misplaced-const,
misc-uniqueptr-reset-release,
misc-unused-alias-decls,
misc-unused-parameters,
misc-unused-using-decls,
-misc-definitions-in-headers,
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-return-braced-init-list,
modernize-shrink-to-fit,
modernize-unary-static-assert,
modernize-use-nullptr,
mpi-*,
performance-faster-string-find,
performance-for-range-copy,
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-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-uppercase-literal-suffix,
readability-use-anyofallof,
readability-non-const-parameter
'

CheckOptions:
- key: modernize-pass-by-value.ValuesOnly
value: 'true'

HeaderFilterRegex: 'Source[a-z_A-Z0-9\/]+\.H$'
16 changes: 9 additions & 7 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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:
Expand All @@ -30,7 +30,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 +65,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 @@ -77,7 +77,8 @@ jobs:
python3 -m pip install --upgrade pip 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,7 +111,7 @@ jobs:
which nvcc || echo "nvcc not in PATH!"
git clone https://github.com/AMReX-Codes/amrex.git ../amrex
cd ../amrex && git checkout --detach d28b9ab1cd64e648372ae679a6be01c733899525 && cd -
cd ../amrex && git checkout --detach dda0d979ca2ec912f7dd2eb630399f33ee7990e0 && 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:
Expand Down Expand Up @@ -161,7 +162,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 @@ -176,5 +177,6 @@ jobs:
python3 -m pip install --upgrade pip setuptools wheel
export WARPX_MPI=ON
PYWARPX_LIB_DIR=$PWD/build/lib python3 -m pip wheel .
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
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
2 changes: 1 addition & 1 deletion .github/workflows/insitu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
CC: gcc
CMAKE_PREFIX_PATH: /ascent/install/lib/cmake/
container:
image: alpinedav/ascent:0.9.1
image: alpinedav/ascent:0.9.2
steps:
- uses: actions/checkout@v3
- name: Configure
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,29 @@ jobs:
export CXX=$(which icpc)
export CC=$(which icc)
python3 -m pip install --upgrade pip setuptools wheel
cmake -S . -B build_dp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_LIB=ON \
-DpyAMReX_IPO=OFF \
-DWarpX_PYTHON=ON \
-DWarpX_PYTHON_IPO=OFF \
-DWarpX_MPI=OFF \
-DWarpX_OPENPMD=ON \
-DWarpX_openpmd_internal=OFF
cmake --build build_dp -j 2
cmake -S . -B build_sp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_LIB=ON \
-DpyAMReX_IPO=OFF \
-DWarpX_PYTHON=ON \
-DWarpX_PYTHON_IPO=OFF \
-DWarpX_MPI=OFF \
-DWarpX_OPENPMD=ON \
-DWarpX_openpmd_internal=OFF \
-DWarpX_PRECISION=SINGLE
cmake --build build_sp -j 2
python3 -m pip install --upgrade pip setuptools wheel
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip install -v .
cmake --build build_sp --target pip_install
build_icpx:
name: oneAPI ICX SP
Expand Down Expand Up @@ -99,20 +103,19 @@ jobs:
export CXX=$(which icpx)
export CC=$(which icx)
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools wheel
cmake -S . -B build_sp \
-DCMAKE_CXX_FLAGS_RELEASE="-O1 -DNDEBUG" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_PYTHON=ON \
-DWarpX_MPI=OFF \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=SINGLE
cmake --build build_sp -j 2
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools wheel
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel -v .
python3 -m pip install *.whl
cmake --build build_sp --target pip_install
- name: run pywarpx
run: |
Expand Down Expand Up @@ -167,7 +170,7 @@ jobs:
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_COMPUTE=SYCL \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_PYTHON=ON \
-DWarpX_MPI=OFF \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=SINGLE
Expand All @@ -176,5 +179,5 @@ jobs:
# Skip this as it will copy the binary artifacts and we are tight on disk space
# python3 -m pip install --upgrade pip
# python3 -m pip install --upgrade setuptools wheel
# PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel .
# PYWARPX_LIB_DIR=$PWD/build_sp/lib/site-packages/pywarpx/ python3 -m pip wheel .
# python3 -m pip install *.whl
12 changes: 6 additions & 6 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:
ccache-macos-appleclang-
- name: build WarpX
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pip setuptools wheel
cmake -S . -B build_dp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_EB=ON \
Expand All @@ -72,17 +75,14 @@ jobs:
cmake -S . -B build_sp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DPython_EXECUTABLE=$(which python3) \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_PYTHON=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_openpmd_internal=OFF \
-DWarpX_PRECISION=SINGLE
cmake --build build_sp -j 3
python3 -m pip install --upgrade pip setuptools wheel
export WARPX_MPI=ON
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel .
python3 -m pip install *.whl
cmake --build build_sp --target pip_install
- name: run pywarpx
run: |
Expand Down
Loading

0 comments on commit 4885bb3

Please sign in to comment.