ComputationalRadiationPhysics / libSplash

libSplash - Simple Parallel file output Library for Accumulating Simulation data using Hdf5
GNU Lesser General Public License v3.0
15 stars 15 forks source link

openPMD: Implement High-Level C++ Interfaces #163

Closed ax3l closed 5 years ago

ax3l commented 9 years ago

https://github.com/ComputationalRadiationPhysics/openPMD

Use the internal file format update to change some minor conventions and to add some more group attributes as they are defined in the openPMD base standard (not the ED-PIC extension).

main tasks:

for several of these points, a more object oriented API with actual mesh and particle objects might be necessary. Due to that, I propose to upgrade the major version of the library to 2.0 with the changes.

RemiLehe commented 8 years ago

I was wondering: is 2.0 necessary for openPMD, or can openPMD already be implemented in the next release of libSplash (1.3/1.4 as I understood) ?

ax3l commented 8 years ago

@RemiLehe Yes you understood it correctly. One can implement the openPMD markup already with the lastest release of libSplash, version 1.3.0.

For example, PIConGPU is currently implementing openPMD 1.0.0 for HDF5 based on libSplash 1.3.0 (development branch).

The idea of this PR is to define a C++ high-level interface in 2.0.0, so the writeGlobalAttribute / writeAttribute calls to the libSplash API for field and particle records are done transparently in the background. This is just convenience so people can think in openPMD objects rather than low-level write/read calls. Also, constant records can be handled transparently without fiddling with dirs and attributes in if-clauses.

RemiLehe commented 8 years ago

Ok, thanks for the update ! I think it is great to have a high-level interface for this. Btw, could this allow other PIC codes to use libSplash as a library that writes openPMD output, without having to specifically write the underlying HDF5/ADIOS code ? (On the LBL side, we've had several request for this kind of library.)

ax3l commented 8 years ago

Btw, could this allow other PIC codes to use libSplash as a library that writes openPMD output, without having to specifically write the underlying HDF5/ADIOS code ?

Yes, we encourage to do so for HDF5! :)

libSplash was designed from the beginning years ago to be particle and (simple) mesh data centric, using a subset of what HDF5 offers. It evolved over time from parallel file-per-rank to MPI-I/O output methods and can be seen as a predecessor to the openPMD idea. For example, it does not automatically write a large quantity of attributes by itself besides sizes and offsets (but users can add them with simple calls like writeAttribute and writeGlobalAttribute to fulfil the openPMD base standard and it's extensions).

So yes, users of libSplash do not need to know the low-lvl file format (HDF5) APIs, data structures, dataspaces, etc. at all.

Regarding ADIOS writing: in libSplash we first should develop a high-lvl interface for openPMD objects (this issue) and then add an other backend to keep the required changes small.

It's probably possible to add ADIOS as an additional parallel writer, but this will take more planning and time. I will open a separate issue for that: #215

ax3l commented 5 years ago

This issue is super-seeded by our new project, openPMD-api, which will receive all further I/O efforts.