Building openPMD-api now requires a compiler that supports C++14 or newer. Supported Python version are now 3.6 to 3.9.
CMake 3.12.0 is now the minimally supported version for CMake. ADIOS 2.6.0 is now the minimally supported version for ADIOS2 support.
The already existing read-only properties unit_dimension
, unit_SI
, and time_offset
are now declared as read-write properties.
set_unit_dimension
, set_unit_SI
, and set_time_offset
are now deprecated and will be removed in future versions of the library.
Access_Type
is now called Access
.
Using it by the old name is deprecated and will be removed in future versions of the library.
AccessType
is now called Access
.
Using it by the old name is deprecated and will be removed in future versions of the library.
ADIOS2 is now the default backend for .bp
files.
As soon as the ADIOS2 backend is enabled it will take precedence over a potentially also enabled ADIOS1 backend.
In order to prefer the legacy ADIOS1 backend in such a situation, set an environment variable: export OPENPMD_BP_BACKEND="ADIOS1"
.
Support for ADIOS1 is now deprecated.
Independent MPI-I/O is now the default in parallel HDF5.
For the old default, collective parallel I/O, set the environment variable export OPENPMD_HDF5_INDEPENDENT="OFF"
.
Collective parallel I/O makes more functionality, such as storeChunk
and loadChunk
, MPI-collective.
HDF5 attribute writes are MPI-collective in either case, due to HDF5 restrictions.
Our Spack packages build the ADIOS2 backend now by default.
Pass -adios2
to the Spack spec to disable it: spack install openpmd-api -adios2
(same for spack load -r
).
The Series::setSoftwareVersion
method is now deprecated and will be removed in future versions of the library.
Use Series::setSoftware(name, version)
instead.
Similarly for the Python API, use Series.set_software
instead of Series.set_software_version
.
The automated example-download scripts have been moved from .travis/download_samples.sh
(and .ps1
) to share/openPMD/
.
We added preliminary support for ADIOS2 in this release.
As long as also the ADIOS1 backend is enabled it will take precedence for .bp
files over the newer ADIOS2 backend.
In order to enforce using the new ADIOS2 backend in such a situation, set an environment variable: export OPENPMD_BP_BACKEND="ADIOS2"
.
We will change this default in upcoming releases to prefer ADIOS2.
The JSON backend is now always enabled.
The CMake option -DopenPMD_USE_JSON
has been removed (as it is always ON
now).
Previously, omitting a file ending in the Series
constructor chose a "dummy" no-operation file backend.
This was confusing and instead a runtime error is now thrown.
We are now building a shared library by default.
In order to keep build the old default, a static library, append -DBUILD_SHARED_LIBS=OFF
to the cmake
command.
Our module name has changed to be consistent with other openPMD projects:
# old name
import openPMD
# new name
import openpmd_api
The order of arguments in the store_chunk
method for record components has changed.
The new order allows to make use of defaults in many cases in order reduce complexity.
particlePos_x = np.random.rand(234).astype(np.float32)
d = Dataset(particlePos_x.dtype, extent=particlePos_x.shape)
electrons["position"]["x"].reset_dataset(d)
# old code
electrons["position"]["x"].store_chunk([0, ], particlePos_x.shape, particlePos_x)
# new code
electrons["position"]["x"].store_chunk(particlePos_x)
# implied defaults:
# .store_chunk(particlePos_x,
# offset=[0, ],
# extent=particlePos_x.shape)
The loadChunk<T>
method with on-the-fly allocation has default arguments for offset and extent now.
Called without arguments, it will read the whole record component.
E_x = series.iterations[100].meshes["E"]["x"]
# old code
all_data = E_x.load_chunk(np.zeros(E_x.shape), E_x.shape)
# new code
all_data = E_x.load_chunk()
series.flush()
The order of arguments in the storeChunk
method for record components has changed.
The new order allows to make use of defaults in many cases in order reduce complexity.
std::vector< float > particlePos_x(234, 1.234);
Datatype datatype = determineDatatype(shareRaw(particlePos_x));
Extent extent = {particlePos_x.size()};
Dataset d = Dataset(datatype, extent);
electrons["position"]["x"].resetDataset(d);
// old code
electrons["position"]["x"].storeChunk({0}, extent, shareRaw(particlePos_x));
// new code
electrons["position"]["x"].storeChunk(particlePos_x);
/* implied defaults:
* .storeChunk(shareRaw(particlePos_x),
* {0},
* {particlePos_x.size()}) */
The order of arguments in the pre-allocated data overload of the loadChunk
method for record components has changed.
The new order allows was introduced for consistency with storeChunk
.
float loadOnePos;
// old code
electrons["position"]["x"].loadChunk({0}, {1}, shareRaw(&loadOnePos));
// new code
electrons["position"]["x"].loadChunk(shareRaw(&loadOnePos), {0}, {1});
series.flush();
The loadChunk<T>
method with on-the-fly allocation got default arguments for offset and extent.
Called without arguments, it will read the whole record component.
MeshRecordComponent E_x = series.iterations[100].meshes["E"]["x"];
// old code
auto all_data = E_x.loadChunk<double>({0, 0, 0}, E_x.getExtent());
// new code
auto all_data = E_x.loadChunk<double>();
series.flush();