Skip to content

Commit 00532a7

Browse files
ax3lfranzpoeschelgujjeanbez
authored
Release 0.14.3 backports (#1135)
* Read: time/dt also in long double (#1096) * Python: time/dt round-trip Test writing and reading time and dt on an iteration via properties. * Fix: Iteration read of long double time Support reading of `dt` and `time` attributes if they are of type `long double`. (openPMD standard: all `floatX` supported) * Executables: CXX_STANDARD/EXTENSIONS (#1102) Set `CXX_EXTENSIONS OFF` and `CXX_STANDARD_REQUIRED ON` for created executables. This mitigates issues with NVCC 11.0 and C++17 builds seen as added `-std=gnu++17` flags that lead to ``` nvcc fatal : Value 'gnu++17' is not defined for option 'std' ``` when using `nvcc` as CXX compiler directly. * Doc: More Locations -DPython_EXECUTABLE (#1104) Mention the `-DPython_EXECUTABLE` twice more in build examples. * NVCC + C++17 (#1103) * NVCC + C++17 Work-around a build issue with NVCC in C++17 builds. ``` include/openPMD/backend/Attributable.hpp(437): error #289: no instance of constructor "openPMD::Attribute::Attribute" matches the argument list argument types are: (std::__cxx11::string) detected during instantiation of "__nv_bool openPMD::AttributableInterface::setAttribute(const std::__cxx11::string &, T) [with T=std::__cxx11::string]" ``` from ``` inline bool AttributableInterface::setAttribute( std::string const & key, char const value[] ) { return this->setAttribute(key, std::string(value)); } ``` Seen with: - NVCC 11.0.2 + GCC 8.3.0 - NVCC 11.0.2 + GCC 7.5.0 * NVCC 11.0.2 C++17 work-around: Add Comment * Lazy parsing: Make findable in docs and use in openpmd-ls (#1111) * Use deferred iteration parsing in openpmd-ls * Make lazy/deferred parsing searchable * Add a way to search for usesteps key * HDF5: Document HDF5_USE_FILE_LOCKING (#1106) Document a HDF5 read work-around that we currently need on OLCF Jupyter (https://jupyter.olcf.ornl.gov), due to a mounting issue of GPFS in the Jupyter serice (OLCFHELP-3685). From the HDF5 1.10.1 Release Notes: ``` Other New Features and Enhancements =================================== Library ------- - Added a mechanism for disabling the SWMR file locking scheme. The file locking calls used in HDF5 1.10.0 (including patch1) will fail when the underlying file system does not support file locking or where locks have been disabled. To disable all file locking operations, an environment variable named HDF5_USE_FILE_LOCKING can be set to the five-character string 'FALSE'. This does not fundamentally change HDF5 library operation (aside from initial file open/create, SWMR is lock-free), but users will have to be more careful about opening files to avoid problematic access patterns (i.e.: multiple writers) that the file locking was designed to prevent. Additionally, the error message that is emitted when file lock operations set errno to ENOSYS (typical when file locking has been disabled) has been updated to describe the problem and potential resolution better. (DER, 2016/10/26, HDFFV-9918) ``` This also exists as a compilation option for HDF5 in CMake, where it defaults to ``TRUE`` by default, which is also what distributions/ package managers ship. Disabling from Bash: ```bash export HDF5_USE_FILE_LOCKING=FALSE ``` Disabling from Python: ```py import os os.environ['HDF5_USE_FILE_LOCKING'] = "FALSE" ``` * Avoid object slicing when deriving from Series class (#1107) * Make Series class final * Use private constructor to avoid object slicing * Doc: OMPI_MCA_io Control (#1114) Document OpenMPI MPI-I/O backend control. We have documented this long in #446. * openPMD.hpp: Include auxiliary StringManip (#1124) Include this, handy functions. * CXX Std: Remember <variant> Impl. (#1128) We use `<variant>` or `<mpark/variant.hpp>` in our public API interface for datatypes, depending on the C++ standard. This pull request makes sure that the same implementation is used in downstream code, even if the C++ standard is switched. This avoids ABI issues when, e.g., using a C++14 built openPMD-api in a C++17 downstream code. * Spack: No More `load -r` (#1125) The `-r` argument was removed from `spack load` and is now implied. * Fix AppVeyor: Python Executable (#1127) * GH Action: Add MSVC & ClangCL on Win * Fix AppVeyor: Python Executable * Avoid mismatching system Python and Conda Python * Conda: Fix Numpy * CMake: Skip Pipe Test Written in a too special way, we cannot assume SH is always present * Test 8b (Bench Read Parallel): Support Variable encoding, Fix Bugs (#1131) * added support to read variable encoding, plus fixed some bugs * fixed style * Update examples/8b_benchmark_read_parallel.cpp remove commented out code Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * Update examples/8b_benchmark_read_parallel.cpp Co-authored-by: Axel Huebl <[email protected]> * removed commented line * updated 8b env option Co-authored-by: Axel Huebl <[email protected]> * HDF5 I/O optimizations (#1129) * Include HDF5 optimization options * Fix code style check * Fix validations and include checks * Fix style check * Remove unecessary strict check * Update documentation with HDF5 tuning options * Update contributions * Fix Guards for H5Pset_all_coll_metadata* * MPI Guard: H5Pset_all_coll_metadata* * Remove duplicated variable Co-authored-by: Axel Huebl <[email protected]> * Include known issues section for HDF5 (#1132) * Update known issues with HDF5 and collective metadata operations * Fix rst link and tiny typo * Add targeted bugfix releases. Co-authored-by: Axel Huebl <[email protected]> * Include check for paged allocation (#1133) * Include check for paged allocation * Update ParallelHDF5IOHandler.cpp * libfabric 1.6+: Document SST Work-Arounds (#1134) * libfabric 1.6+: Document SST Work-Arounds Document work-arounds for libfabric 1.6+ on Cray systems when using data staging / streaming with ADIOS2 SST. Co-authored-by: Franz Pöschel <[email protected]> * Fix: Read Inconsistent Zero Pads (#1118) * [Draft] Fix: Read Inconsistent Zero Pads Some codes mess up the zero-padding in `fileBased` encoding, e.g., when specifying padding to 5 digits but creating >100'000 output steps. Files like those cannot yet be parsed and fell back to no padding, which fails to open the file: ``` openpmd_00000.h5 openpmd_02000.h5 openpmd_101000.h5 openpmd_01000.h5 openpmd_100000.h5 openpmd_104000.h5 ``` Error: ``` RuntimeError: [HDF5] Failed to open HDF5 file diags/diag1/openpmd_0.h5 ``` * Revert previous changes except for test Parse iteration numbers that are longer than their padding Read inconsistent zero padding * Overflow Padding: Read Test * Warn if the prefix does end in a digit * Fix: Don't let oversize numbers accidentally bump the padding * Update test * Issue warnings on misleading patterns also when writing * Minor Style Update Co-authored-by: Franz Pöschel <[email protected]> * Release: 0.14.3 Co-authored-by: Franz Pöschel <[email protected]> Co-authored-by: guj <[email protected]> Co-authored-by: Jean Luca Bez <[email protected]> Co-authored-by: Jean Luca Bez <[email protected]>
1 parent e00bede commit 00532a7

32 files changed

+771
-230
lines changed

.appveyor.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
11
environment:
22
matrix:
3-
- TARGET_ARCH: x86
4-
CONDA_PY: 36
5-
CONDA_INSTALL_LOCN: C:\\Miniconda36
6-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
7-
platform: x86
8-
SHARED: ON
9-
103
- TARGET_ARCH: x64
11-
CONDA_PY: 37
4+
CONDA_PY: 3.7
125
CONDA_INSTALL_LOCN: C:\\Miniconda37-x64
136
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
147
platform: x64
15-
SHARED: ON
8+
SHARED: OFF
169

1710
- TARGET_ARCH: x86
18-
CONDA_PY: 37
11+
CONDA_PY: 3.7
1912
CONDA_INSTALL_LOCN: C:\\Miniconda37
2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
2114
platform: x86
2215
SHARED: ON
2316

24-
- TARGET_ARCH: x64
25-
CONDA_PY: 36
26-
CONDA_INSTALL_LOCN: C:\\Miniconda36-x64
27-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
28-
platform: x64
29-
SHARED: OFF
30-
3117
configuration:
3218
# - Debug
3319
- Release
@@ -91,7 +77,6 @@ install:
9177

9278
# Add path, activate `conda` and update conda.
9379
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
94-
- cmd: conda update --yes --quiet conda
9580

9681
- cmd: set PYTHONUNBUFFERED=1
9782

@@ -101,9 +86,9 @@ install:
10186
- cmd: conda config --append channels conda-forge
10287

10388
# Configure the VM.
104-
- cmd: conda install -n root --quiet --yes numpy>=1.15 cmake hdf5
105-
# ADIOS2 build only for 64bit Windows and Python 3.6+
106-
- cmd: if "%TARGET_ARCH%"=="x64" if %CONDA_PY% GEQ 36 conda install -n root --quiet --yes adios2
89+
- cmd: conda install -n root --quiet --yes numpy cmake hdf5 python=%CONDA_PY%
90+
# ADIOS2 build only for 64bit Windows
91+
- cmd: if "%TARGET_ARCH%"=="x64" conda install -n root --quiet --yes adios2 python=%CONDA_PY%
10792

10893
before_build:
10994
- cmd: cd C:\projects\openpmd-api
@@ -121,12 +106,12 @@ before_build:
121106
# - cmd: if "%TARGET_ARCH%"=="x64" "C:\Program Files (x86)\Microsoft Visual Studio 15.9\VC\vcvarsall.bat" amd64
122107

123108
# CMake configure
124-
- cmd: cmake -G "%OPENPMD_CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_SHARED_LIBS=%SHARED% -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX="%CONDA_INSTALL_LOCN%" -DCMAKE_INSTALL_BINDIR="Library\bin" ".."
109+
- cmd: cmake -G "%OPENPMD_CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_SHARED_LIBS=%SHARED% -DBUILD_TESTING=ON -DopenPMD_USE_PYTHON=ON -DPython_EXECUTABLE="%CONDA_INSTALL_LOCN%\python.exe" -DCMAKE_INSTALL_PREFIX="%CONDA_INSTALL_LOCN%" -DCMAKE_INSTALL_BINDIR="Library\bin" ".."
125110

126111
build_script:
127-
- cmd: cmake --build . --config %CONFIGURATION%
112+
- cmd: cmake --build . --config %CONFIGURATION% -j 2
128113
- cmd: cmake --build . --config %CONFIGURATION% --target install
129114

130115
test_script:
131116
- cmd: ctest -V -C %CONFIGURATION%
132-
- cmd: python -c "import openpmd_api; print(openpmd_api.__version__); print(openpmd_api.variants)"
117+
- cmd: call %CONDA_INSTALL_LOCN%\python.exe -c "import openpmd_api; print(openpmd_api.__version__); print(openpmd_api.variants)"

.github/workflows/windows.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: 🪟 Windows
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.ref }}-${{ github.head_ref }}-windows
7+
cancel-in-progress: true
8+
9+
jobs:
10+
build_win_msvc:
11+
name: MSVC w/o MPI
12+
runs-on: windows-latest
13+
if: github.event.pull_request.draft == false
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Build & Install
17+
run: |
18+
python3.exe -m pip install --upgrade pip
19+
python3.exe -m pip install --upgrade numpy
20+
21+
pwsh "share\openPMD\download_samples.ps1" build
22+
cmake -S . -B build `
23+
-DCMAKE_BUILD_TYPE=Debug `
24+
-DopenPMD_USE_MPI=OFF
25+
cmake --build build --config Debug --parallel 2
26+
cmake --build build --config Debug --target install
27+
28+
# add before install, and fix Python path:
29+
# ctest --test-dir build -C Debug --output-on-failure
30+
31+
32+
build_win_clang:
33+
name: Clang w/o MPI
34+
runs-on: windows-2019
35+
if: github.event.pull_request.draft == false
36+
steps:
37+
- uses: actions/checkout@v2
38+
- uses: seanmiddleditch/gha-setup-ninja@master
39+
- name: Build & Install
40+
shell: cmd
41+
run: |
42+
python3.exe -m pip install --upgrade pip
43+
python3.exe -m pip install --upgrade numpy
44+
45+
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
46+
pwsh "share\openPMD\download_samples.ps1" build
47+
cmake -S . -B build ^
48+
-G "Ninja" ^
49+
-DCMAKE_C_COMPILER=clang-cl ^
50+
-DCMAKE_CXX_COMPILER=clang-cl ^
51+
-DCMAKE_BUILD_TYPE=Release ^
52+
-DopenPMD_USE_MPI=OFF
53+
cmake --build build --config Release --parallel 2
54+
cmake --build build --config Debug --target install
55+
56+
# add before install, and fix Python path:
57+
# ctest --test-dir build -C Debug --output-on-failure

.rodare.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@
108108
"name": "Schnetter, Erik",
109109
"orcid": "0000-0002-4518-9017",
110110
"type": "Other"
111+
},
112+
{
113+
"affiliation": "Lawrence Berkeley National Laboratory",
114+
"name": "Bez, Jean Luca",
115+
"orcid": "0000-0002-3915-1135",
116+
"type": "Other"
111117
}
112118
],
113119
"title": "C++ & Python API for Scientific I/O with openPMD",

CHANGELOG.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,49 @@
33
Changelog
44
=========
55

6+
0.14.2
7+
------
8+
**Date:** 2021-11-03
9+
10+
Read Bugs, C++17 Mixing and HDF5 Performance
11+
12+
This release makes reads more robust by fixing small API, file-based parsing and test bugs.
13+
Building the library in C++14 and using it in C++17 will not result in incompatible ABIs anymore.
14+
HDF5 1.10.1+ performance was improved significantly.
15+
16+
Changes to "0.14.2"
17+
^^^^^^^^^^^^^^^^^^^
18+
19+
Bug Fixes
20+
"""""""""
21+
22+
- read:
23+
24+
- allow inconsistent zero pads #1118
25+
- time/dt also in long double #1096
26+
- test 8b - bench read parallel:
27+
28+
- support variable encoding #1131
29+
- block located at top left corner was mistaken to read a block in the center #1131
30+
- CI (AppVeyor): Python executable #1127
31+
- C++17 mixing: remember ``<variant>`` implementation #1128
32+
- support NVCC + C++17 #1103
33+
- avoid object slicing when deriving from ``Series`` class #1107
34+
- executables: ``CXX_STANDARD``/``EXTENSIONS`` #1102
35+
36+
Other
37+
"""""
38+
39+
- HDF5 I/O optimizations #1129 #1132 #1133
40+
- libfabric 1.6+: Document SST Work-Arounds #1134
41+
- OpenMPI: Document ``OMPI_MCA_io`` Control #1114
42+
- HDF5: Document ``HDF5_USE_FILE_LOCKING`` #1106
43+
- Lazy parsing: Make findable in docs and use in ``openpmd-ls`` #1111
44+
- Docs: More Locations ``-DPython_EXECUTABLE`` #1104
45+
- Spack: No More ``load -r`` #1125
46+
- ``openPMD.hpp``: include auxiliary ``StringManip`` #1124
47+
48+
649
0.14.2
750
------
851
**Date:** 2021-08-17

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ contact:
2525
orcid: https://orcid.org/0000-0003-1943-7141
2626
2727
title: "openPMD-api: C++ & Python API for Scientific I/O with openPMD"
28-
version: 0.14.2
28+
version: 0.14.3
2929
repository-code: https://github.com/openPMD/openPMD-api
3030
doi: 10.14278/rodare.27
3131
license: LGPL-3.0-or-later

CMakeLists.txt

Lines changed: 57 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
cmake_minimum_required(VERSION 3.15.0)
44

5-
project(openPMD VERSION 0.14.2) # LANGUAGES CXX
5+
project(openPMD VERSION 0.14.3) # LANGUAGES CXX
66

77
# the openPMD "markup"/"schema" standard version
88
set(openPMD_STANDARD_VERSION 1.1.0)
@@ -453,26 +453,36 @@ target_include_directories(openPMD PUBLIC
453453
$<INSTALL_INTERFACE:include>
454454
)
455455

456+
# is this a C++17 compile? If yes, skip MPark.Variant
457+
try_compile(openPMD_HAS_CXX17
458+
${openPMD_BINARY_DIR}/try_variant
459+
${openPMD_SOURCE_DIR}/cmake/try_variant.cpp
460+
CXX_STANDARD_REQUIRED ON
461+
CXX_EXTENSIONS OFF
462+
)
463+
message(STATUS "<variant> supported (C++17 or newer): ${openPMD_HAS_CXX17}")
464+
456465
# C++11 std::variant (C++17 stdlib preview)
457-
# TODO not needed with C++17 compiler
458-
add_library(openPMD::thirdparty::mpark_variant INTERFACE IMPORTED)
459-
set(openPMD_PC_EXTRA_INCLUDE "")
460-
if(openPMD_USE_INTERNAL_VARIANT)
461-
target_include_directories(openPMD::thirdparty::mpark_variant SYSTEM INTERFACE
462-
$<BUILD_INTERFACE:${openPMD_SOURCE_DIR}/share/openPMD/thirdParty/variant/include>
463-
)
464-
message(STATUS "MPark.Variant: Using INTERNAL version '1.4.0'")
465-
else()
466-
find_package(mpark_variant 1.3.0 REQUIRED) # TODO: we want 1.4.1+
467-
target_link_libraries(openPMD::thirdparty::mpark_variant
468-
INTERFACE mpark_variant)
469-
get_target_property(EXTERNAL_MPARK_INCLUDE mpark_variant INTERFACE_INCLUDE_DIRECTORIES)
470-
if(openPMD_HAVE_PKGCONFIG AND EXTERNAL_MPARK_INCLUDE)
471-
set(openPMD_PC_EXTRA_INCLUDE "-I${EXTERNAL_MPARK_INCLUDE}")
466+
if(NOT openPMD_HAS_CXX17)
467+
add_library(openPMD::thirdparty::mpark_variant INTERFACE IMPORTED)
468+
set(openPMD_PC_EXTRA_INCLUDE "")
469+
if(openPMD_USE_INTERNAL_VARIANT)
470+
target_include_directories(openPMD::thirdparty::mpark_variant SYSTEM INTERFACE
471+
$<BUILD_INTERFACE:${openPMD_SOURCE_DIR}/share/openPMD/thirdParty/variant/include>
472+
)
473+
message(STATUS "MPark.Variant: Using INTERNAL version '1.4.0'")
474+
else()
475+
find_package(mpark_variant 1.3.0 REQUIRED) # TODO: we want 1.4.1+
476+
target_link_libraries(openPMD::thirdparty::mpark_variant
477+
INTERFACE mpark_variant)
478+
get_target_property(EXTERNAL_MPARK_INCLUDE mpark_variant INTERFACE_INCLUDE_DIRECTORIES)
479+
if(openPMD_HAVE_PKGCONFIG AND EXTERNAL_MPARK_INCLUDE)
480+
set(openPMD_PC_EXTRA_INCLUDE "-I${EXTERNAL_MPARK_INCLUDE}")
481+
endif()
482+
message(STATUS "MPark.Variant: Found version '${mpark_variant_VERSION}'")
472483
endif()
473-
message(STATUS "MPark.Variant: Found version '${mpark_variant_VERSION}'")
484+
target_link_libraries(openPMD PUBLIC openPMD::thirdparty::mpark_variant)
474485
endif()
475-
target_link_libraries(openPMD PUBLIC openPMD::thirdparty::mpark_variant)
476486

477487
# Catch2 for unit tests
478488
if(openPMD_BUILD_TESTING)
@@ -518,8 +528,10 @@ if(openPMD_HAVE_ADIOS1)
518528
)
519529
target_compile_options(openPMD.ADIOS1.Serial PUBLIC ${_msvc_options})
520530
target_compile_options(openPMD.ADIOS1.Parallel PUBLIC ${_msvc_options})
521-
target_link_libraries(openPMD.ADIOS1.Serial PUBLIC openPMD::thirdparty::mpark_variant)
522-
target_link_libraries(openPMD.ADIOS1.Parallel PUBLIC openPMD::thirdparty::mpark_variant)
531+
if(NOT openPMD_HAS_CXX17)
532+
target_link_libraries(openPMD.ADIOS1.Serial PUBLIC openPMD::thirdparty::mpark_variant)
533+
target_link_libraries(openPMD.ADIOS1.Parallel PUBLIC openPMD::thirdparty::mpark_variant)
534+
endif()
523535

524536
target_include_directories(openPMD.ADIOS1.Serial PRIVATE
525537
${openPMD_SOURCE_DIR}/include ${openPMD_BINARY_DIR}/include)
@@ -811,13 +823,22 @@ if(openPMD_BUILD_TESTING)
811823
else()
812824
target_link_libraries(${testname}Tests PRIVATE CatchMain)
813825
endif()
826+
827+
set_target_properties(${testname}Tests PROPERTIES
828+
CXX_EXTENSIONS OFF
829+
CXX_STANDARD_REQUIRED ON
830+
)
814831
endforeach()
815832
endif()
816833

817834
if(openPMD_BUILD_CLI_TOOLS)
818835
foreach(toolname ${openPMD_CLI_TOOL_NAMES})
819836
add_executable(openpmd-${toolname} src/cli/${toolname}.cpp)
820837
target_link_libraries(openpmd-${toolname} PRIVATE openPMD)
838+
set_target_properties(openpmd-${toolname} PROPERTIES
839+
CXX_EXTENSIONS OFF
840+
CXX_STANDARD_REQUIRED ON
841+
)
821842
endforeach()
822843
endif()
823844

@@ -827,10 +848,18 @@ if(openPMD_BUILD_EXAMPLES)
827848
if(openPMD_HAVE_MPI)
828849
add_executable(${examplename} examples/${examplename}.cpp)
829850
target_link_libraries(${examplename} PRIVATE openPMD)
851+
set_target_properties(${examplename} PROPERTIES
852+
CXX_EXTENSIONS OFF
853+
CXX_STANDARD_REQUIRED ON
854+
)
830855
endif()
831856
else()
832857
add_executable(${examplename} examples/${examplename}.cpp)
833858
target_link_libraries(${examplename} PRIVATE openPMD)
859+
set_target_properties(${examplename} PROPERTIES
860+
CXX_EXTENSIONS OFF
861+
CXX_STANDARD_REQUIRED ON
862+
)
834863
endif()
835864
endforeach()
836865
endif()
@@ -983,7 +1012,7 @@ if(openPMD_INSTALL)
9831012
)
9841013
# install third-party libraries
9851014
# TODO not needed with C++17 compiler
986-
if(openPMD_USE_INTERNAL_VARIANT)
1015+
if(NOT openPMD_HAS_CXX17 AND openPMD_USE_INTERNAL_VARIANT)
9871016
install(DIRECTORY "${openPMD_SOURCE_DIR}/share/openPMD/thirdParty/variant/include/mpark"
9881017
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
9891018
)
@@ -1216,7 +1245,8 @@ if(openPMD_BUILD_TESTING)
12161245
endforeach()
12171246

12181247
# openpmd-pipe (python) test
1219-
if( openPMD_HAVE_HDF5
1248+
if( NOT WIN32
1249+
AND openPMD_HAVE_HDF5
12201250
AND (openPMD_HAVE_ADIOS2 OR openPMD_HAVE_ADIOS1)
12211251
AND EXAMPLE_DATA_FOUND
12221252
)
@@ -1345,7 +1375,11 @@ if(openPMD_INSTALL)
13451375
endif()
13461376
message("")
13471377
message(" Additionally, install following third party libraries:")
1348-
message(" MPark.Variant: ${openPMD_USE_INTERNAL_VARIANT}")
1378+
if(openPMD_HAS_CXX17)
1379+
message(" MPark.Variant: OFF")
1380+
else()
1381+
message(" MPark.Variant: ${openPMD_USE_INTERNAL_VARIANT}")
1382+
endif()
13491383
else()
13501384
message(" Installation: OFF")
13511385
endif()

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Choose *one* of the install methods below to get started:
148148
```bash
149149
# optional: +python +adios1 -adios2 -hdf5 -mpi
150150
spack install openpmd-api
151-
spack load -r openpmd-api
151+
spack load openpmd-api
152152
```
153153

154154
### [Conda](https://conda.io)
@@ -232,7 +232,7 @@ cd openPMD-api-build
232232
# for options append:
233233
# -DopenPMD_USE_...=...
234234
# e.g. for python support add:
235-
# -DopenPMD_USE_PYTHON=ON
235+
# -DopenPMD_USE_PYTHON=ON -DPython_EXECUTABLE=$(which python3)
236236
cmake ../openPMD-api
237237

238238
cmake --build .
@@ -412,6 +412,8 @@ Further thanks go to improvements and contributions from:
412412
Dask guidance & reviews
413413
* [Erik Schnetter (PITP)](https://github.com/eschnett):
414414
C++ API bug fixes
415+
* [Jean Luca Bez (LBNL)](https://github.com/jeanbez):
416+
HDF5 performance tuning
415417

416418
### Grants
417419

0 commit comments

Comments
 (0)