Skip to content

Commit 2acac4f

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into simple_btd
2 parents 5d12b5b + 6e2ace5 commit 2acac4f

217 files changed

Lines changed: 2663 additions & 566 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/dependencies/install_nvhpc25-1.sh renamed to .github/workflows/dependencies/install_nvhpc25-9.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sudo apt-get install -y \
1717
echo 'deb [trusted=yes] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | \
1818
sudo tee /etc/apt/sources.list.d/nvhpc.list
1919
sudo apt-get update -y
20-
sudo apt-get install -y --no-install-recommends nvhpc-25-1
20+
sudo apt-get install -y --no-install-recommends nvhpc-25-9
2121

2222
# things should reside in /opt/nvidia/hpc_sdk now
2323

.github/workflows/macos.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,18 @@ jobs:
4444
cmake --build build --parallel 3
4545
ctest --test-dir build --verbose
4646
47-
appleclang14_py:
48-
runs-on: macos-13
47+
appleclang15_py:
48+
runs-on: macos-14
4949
if: github.event.pull_request.draft == false
5050
steps:
5151
- uses: actions/checkout@v4
5252
- name: Install
5353
env: {MACOSX_DEPLOYMENT_TARGET: 11.0}
5454
run: |
5555
set +e
56-
python3 -m pip install -U numpy pandas
56+
python -m venv env
57+
source env/bin/activate
58+
python -m pip install numpy pandas
5759
set -e
5860
- name: Build
5961
env: {CXXFLAGS: -Werror, MACOSX_DEPLOYMENT_TARGET: 11.0}
@@ -63,6 +65,7 @@ jobs:
6365
# 11.0+ for arm64/aarch64 (M1/M2) builds
6466
run: |
6567
share/openPMD/download_samples.sh build
68+
source env/bin/activate
6669
cmake -S . -B build \
6770
-DopenPMD_USE_PYTHON=ON \
6871
-DopenPMD_USE_MPI=OFF \

.github/workflows/nvidia.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
cmake --build build --parallel 2
3232
ctest --test-dir build --output-on-failure
3333
34-
tests-nvhpc25-1-nvcc:
35-
name: NVHPC@25.1
34+
tests-nvhpc25-9-nvcc:
35+
name: NVHPC@25.9
3636
runs-on: ubuntu-24.04
3737
if: github.event.pull_request.draft == false
3838
# Catch warnings:
@@ -41,11 +41,11 @@ jobs:
4141
steps:
4242
- uses: actions/checkout@v4
4343
- name: Dependencies
44-
run: .github/workflows/dependencies/install_nvhpc25-1.sh
44+
run: .github/workflows/dependencies/install_nvhpc25-9.sh
4545
- name: Build & Install
4646
run: |
4747
source /etc/profile.d/modules.sh
48-
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/25.1
48+
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/25.9
4949
5050
which nvcc || echo "nvcc not in PATH!"
5151
which nvc++ || echo "nvc++ not in PATH!"

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ repos:
6666
# clang-format v13
6767
# to run manually, use .github/workflows/clang-format/clang-format.sh
6868
- repo: https://github.com/pre-commit/mirrors-clang-format
69-
rev: v21.1.0
69+
rev: v21.1.7
7070
hooks:
7171
- id: clang-format
7272
# By default, the clang-format hook configures:
@@ -80,15 +80,15 @@ repos:
8080

8181
# Autoremoves unused Python imports
8282
- repo: https://github.com/hadialqattan/pycln
83-
rev: v2.5.0
83+
rev: v2.6.0
8484
hooks:
8585
- id: pycln
8686
name: pycln (python)
8787

8888
# Sorts Python imports according to PEP8
8989
# https://www.python.org/dev/peps/pep-0008/#imports
9090
- repo: https://github.com/pycqa/isort
91-
rev: 6.0.1
91+
rev: 7.0.0
9292
hooks:
9393
- id: isort
9494
name: isort (python)
@@ -128,7 +128,7 @@ repos:
128128

129129
# Checks the manifest for missing files (native support)
130130
- repo: https://github.com/mgedmin/check-manifest
131-
rev: "0.50"
131+
rev: "0.51"
132132
hooks:
133133
- id: check-manifest
134134
# This is a slow hook, so only run this if --hook-stage manual is passed

CMakeLists.txt

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,18 +329,21 @@ if(openPMD_HAVE_HDF5)
329329
endif()
330330
# we imply support for parallel I/O if MPI variant is ON
331331
if(openPMD_HAVE_MPI AND openPMD_HAVE_HDF5
332-
AND NOT HDF5_IS_PARALLEL # FindHDF5.cmake
333-
AND NOT HDF5_ENABLE_PARALLEL # hdf5-config.cmake
332+
AND NOT (HDF5_IS_PARALLEL # FindHDF5.cmake
333+
OR HDF5_ENABLE_PARALLEL # hdf5-config.cmake < 2.0.0
334+
OR HDF5_PROVIDES_PARALLEL) # hdf5-config.cmake >= 2.0.0
334335
)
335336
string(CONCAT openPMD_HDF5_STATUS
336337
"Found MPI but only serial version of HDF5. Either set "
337338
"openPMD_USE_MPI=OFF to disable MPI or set openPMD_USE_HDF5=OFF "
338339
"to disable HDF5 or provide a parallel install of HDF5.\n")
339340
endif()
340341
# HDF5 includes mpi.h in the public header H5public.h if parallel
341-
if(openPMD_HAVE_HDF5 AND
342-
(HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)
343-
AND NOT openPMD_HAVE_MPI)
342+
if(openPMD_HAVE_HDF5 AND NOT openPMD_HAVE_MPI
343+
AND (HDF5_IS_PARALLEL # FindHDF5.cmake
344+
OR HDF5_ENABLE_PARALLEL # hdf5-config.cmake < 2.0.0
345+
OR HDF5_PROVIDES_PARALLEL) # hdf5-config.cmake >= 2.0.0
346+
)
344347
string(CONCAT openPMD_HDF5_STATUS
345348
"Found only parallel version of HDF5 but no MPI. Either set "
346349
"openPMD_USE_MPI=ON to force using MPI or set openPMD_USE_HDF5=OFF "
@@ -544,10 +547,18 @@ endif()
544547

545548
# ADIOS2 Backend
546549
if(openPMD_HAVE_ADIOS2)
547-
if(openPMD_HAVE_MPI)
548-
target_link_libraries(openPMD PUBLIC adios2::cxx11_mpi)
550+
if(${ADIOS2_VERSION} VERSION_GREATER_EQUAL 2.11.0)
551+
if(openPMD_HAVE_MPI)
552+
target_link_libraries(openPMD PUBLIC adios2::cxx_mpi)
553+
else()
554+
target_link_libraries(openPMD PUBLIC adios2::cxx)
555+
endif()
549556
else()
550-
target_link_libraries(openPMD PUBLIC adios2::cxx11)
557+
if(openPMD_HAVE_MPI)
558+
target_link_libraries(openPMD PUBLIC adios2::cxx11_mpi)
559+
else()
560+
target_link_libraries(openPMD PUBLIC adios2::cxx11)
561+
endif()
551562
endif()
552563
endif()
553564

@@ -816,6 +827,7 @@ if(openPMD_BUILD_TESTING)
816827
test/Files_SerialIO/close_and_reopen_test.cpp
817828
test/Files_SerialIO/filebased_write_test.cpp
818829
test/Files_SerialIO/issue_1744_unique_ptrs_at_close_time.cpp
830+
test/Files_SerialIO/components_without_extent.cpp
819831
)
820832
elseif(${test_name} STREQUAL "ParallelIO" AND openPMD_HAVE_MPI)
821833
list(APPEND ${out_list}

docs/source/analysis/pandas.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ One can also combine all iterations in a single dataframe like this:
5050
# like before but with a new column "iteration" and all particles
5151
print(df)
5252
53+
Additionally, one can add additional openPMD particle species attributes, e.g.,
54+
from the `ED-PIC <https://github.com/openPMD/openPMD-standard/blob/1.1.0/EXT_ED-PIC.md#particle-records-macroparticles>`__ extension
55+
or `custom code properties <https://impactx.readthedocs.io/en/25.11/dataanalysis/dataanalysis.html#additional-beam-attributes>`__
56+
as extra dataframe columns:
57+
58+
.. code-block:: python
59+
60+
df = s.to_df("electrons", attributes=["s_ref"])
61+
62+
# like before but with a new column "s_ref"
63+
print(df)
5364
5465
.. _analysis-pandas-ascii:
5566

docs/source/details/backendconfig.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,39 @@ Using the Streaming API (i.e. ``SeriesInterface::readIteration()``) will do this
9494
Parsing eagerly might be very expensive for a Series with many iterations, but will avoid bugs by forgotten calls to ``Iteration::open()``.
9595
In complex environments, calling ``Iteration::open()`` on an already open environment does no harm (and does not incur additional runtime cost for additional ``open()`` calls).
9696

97+
By default, the library will print a warning to suggest using deferred Iteration parsing when opening a Series takes long.
98+
The timeout can be tuned by the JSON/TOML key ``hint_lazy_parsing_timeout`` (integer, seconds):
99+
if set to a positive value, the library will print periodic warnings to stderr when eager parsing of Iterations takes longer than the specified number of seconds (default: ``20``). Setting this option to ``0`` disables the warnings.
100+
101+
Environment variables may alternatively be used for options concerning deferred iteration parsing:
102+
103+
* Environment variable ``OPENPMD_DEFER_ITERATION_PARSING``: if set to a truthy value (e.g. ``1``), the Series will be opened with deferred iteration parsing as if ``{"defer_iteration_parsing": true}`` had been supplied.
104+
* Environment variable ``OPENPMD_HINT_LAZY_PARSING_TIMEOUT``: accepts integral values equivalent to the ``hint_lazy_parsing_timeout`` key.
105+
106+
Examples:
107+
108+
.. code-block:: bash
109+
110+
# enable lazy parsing via env var
111+
export OPENPMD_DEFER_ITERATION_PARSING=1
112+
113+
# disable the parsing hint/warning
114+
export OPENPMD_HINT_LAZY_PARSING_TIMEOUT=0
115+
116+
Or in a Series constructor JSON/TOML configuration:
117+
118+
.. code-block:: json
119+
120+
{
121+
"defer_iteration_parsing": true,
122+
"hint_lazy_parsing_timeout": 20
123+
}
124+
125+
As of openPMD-api 0.17.0, the parser verifies that all records within a mesh or within a particle species have consistent shapes / extents.
126+
This is used for filling in the shape for constant components that do not define it.
127+
In order to skip this check in the error case, the key ``{"verify_homogeneous_extents": false}`` may be set (alternatively ``export OPENPMD_VERIFY_HOMOGENEOUS_EXTENTS=0`` will do the same).
128+
This will help read datasets with inconsistent metadata definitions.
129+
97130
The key ``resizable`` can be passed to ``Dataset`` options.
98131
It if set to ``{"resizable": true}``, this declares that it shall be allowed to increased the ``Extent`` of a ``Dataset`` via ``resetDataset()`` at a later time, i.e., after it has been first declared (and potentially written).
99132
For HDF5, resizable Datasets come with a performance penalty.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../examples/11_particle_dataframe.py
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../examples/12_span_write.cpp

docs/source/usage/12_span_write.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../examples/12_span_write.py

0 commit comments

Comments
 (0)