Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into HSdevmerge_2…
Browse files Browse the repository at this point in the history
…40807
  • Loading branch information
hklion committed Aug 7, 2024
2 parents 4005b09 + ffb16f3 commit b25467e
Show file tree
Hide file tree
Showing 330 changed files with 8,011 additions and 4,571 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
dim: [1, 2, RZ, 3]
name: clang-tidy-${{ matrix.dim }}D
runs-on: ubuntu-22.04
timeout-minutes: 120
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -43,7 +44,7 @@ jobs:
-DWarpX_DIMS="${{ matrix.dim }}" \
-DWarpX_MPI=ON \
-DWarpX_COMPUTE=OMP \
-DWarpX_PSATD=ON \
-DWarpX_FFT=ON \
-DWarpX_QED=ON \
-DWarpX_QED_TABLE_GEN=ON \
-DWarpX_OPENPMD=ON \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
-DWarpX_OPENPMD=ON \
-DWarpX_openpmd_internal=OFF \
-DWarpX_PRECISION=SINGLE \
-DWarpX_PSATD=ON \
-DWarpX_FFT=ON \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build_sp -j 4
Expand Down Expand Up @@ -115,8 +115,8 @@ jobs:
which nvcc || echo "nvcc not in PATH!"
git clone https://github.com/AMReX-Codes/amrex.git ../amrex
cd ../amrex && git checkout --detach 7ca419ebb90da60fefc01d8c1816846fff8638a5 && cd -
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_PSATD=TRUE USE_CCACHE=TRUE -j 4
cd ../amrex && git checkout --detach 20e6f2eadf0c297517588ba38973ec7c7084fa31 && cd -
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_FFT=TRUE USE_CCACHE=TRUE -j 4
ccache -s
du -hs ~/.cache/ccache
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
-DWarpX_PYTHON=OFF \
-DAMReX_CUDA_ARCH=8.0 \
-DWarpX_OPENPMD=ON \
-DWarpX_PSATD=ON \
-DWarpX_FFT=ON \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build -j 4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
-DWarpX_MPI=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=SINGLE \
-DWarpX_PSATD=ON
-DWarpX_FFT=ON
cmake --build build_sp -j 4
export WARPX_MPI=OFF
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
-DWarpX_MPI=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=DOUBLE \
-DWarpX_PSATD=ON
-DWarpX_FFT=ON
cmake --build build_2d -j 4
export WARPX_MPI=OFF
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: CCache Cache
uses: actions/cache@v4
with:
path: /Users/runner/Library/Caches/ccache
path: ~/Library/Caches/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
Expand All @@ -53,7 +53,7 @@ jobs:
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
export CCACHE_DEPEND=1
export CCACHE_SLOPPINESS=time_macros
ccache -z
source py-venv/bin/activate
Expand All @@ -76,6 +76,7 @@ jobs:
cmake --build build_sp -j 3
cmake --build build_sp --target pip_install
du -hs ~/Library/Caches/ccache
ccache -s
- name: run pywarpx
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS="1;2" \
-DWarpX_EB=OFF \
-DWarpX_PSATD=ON \
-DWarpX_FFT=ON \
-DWarpX_QED_TABLE_GEN=ON \
-DWarpX_QED_TOOLS=ON
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS="RZ;3" \
-DWarpX_EB=OFF \
-DWarpX_PSATD=ON \
-DWarpX_FFT=ON \
-DWarpX_PRECISION=SINGLE \
-DWarpX_PARTICLE_PRECISION=SINGLE \
-DWarpX_QED_TABLE_GEN=ON
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_APP=OFF \
-DWarpX_PSATD=ON \
-DWarpX_FFT=ON \
-DWarpX_PYTHON=ON \
-DWarpX_QED_TABLE_GEN=ON
cmake --build build -j 4 --target pip_install
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS="RZ;1;2;3" \
-DWarpX_PSATD=ON \
-DWarpX_FFT=ON \
-DWarpX_QED=ON \
-DWarpX_QED_TABLE_GEN=ON \
-DWarpX_OPENPMD=ON \
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Python/pywarpx/libwarpx*.so
d/
f/
o/
build/
build*/
tmp_build_dir/
test_dir
test_dir/
Expand Down
90 changes: 78 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Preamble ####################################################################
#
cmake_minimum_required(VERSION 3.20.0)
project(WarpX VERSION 24.05)
project(WarpX VERSION 24.07)

include(${WarpX_SOURCE_DIR}/cmake/WarpXFunctions.cmake)

Expand All @@ -16,6 +16,12 @@ endif()

# CMake policies ##############################################################
#
# Setting a cmake_policy to OLD is deprecated by definition and will raise a
# verbose warning
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
endif()

# AMReX 21.06+ supports CUDA_ARCHITECTURES with CMake 3.20+
# CMake 3.18+: CMAKE_CUDA_ARCHITECTURES
# https://cmake.org/cmake/help/latest/policy/CMP0104.html
Expand Down Expand Up @@ -72,7 +78,8 @@ option(WarpX_EB "Embedded boundary support" OFF)
option(WarpX_LIB "Build WarpX as a library" OFF)
option(WarpX_MPI "Multi-node support (message-passing)" ON)
option(WarpX_OPENPMD "openPMD I/O (HDF5, ADIOS)" ON)
option(WarpX_PSATD "spectral solver support" OFF)
option(WarpX_FFT "FFT-based solvers" OFF)
option(WarpX_HEFFTE "Multi-node FFT-based solvers" OFF)
option(WarpX_PYTHON "Python bindings" OFF)
option(WarpX_SENSEI "SENSEI in situ diagnostics" OFF)
option(WarpX_QED "QED support (requires PICSAR)" ON)
Expand Down Expand Up @@ -130,15 +137,28 @@ mark_as_advanced(WarpX_MPI_THREAD_MULTIPLE)

option(WarpX_amrex_internal "Download & build AMReX" ON)

if(WarpX_HEFFTE AND NOT WarpX_MPI)
message(FATAL_ERROR "WarpX_HEFFTE (${WarpX_HEFFTE}) can only be used if WarpX_MPI is ON.")
endif()

# change the default build type to Release (or RelWithDebInfo) instead of Debug
set_default_build_type("Release")

# Option to enable interprocedural optimization
# (also know as "link-time optimization" or "whole program optimization")
option(WarpX_IPO "Compile WarpX with interprocedural optimization (will take more time)" OFF)
set(_WarpX_IPO_DEFAULT OFF)
set(_WarpX_PYTHON_IPO_DEFAULT ON)
if(DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION)
set(_WarpX_IPO_DEFAULT ${CMAKE_INTERPROCEDURAL_OPTIMIZATION})
set(_WarpX_PYTHON_IPO_DEFAULT ${CMAKE_INTERPROCEDURAL_OPTIMIZATION})
endif()
option(WarpX_IPO
"Compile WarpX with interprocedural optimization (will take more time)"
${_WarpX_IPO_DEFAULT}
)
option(WarpX_PYTHON_IPO
"Compile Python bindings with interprocedural optimization (IPO) / link-time optimization (LTO)"
ON
${_WarpX_PYTHON_IPO_DEFAULT}
)

set(pyWarpX_VERSION_INFO "" CACHE STRING
Expand All @@ -149,16 +169,28 @@ if(WarpX_APP OR WarpX_PYTHON)
set(WarpX_LIB ON CACHE STRING "Build WarpX as a library" FORCE)
endif()

# deprecated options: transition phase

if(DEFINED WarpX_PSATD)
message(WARNING "CMake option WarpX_PSATD is deprecated. Use WarpX_FFT instead.\n"
"Overwriting WarpX_FFT with '${WarpX_PSATD}' because WarpX_PSATD was set.")
set(WarpX_FFT ${WarpX_PSATD} CACHE STRING "FFT-based solvers" FORCE)
endif()

# note: we could skip this if we solely build WarpX_APP, but if we build a
# shared WarpX library or a third party, like ImpactX, uses ablastr in a
# shared library (e.g., for Python bindings), then we need relocatable code.
option(ABLASTR_POSITION_INDEPENDENT_CODE
"Build ABLASTR with position independent code" ON)
mark_as_advanced(ABLASTR_POSITION_INDEPENDENT_CODE)

option(ABLASTR_FFT "compile AnyFFT wrappers" ${WarpX_PSATD})
if(WarpX_PSATD)
set(ABLASTR_FFT ON CACHE STRING "compile AnyFFT wrappers" FORCE)
option(ABLASTR_FFT "compile AnyFFT wrappers" ${WarpX_FFT})
if(WarpX_FFT)
set(ABLASTR_FFT ON CACHE STRING "FFT-based solvers" FORCE)
endif()
option(ABLASTR_HEFFTE "compile AnyFFT wrappers" ${WarpX_HEFFTE})
if(WarpX_HEFFTE)
set(ABLASTR_HEFFTE ON CACHE STRING "Multi-Node FFT-based solvers" FORCE)
endif()

# this defined the variable BUILD_TESTING which is ON by default
Expand Down Expand Up @@ -192,7 +224,7 @@ include(${WarpX_SOURCE_DIR}/cmake/dependencies/openPMD.cmake)

# PSATD
include(${WarpX_SOURCE_DIR}/cmake/dependencies/FFT.cmake)
if(WarpX_PSATD)
if(WarpX_FFT)
# BLASPP and LAPACKPP
if(RZ IN_LIST WarpX_DIMS)
find_package(blaspp CONFIG REQUIRED)
Expand All @@ -201,6 +233,23 @@ if(WarpX_PSATD)
endif()
endif()

# multi-node FFT
if(WarpX_HEFFTE)
if(WarpX_COMPUTE STREQUAL CUDA)
set(_heFFTe_COMPS CUDA)
elseif(WarpX_COMPUTE STREQUAL HIP)
set(_heFFTe_COMPS ROCM)
elseif(WarpX_COMPUTE STREQUAL SYCL)
set(_heFFTe_COMPS ONEAPI)
else() # NOACC, OMP
set(_heFFTe_COMPS FFTW) # or MKL
endif()
# note: we could also enforce GPUAWARE for CUDA and HIP, which can still be
# disabled at runtime

find_package(Heffte REQUIRED COMPONENTS ${_heFFTe_COMPS})
endif()

# Python
if(WarpX_PYTHON)
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
Expand Down Expand Up @@ -415,7 +464,7 @@ endif()

# Interprocedural optimization (IPO) / Link-Time Optimization (LTO)
if(WarpX_IPO)
enable_IPO("${_ALL_TARGETS}")
warpx_enable_IPO("${_ALL_TARGETS}")
endif()

# link dependencies
Expand Down Expand Up @@ -444,10 +493,20 @@ foreach(D IN LISTS WarpX_DIMS)
endif()
endif()

if(ABLASTR_HEFFTE)
target_link_libraries(ablastr_${SD} PUBLIC Heffte::Heffte)
endif()

if(WarpX_PYTHON)
target_link_libraries(pyWarpX_${SD} PRIVATE pybind11::module pybind11::windows_extras)
if(WarpX_PYTHON_IPO)
target_link_libraries(pyWarpX_${SD} PRIVATE pybind11::lto)
if(DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION)
warpx_enable_IPO(pyWarpX_${SD})
else()
# conditionally defined target in pybind11
# https://github.com/pybind/pybind11/blob/v2.12.0/tools/pybind11Common.cmake#L397-L403
target_link_libraries(pyWarpX_${SD} PRIVATE pybind11::lto)
endif()
endif()
endif()

Expand Down Expand Up @@ -520,14 +579,21 @@ foreach(D IN LISTS WarpX_DIMS)
endif()
endif()

if(WarpX_PSATD)
target_compile_definitions(ablastr_${SD} PUBLIC WARPX_USE_PSATD)
if(WarpX_FFT)
target_compile_definitions(ablastr_${SD} PUBLIC WARPX_USE_FFT)
endif()
if(ABLASTR_FFT)
# We need to enable FFT support in ABLASTR for PSATD solver
target_compile_definitions(ablastr_${SD} PUBLIC ABLASTR_USE_FFT)
endif()

if(WarpX_HEFFTE)
target_compile_definitions(ablastr_${SD} PUBLIC WARPX_USE_HEFFTE)
endif()
if(ABLASTR_HEFFTE)
target_compile_definitions(ablastr_${SD} PUBLIC ABLASTR_USE_HEFFTE)
endif()

if(WarpX_PYTHON AND pyWarpX_VERSION_INFO)
# for module __version__
target_compile_definitions(pyWarpX_${SD} PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion Docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2301,7 +2301,7 @@ PREDEFINED = AMREX_Linux=1 \
WARPX_DIM_XZ=1 \
WARPX_USE_GPU=1 \
WARPX_USE_OPENPMD=1 \
WARPX_USE_PSATD=1 \
WARPX_USE_FFT=1 \
WARPX_QED=1 \
WARPX_QED_TABLE_GEN=1

Expand Down
2 changes: 1 addition & 1 deletion Docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ openpmd-viewer # for checksumAPI

# PICMI API docs
# note: keep in sync with version in ../requirements.txt
picmistandard==0.28.0
picmistandard==0.29.0
# for development against an unreleased PICMI version, use:
# picmistandard @ git+https://github.com/picmi-standard/picmi.git#subdirectory=PICMI_Python

Expand Down
8 changes: 4 additions & 4 deletions Docs/source/acknowledge_us.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ Please add the following sentence to your publications, it helps contributors ke

**Plain text:**

This research used the open-source particle-in-cell code WarpX https://github.com/ECP-WarpX/WarpX, primarily funded by the US DOE Exascale Computing Project. Primary WarpX contributors are with LBNL, LLNL, CEA-LIDYL, SLAC, DESY, CERN, and TAE Technologies. We acknowledge all WarpX contributors.
This research used the open-source particle-in-cell code WarpX https://github.com/ECP-WarpX/WarpX. Primary WarpX contributors are with LBNL, LLNL, CEA-LIDYL, SLAC, DESY, CERN, and TAE Technologies. We acknowledge all WarpX contributors.

**LaTeX:**

.. code-block:: latex

\usepackage{hyperref}
This research used the open-source particle-in-cell code WarpX \url{https://github.com/ECP-WarpX/WarpX}, primarily funded by the US DOE Exascale Computing Project.
This research used the open-source particle-in-cell code WarpX \url{https://github.com/ECP-WarpX/WarpX}.
Primary WarpX contributors are with LBNL, LLNL, CEA-LIDYL, SLAC, DESY, CERN, and TAE Technologies.
We acknowledge all WarpX contributors.

Expand All @@ -55,8 +55,8 @@ If your project uses a specific algorithm or component, please consider citing t

- Sandberg R T, Lehe R, Mitchell C E, Garten M, Myers A, Qiang J, Vay J-L and Huebl A.
**Synthesizing Particle-in-Cell Simulations Through Learning and GPU Computing for Hybrid Particle Accelerator Beamlines**.
Proc. of Platform for Advanced Scientific Computing (PASC'24), *submitted*, 2024.
`preprint <http://arxiv.org/abs/2402.17248>__`
Proc. of Platform for Advanced Scientific Computing (PASC'24), *PASC24 Best Paper Award*, 2024.
`DOI:10.1145/3659914.3659937 <https://doi.org/10.1145/3659914.3659937>`__

- Sandberg R T, Lehe R, Mitchell C E, Garten M, Qiang J, Vay J-L and Huebl A.
**Hybrid Beamline Element ML-Training for Surrogates in the ImpactX Beam-Dynamics Code**.
Expand Down
9 changes: 7 additions & 2 deletions Docs/source/acknowledgements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
Funding and Acknowledgements
============================

WarpX is supported by the Exascale Computing Project (17-SC-20-SC), a collaborative effort of two U.S. Department of Energy organizations (Office of Science and the National Nuclear Security Administration) responsible for the planning and preparation of a capable exascale ecosystem, including software, applications, hardware, advanced system engineering, and early testbed platforms, in support of the nation's exascale computing imperative.
WarpX is hosted by the High Performance Computing Foundation (HPSF).
If your organization wants to help steer the evolution of the HPC software ecosystem, visit `hpsf.io <https://hpsf.io>`__ and consider joining!

WarpX is supported by the CAMPA collaboration, a project of the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research and Office of High Energy Physics, Scientific Discovery through Advanced Computing (SciDAC) program.

ABLASTR seed development is supported by the Laboratory Directed Research and Development Program of Lawrence Berkeley National Laboratory under U.S. Department of Energy Contract No. DE-AC02-05CH11231.
WarpX is supported by the KISMET project, a project of the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research and Office of Fusion Energy Science, Scientific Discovery through Advanced Computing (SciDAC) program.

CEA-LIDYL actively contributes to the co-development of WarpX.
As part of this initiative, WarpX also receives funding from the French National Research Agency (ANR - Plasm-On-Chip), the Horizon H2020 program and CEA.

WarpX was supported by the Exascale Computing Project (17-SC-20-SC), a collaborative effort of two U.S. Department of Energy organizations (Office of Science and the National Nuclear Security Administration) responsible for the planning and preparation of a capable exascale ecosystem, including software, applications, hardware, advanced system engineering, and early testbed platforms, in support of the nation's exascale computing imperative.

ABLASTR seed development was supported by the Laboratory Directed Research and Development Program of Lawrence Berkeley National Laboratory under U.S. Department of Energy Contract No. DE-AC02-05CH11231.

We acknowledge all the contributors and users of the WarpX community who participate to the code quality with valuable code improvement and important feedback.
4 changes: 2 additions & 2 deletions Docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def __init__(self, *args, **kwargs):
# built documents.
#
# The short X.Y version.
version = u'24.05'
version = u'24.07'
# The full version, including alpha/beta/rc tags.
release = u'24.05'
release = u'24.07'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Loading

0 comments on commit b25467e

Please sign in to comment.