Skip to content

Commit

Permalink
Merge pull request #133 from hklion/HSdevmerge_230908
Browse files Browse the repository at this point in the history
Harris Sheet merge 09/08/2023
  • Loading branch information
RevathiJambunathan authored Sep 13, 2023
2 parents 553c6b4 + 136cb0d commit 5854ea5
Show file tree
Hide file tree
Showing 317 changed files with 6,533 additions and 7,522 deletions.
49 changes: 37 additions & 12 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
Checks: '-*,
bugprone-*
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-misplaced-widening-cast,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-misplaced-widening-cast,
-bugprone-unchecked-optional-access,
cert-*
-cert-err58-cpp,
-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,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-owning-memory,
google-build-explicit-make-pair,
google-build-namespaces,
google-global-names-in-headers,
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,
Expand All @@ -41,17 +52,31 @@ Checks: '-*,
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-uppercase-literal-suffix,
readability-use-anyofallof,
readability-non-const-parameter
-readability-uppercase-literal-suffix
'

CheckOptions:
Expand Down
24 changes: 13 additions & 11 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 cf8d9f8e233be2ac68aeb65a95e992adfb483939 && cd -
cd ../amrex && git checkout --detach 23.09 && 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 @@ -172,9 +173,10 @@ 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 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
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
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
13 changes: 7 additions & 6 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror -Wno-error=pass-failed"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: TRUE
# For macOS, Ninja is slower than the default:
#CMAKE_GENERATOR: Ninja
# setuptools/mp4py work-around, see
Expand Down Expand Up @@ -63,6 +64,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 +76,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 5854ea5

Please sign in to comment.