Skip to content

Commit aa1be99

Browse files
committed
Merge 'ECP-WarpX:development' into 'EZoni:ci_upgrade_ubuntu'
2 parents dd2fe9b + 0bb3c26 commit aa1be99

38 files changed

+103
-87
lines changed

.azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
python3 -m pip install --upgrade pip
8181
python3 -m pip install --upgrade build
8282
python3 -m pip install --upgrade packaging
83-
python3 -m pip install --upgrade setuptools
83+
python3 -m pip install --upgrade setuptools[core]
8484
python3 -m pip install --upgrade wheel
8585
python3 -m pip install --upgrade virtualenv
8686
python3 -m pip install --upgrade pipx

.github/workflows/cuda.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
cmake --build build_sp -j 4
8585
8686
python3 -m pip install --upgrade pip
87-
python3 -m pip install --upgrade build packaging setuptools wheel
87+
python3 -m pip install --upgrade build packaging setuptools[core] wheel
8888
export WARPX_MPI=ON
8989
export PYWARPX_LIB_DIR=$PWD/build_sp/lib/site-packages/pywarpx/
9090
python3 -m pip wheel .
@@ -187,7 +187,7 @@ jobs:
187187
#export CFLAGS="-noswitcherror"
188188
189189
#python3 -m pip install --upgrade pip
190-
#python3 -m pip install --upgrade build packaging setuptools wheel
190+
#python3 -m pip install --upgrade build packaging setuptools[core] wheel
191191
#export WARPX_MPI=ON
192192
#export PYWARPX_LIB_DIR=$PWD/build/lib/site-packages/pywarpx/
193193
#python3 -m pip wheel .

.github/workflows/intel.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
export CC=$(which icx)
5656
5757
python3 -m pip install --upgrade pip
58-
python3 -m pip install --upgrade build packaging setuptools wheel
58+
python3 -m pip install --upgrade build packaging setuptools[core] wheel
5959
6060
cmake -S . -B build_sp \
6161
-DCMAKE_CXX_FLAGS_RELEASE="-O1 -DNDEBUG" \
@@ -138,6 +138,6 @@ jobs:
138138
139139
# Skip this as it will copy the binary artifacts and we are tight on disk space
140140
# python3 -m pip install --upgrade pip
141-
# python3 -m pip install --upgrade build packaging setuptools wheel
141+
# python3 -m pip install --upgrade build packaging setuptools[core] wheel
142142
# PYWARPX_LIB_DIR=$PWD/build_sp/lib/site-packages/pywarpx/ python3 -m pip wheel .
143143
# python3 -m pip install *.whl

.github/workflows/macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: install pip dependencies
4848
run: |
4949
python3 -m pip install --upgrade pip
50-
python3 -m pip install --upgrade build packaging setuptools wheel
50+
python3 -m pip install --upgrade build packaging setuptools[core] wheel
5151
python3 -m pip install --upgrade mpi4py
5252
python3 -m pip install --upgrade -r Regression/requirements.txt
5353
- name: CCache Cache

.github/workflows/ubuntu.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ jobs:
211211
ccache -z
212212
213213
python3 -m pip install --upgrade pip
214-
python3 -m pip install --upgrade build packaging setuptools wheel
214+
python3 -m pip install --upgrade build packaging setuptools[core] wheel
215215
216216
export CXXFLAGS="-Werror -Wno-error=pass-failed"
217217

.github/workflows/windows.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
5353
python3 -m pip install --upgrade pip
5454
if(!$?) { Exit $LASTEXITCODE }
55-
python3 -m pip install --upgrade build packaging setuptools wheel
55+
python3 -m pip install --upgrade build packaging setuptools[core] wheel
5656
if(!$?) { Exit $LASTEXITCODE }
5757
cmake --build build --config Debug --target install
5858
if(!$?) { Exit $LASTEXITCODE }
@@ -113,7 +113,7 @@ jobs:
113113
114114
python3 -m pip install --upgrade pip
115115
if errorlevel 1 exit 1
116-
python3 -m pip install --upgrade build packaging setuptools wheel
116+
python3 -m pip install --upgrade build packaging setuptools[core] wheel
117117
if errorlevel 1 exit 1
118118
python3 -m pip install --upgrade -r requirements.txt
119119
if errorlevel 1 exit 1

Docs/source/acknowledgements.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Funding and Acknowledgements
44
============================
55

6-
WarpX is hosted by the High Performance Computing Foundation (HPSF).
6+
WarpX is hosted by the High Performance Software Foundation (HPSF).
77
If your organization wants to help steer the evolution of the HPC software ecosystem, visit `hpsf.io <https://hpsf.io>`__ and consider joining!
88

99
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.

Docs/source/install/cmake.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ PICMI Python Bindings
222222
.. code-block:: bash
223223
224224
python3 -m pip install -U pip
225-
python3 -m pip install -U build packaging setuptools wheel
225+
python3 -m pip install -U build packaging setuptools[core] wheel
226226
python3 -m pip install -U cmake
227227
python3 -m pip install -r requirements.txt
228228

Docs/source/install/hpc/lawrencium.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Optionally, download and install Python packages for :ref:`PICMI <usage-picmi>`
8383
python3 -m pip install --upgrade build
8484
python3 -m pip install --upgrade packaging
8585
python3 -m pip install --upgrade wheel
86-
python3 -m pip install --upgrade setuptools
86+
python3 -m pip install --upgrade setuptools[core]
8787
python3 -m pip install --upgrade cython
8888
python3 -m pip install --upgrade numpy
8989
python3 -m pip install --upgrade pandas

Docs/source/install/hpc/lxplus.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Now, ensure Python tooling is up-to-date:
148148
.. code-block:: bash
149149
150150
python3 -m pip install -U pip
151-
python3 -m pip install -U build packaging setuptools wheel
151+
python3 -m pip install -U build packaging setuptools[core] wheel
152152
python3 -m pip install -U cmake
153153
154154
Then we compile WarpX as in the previous section (with or without CUDA) adding ``-DWarpX_PYTHON=ON`` and then we install it into our Python:

Docs/source/install/users.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Given that you have the :ref:`WarpX dependencies <install-dependencies>` install
109109
.. code-block:: bash
110110
111111
python3 -m pip install -U pip
112-
python3 -m pip install -U build packaging setuptools wheel
112+
python3 -m pip install -U build packaging setuptools[core] wheel
113113
python3 -m pip install -U cmake
114114
115115
python3 -m pip wheel -v git+https://github.com/ECP-WarpX/WarpX.git

Docs/source/usage/parameters.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -2813,14 +2813,14 @@ In-situ capabilities can be used by turning on Sensei or Ascent (provided they a
28132813

28142814
* ``<diag_name>.openpmd_backend`` (``bp5``, ``bp4``, ``h5`` or ``json``) optional, only used if ``<diag_name>.format = openpmd``
28152815
`I/O backend <https://openpmd-api.readthedocs.io/en/latest/backends/overview.html>`_ for `openPMD <https://www.openPMD.org>`_ data dumps.
2816-
``bp`` is the `ADIOS I/O library <https://csmd.ornl.gov/adios>`_, ``h5`` is the `HDF5 format <https://www.hdfgroup.org/solutions/hdf5/>`_, and ``json`` is a `simple text format <https://en.wikipedia.org/wiki/JSON>`_.
2817-
``json`` only works with serial/single-rank jobs.
2816+
``bp5``/``bp4`` is the `ADIOS I/O library <https://csmd.ornl.gov/adios>`_, ``h5`` is the `HDF5 format <https://www.hdfgroup.org/solutions/hdf5/>`_, and ``json`` is a `simple text format <https://en.wikipedia.org/wiki/JSON>`_.
2817+
``json`` is for debugging and only works with serial/single-rank jobs.
28182818
When WarpX is compiled with openPMD support, the first available backend in the order given above is taken.
28192819

28202820
* ``<diag_name>.openpmd_encoding`` (optional, ``v`` (variable based), ``f`` (file based) or ``g`` (group based) ) only read if ``<diag_name>.format = openpmd``.
28212821
openPMD `file output encoding <https://openpmd-api.readthedocs.io/en/0.16.1/usage/concepts.html#iteration-and-series>`__.
28222822
File based: one file per timestep (slower), group/variable based: one file for all steps (faster)).
2823-
``variable based`` is an `experimental feature with ADIOS2 <https://openpmd-api.readthedocs.io/en/0.16.1/backends/adios2.html#experimental-new-adios2-schema>`__ and not supported for back-transformed diagnostics.
2823+
``variable based`` is an `experimental feature with ADIOS2 BP5 <https://openpmd-api.readthedocs.io/en/0.16.1/backends/adios2.html#experimental-new-adios2-schema>`__ that will replace ``g``.
28242824
Default: ``f`` (full diagnostics)
28252825

28262826
* ``<diag_name>.adios2_operator.type`` (``zfp``, ``blosc``) optional,
@@ -2854,7 +2854,7 @@ In-situ capabilities can be used by turning on Sensei or Ascent (provided they a
28542854
<diag_name>.openpmd_backend = bp5
28552855
<diag_name>.adios2_engine.parameters.FlattenSteps = on
28562856
2857-
* ``<diag_name>.adios2_engine.type`` (``bp4``, ``sst``, ``ssc``, ``dataman``) optional,
2857+
* ``<diag_name>.adios2_engine.type`` (``bp5``, ``bp4``, ``sst``, ``ssc``, ``dataman``) optional,
28582858
`ADIOS2 Engine type <https://openpmd-api.readthedocs.io/en/0.16.1/details/backendconfig.html#adios2>`__ for `openPMD <https://www.openPMD.org>`_ data dumps.
28592859
See full list of engines at `ADIOS2 readthedocs <https://adios2.readthedocs.io/en/latest/engines/engines.html>`__
28602860

Docs/source/usage/workflows/ml_materials/run_warpx_training.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def get_laser(antenna_z, profile_t_peak, fill_in=True):
274274
data_list=diag_particle_list,
275275
write_dir="lab_particle_diags",
276276
warpx_format="openpmd",
277-
warpx_openpmd_backend="bp",
277+
warpx_openpmd_backend="bp5",
278278
)
279279

280280
btd_field_diag = picmi.LabFrameFieldDiagnostic(
@@ -287,7 +287,7 @@ def get_laser(antenna_z, profile_t_peak, fill_in=True):
287287
warpx_upper_bound=[128.0e-6, 0.0e-6, 0.0],
288288
write_dir="lab_field_diags",
289289
warpx_format="openpmd",
290-
warpx_openpmd_backend="bp",
290+
warpx_openpmd_backend="bp5",
291291
)
292292

293293
field_diag = picmi.FieldDiagnostic(

Source/Diagnostics/FlushFormats/FlushFormatOpenPMD.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ FlushFormatOpenPMD::FlushFormatOpenPMD (const std::string& diag_name)
4646
encoding = openPMD::IterationEncoding::fileBased;
4747
}
4848

49+
// BP5 does not support groupBased (metadata explosion)
50+
if ((openpmd_backend == "bp5" || openpmd_backend == "bp") &&
51+
(encoding == openPMD::IterationEncoding::groupBased))
52+
{
53+
throw std::runtime_error("BeamMonitor: groupBased encoding not supported for BP5.");
54+
}
55+
4956
std::string diag_type_str;
5057
pp_diag_name.get("diag_type", diag_type_str);
5158
if (diag_type_str == "BackTransformed")

Source/Diagnostics/OpenPMDHelpFunction.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ WarpXOpenPMDFileType ()
1717
std::string openPMDFileType;
1818
#ifdef WARPX_USE_OPENPMD
1919
#if openPMD_HAVE_ADIOS2==1
20-
openPMDFileType = "bp";
20+
openPMDFileType = "bp5";
2121
#elif openPMD_HAVE_ADIOS1==1
22-
openPMDFileType = "bp";
22+
openPMDFileType = "bp"; // bp3
2323
#elif openPMD_HAVE_HDF5==1
2424
openPMDFileType = "h5";
2525
#else

Source/Diagnostics/WarpXOpenPMD.H

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public:
8282
/** Initialize openPMD I/O routines
8383
*
8484
* @param ie iteration encoding from openPMD: "group, file, variable"
85-
* @param filetype file backend, e.g. "bp" or "h5"
85+
* @param filetype file backend, e.g. "bp5", "bp4", or "h5"
8686
* @param operator_type openPMD-api backend operator (compressor) for ADIOS2
8787
* @param operator_parameters openPMD-api backend operator parameters for ADIOS2
8888
* @param engine_type ADIOS engine for output
@@ -149,7 +149,7 @@ public:
149149
bool isBTD = false,
150150
const amrex::Geometry& full_BTD_snapshot=amrex::Geometry() ) const;
151151

152-
/** Return OpenPMD File type ("bp" or "h5" or "json")*/
152+
/** Return OpenPMD File type ("bp5", "bp4", "h5" or "json")*/
153153
std::string OpenPMDFileType () { return m_OpenPMDFileType; }
154154

155155
private:
@@ -350,7 +350,7 @@ private:
350350
int m_MPISize = 1;
351351

352352
openPMD::IterationEncoding m_Encoding = openPMD::IterationEncoding::fileBased;
353-
std::string m_OpenPMDFileType = "bp"; //! MPI-parallel openPMD backend: bp or h5
353+
std::string m_OpenPMDFileType = "bp5"; //! MPI-parallel openPMD backend: bp5, bp4 or h5
354354
std::string m_OpenPMDoptions = "{}"; //! JSON option string for openPMD::Series constructor
355355
int m_CurrentStep = -1;
356356

Source/FieldSolver/WarpXPushFieldsEM.cpp

+42-30
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,44 @@ namespace {
100100
solver.BackwardTransform(lev, *vector_field[2], compz, fill_guards);
101101
#endif
102102
}
103+
104+
/**
105+
* \brief Correct current in Fourier space so that the continuity equation is satisfied
106+
*/
107+
template <typename SpectralSolverType>
108+
void PSATDCurrentCorrection (
109+
const int finest_level,
110+
amrex::Vector<std::unique_ptr<SpectralSolverType>>& spectral_solver_fp,
111+
amrex::Vector<std::unique_ptr<SpectralSolverType>>& spectral_solver_cp)
112+
{
113+
for (int lev = 0; lev <= finest_level; ++lev)
114+
{
115+
spectral_solver_fp[lev]->CurrentCorrection();
116+
if (spectral_solver_cp[lev])
117+
{
118+
spectral_solver_cp[lev]->CurrentCorrection();
119+
}
120+
}
121+
}
122+
123+
/**
124+
* \brief Vay deposition in Fourier space (https://doi.org/10.1016/j.jcp.2013.03.010)
125+
*/
126+
template <typename SpectralSolverType>
127+
void PSATDVayDeposition (
128+
const int finest_level,
129+
amrex::Vector<std::unique_ptr<SpectralSolverType>>& spectral_solver_fp,
130+
amrex::Vector<std::unique_ptr<SpectralSolverType>>& spectral_solver_cp)
131+
{
132+
for (int lev = 0; lev <= finest_level; ++lev)
133+
{
134+
spectral_solver_fp[lev]->VayDeposition();
135+
if (spectral_solver_cp[lev])
136+
{
137+
spectral_solver_cp[lev]->VayDeposition();
138+
}
139+
}
140+
}
103141
}
104142

105143
void WarpX::PSATDForwardTransformEB ()
@@ -466,32 +504,6 @@ void WarpX::PSATDForwardTransformRho (
466504
#endif
467505
}
468506

469-
void WarpX::PSATDCurrentCorrection ()
470-
{
471-
for (int lev = 0; lev <= finest_level; ++lev)
472-
{
473-
spectral_solver_fp[lev]->CurrentCorrection();
474-
475-
if (spectral_solver_cp[lev])
476-
{
477-
spectral_solver_cp[lev]->CurrentCorrection();
478-
}
479-
}
480-
}
481-
482-
void WarpX::PSATDVayDeposition ()
483-
{
484-
for (int lev = 0; lev <= finest_level; ++lev)
485-
{
486-
spectral_solver_fp[lev]->VayDeposition();
487-
488-
if (spectral_solver_cp[lev])
489-
{
490-
spectral_solver_cp[lev]->VayDeposition();
491-
}
492-
}
493-
}
494-
495507
void WarpX::PSATDSubtractCurrentPartialSumsAvg ()
496508
{
497509
using ablastr::fields::Direction;
@@ -744,7 +756,7 @@ WarpX::PushPSATD (amrex::Real start_time)
744756
PSATDForwardTransformRho(rho_fp_string, rho_cp_string, 1, rho_new);
745757

746758
// Correct J in k-space
747-
PSATDCurrentCorrection();
759+
::PSATDCurrentCorrection(finest_level, spectral_solver_fp, spectral_solver_cp);
748760

749761
// Inverse FFT of J
750762
PSATDBackwardTransformJ(current_fp_string, current_cp_string);
@@ -759,7 +771,7 @@ WarpX::PushPSATD (amrex::Real start_time)
759771
PSATDForwardTransformRho(rho_fp_string, rho_cp_string, 1, rho_new);
760772

761773
// Compute J from D in k-space
762-
PSATDVayDeposition();
774+
::PSATDVayDeposition(finest_level, spectral_solver_fp, spectral_solver_cp);
763775

764776
// Inverse FFT of J, subtract cumulative sums of D
765777
current_fp_string = "current_fp";
@@ -797,7 +809,7 @@ WarpX::PushPSATD (amrex::Real start_time)
797809
#endif
798810

799811
// Correct J in k-space
800-
PSATDCurrentCorrection();
812+
::PSATDCurrentCorrection(finest_level, spectral_solver_fp, spectral_solver_cp);
801813

802814
// Inverse FFT of J
803815
PSATDBackwardTransformJ(current_fp_string, current_cp_string);
@@ -813,7 +825,7 @@ WarpX::PushPSATD (amrex::Real start_time)
813825
PSATDForwardTransformJ(current_fp_string, current_cp_string);
814826

815827
// Compute J from D in k-space
816-
PSATDVayDeposition();
828+
::PSATDVayDeposition(finest_level, spectral_solver_fp, spectral_solver_cp);
817829

818830
// Inverse FFT of J, subtract cumulative sums of D
819831
current_fp_string = "current_fp";

Source/WarpX.H

-10
Original file line numberDiff line numberDiff line change
@@ -1655,16 +1655,6 @@ private:
16551655
*/
16561656
void PSATDBackwardTransformG ();
16571657

1658-
/**
1659-
* \brief Correct current in Fourier space so that the continuity equation is satisfied
1660-
*/
1661-
void PSATDCurrentCorrection ();
1662-
1663-
/**
1664-
* \brief Vay deposition in Fourier space (https://doi.org/10.1016/j.jcp.2013.03.010)
1665-
*/
1666-
void PSATDVayDeposition ();
1667-
16681658
/**
16691659
* \brief Update all necessary fields in spectral space
16701660
*/

Source/ablastr/utils/UsedInputsFile.H

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ namespace ablastr::utils
1919
* Only the AMReX IOProcessor writes.
2020
*
2121
* @param filename the name of the text file to write
22+
* @param verbose print information about the file location to stdout
2223
*/
2324
void
24-
write_used_inputs_file (std::string const & filename);
25+
write_used_inputs_file (std::string const & filename, bool verbose=true);
2526
}
2627

2728
#endif // ABLASTR_USED_INPUTS_FILE_H

Source/ablastr/utils/UsedInputsFile.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@
1111
#include <AMReX_ParmParse.H>
1212
#include <AMReX_Print.H>
1313

14-
#include <ios>
14+
#include <ostream>
1515
#include <string>
1616

1717

1818
void
19-
ablastr::utils::write_used_inputs_file (std::string const & filename)
19+
ablastr::utils::write_used_inputs_file (std::string const & filename, bool verbose)
2020
{
21-
amrex::Print() << "For full input parameters, see the file: " << filename << "\n\n";
21+
if (filename.empty() || filename == "/dev/null") {
22+
return;
23+
}
24+
25+
if (verbose) {
26+
amrex::Print() << "For full input parameters, see the file: " << filename << "\n\n";
27+
}
2228

2329
if (amrex::ParallelDescriptor::IOProcessor()) {
2430
std::ofstream jobInfoFile;

Tools/machines/adastra-cines/install_dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ python3 -m pip install --upgrade pip
104104
python3 -m pip install --upgrade build
105105
python3 -m pip install --upgrade packaging
106106
python3 -m pip install --upgrade wheel
107-
python3 -m pip install --upgrade setuptools
107+
python3 -m pip install --upgrade setuptools[core]
108108
python3 -m pip install --upgrade cython
109109
python3 -m pip install --upgrade numpy
110110
python3 -m pip install --upgrade pandas

0 commit comments

Comments
 (0)