Skip to content

Commit

Permalink
Merge branch 'development' into ChiAtCreation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucafedeli88 authored Sep 7, 2023
2 parents 2a947a6 + a056388 commit 73c9529
Show file tree
Hide file tree
Showing 161 changed files with 1,552 additions and 1,094 deletions.
31 changes: 18 additions & 13 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
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,
misc-const-correctness,
misc-misleading-bidirectional,
misc-misleading-identifier,
Expand All @@ -21,7 +22,7 @@ Checks: '-*,
misc-unused-alias-decls,
misc-unused-parameters,
misc-unused-using-decls,
-misc-definitions-in-headers,
-misc-definitions-in-headers,
modernize-avoid-bind,
modernize-concat-nested-namespaces,
modernize-deprecated-headers,
Expand Down Expand Up @@ -50,6 +51,11 @@ Checks: '-*,
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,
Expand All @@ -66,9 +72,8 @@ Checks: '-*,
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
14 changes: 7 additions & 7 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,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 dda0d979ca2ec912f7dd2eb630399f33ee7990e0 && cd -
cd ../amrex && git checkout --detach c45770c9f9b2c5fa98c675a439c502e78912bf47 && 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 @@ -173,10 +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
export PYWARPX_LIB_DIR=$PWD/build/lib/site-packages/pywarpx/
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
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
1 change: 1 addition & 0 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
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ option(WarpX_PYTHON_IPO
ON
)

set(pyWarpX_VERSION_INFO "" CACHE STRING
"PEP-440 conformant version (set by distutils)")

# enforce consistency of dependent options
if(WarpX_APP OR WarpX_PYTHON)
set(WarpX_LIB ON CACHE STRING "Build WarpX as a library" FORCE)
Expand Down Expand Up @@ -497,7 +500,7 @@ foreach(D IN LISTS WarpX_DIMS)
target_compile_definitions(ablastr_${SD} PUBLIC WARPX_USE_PSATD)
endif()

if(WarpX_PYTHON)
if(WarpX_PYTHON AND pyWarpX_VERSION_INFO)
# for module __version__
target_compile_definitions(pyWarpX_${SD} PRIVATE
PYWARPX_VERSION_INFO=${pyWarpX_VERSION_INFO})
Expand Down Expand Up @@ -534,6 +537,7 @@ set_cxx_warnings()
# Generate Configuration and .pc Files ########################################
#
get_source_version(WarpX_${WarpX_DIMS_LAST} ${WarpX_SOURCE_DIR})
set(WarpX_GIT_VERSION ${WarpX_${WarpX_DIMS_LAST}_GIT_VERSION})
configure_file(
${WarpX_SOURCE_DIR}/Source/Utils/WarpXVersion.H.in
${WarpX_BINARY_DIR}/Source/Utils/WarpXVersion.H
Expand Down
5 changes: 5 additions & 0 deletions Docs/source/highlights.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Plasma-Based Acceleration

Scientific works in laser-plasma and beam-plasma acceleration.

#. Mewes SM, Boyle GJ, Ferran Pousa A, Shalloo RJ, Osterhoff J, Arran C, Corner L, Walczak R, Hooker SM, Thévenet M.
**Demonstration of tunability of HOFI waveguides via start-to-end simulations**.
Phys. Rev. Research **5**, 033112, 2023
`DOI:10.1103/PhysRevResearch.5.033112 <https://doi.org/10.1103/PhysRevResearch.5.033112>`__

#. Sandberg R T, Lehe R, Mitchell C E, Garten M, Qiang J, Vay J-L, Huebl A.
**Hybrid Beamline Element ML-Training for Surrogates in the ImpactX Beam-Dynamics Code**.
14th International Particle Accelerator Conference (IPAC'23), WEPA101, *in print*, 2023.
Expand Down
16 changes: 11 additions & 5 deletions Docs/source/install/hpc/adastra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,25 @@ Finally, since Adastra does not yet provide software modules for some of our dep
Compilation
-----------

Use the following :ref:`cmake commands <building-cmake>` to compile:
Use the following :ref:`cmake commands <building-cmake>` to compile the application executable:

.. code-block:: bash
cd $HOME/src/warpx
rm -rf build_adastra
cmake -S . -B build_adastra -DWarpX_COMPUTE=HIP -DWarpX_PSATD=ON -DWarpX_QED_TABLE_GEN=ON -DWarpX_PYTHON=ON -DWarpX_DIMS="1;2;RZ;3"
cmake -S . -B build_adastra -DWarpX_COMPUTE=HIP -DWarpX_PSATD=ON -DWarpX_QED_TABLE_GEN=ON -DWarpX_DIMS="1;2;RZ;3"
cmake --build build_adastra -j 16
cmake --build build_adastra -j 16 --target pip_install
**That's it!**
The WarpX application executables are now in ``$HOME/src/warpx/build_adastra/bin/`` and we installed the ``pywarpx`` Python module.
The WarpX application executables are now in ``$HOME/src/warpx/build_adastra/bin/``.
Additionally, the following commands will install WarpX as a Python module:

.. code-block:: bash
rm -rf build_adastra_py
cmake -S . -B build_adastra_py -DWarpX_COMPUTE=HIP -DWarpX_PSATD=ON -DWarpX_QED_TABLE_GEN=ON -DWarpX_APP=OFF -DWarpX_PYTHON=ON -DWarpX_DIMS="1;2;RZ;3"
cmake --build build_adastra_py -j 16 --target pip_install
Now, you can :ref:`submit Adstra compute jobs <running-cpp-adastra>` for WarpX :ref:`Python (PICMI) scripts <usage-picmi>` (:ref:`example scripts <usage-examples>`).
Or, you can use the WarpX executables to submit Adastra jobs (:ref:`example inputs <usage-examples>`).
Expand Down
Loading

0 comments on commit 73c9529

Please sign in to comment.