openPMD / openPMD-api

:floppy_disk: C++ & Python API for Scientific I/O
https://openpmd-api.readthedocs.io
GNU Lesser General Public License v3.0
138 stars 51 forks source link

Distinguish BP versions in file endings #1205

Closed franzpoeschel closed 2 years ago

franzpoeschel commented 2 years ago

Is your feature request related to a problem? If so, please describe. BP3 and BP4 are already used in production, BP5 is coming up. The formats are incompatible with each other, but we use the same endings for them so far. BP5 is not going to replace BP4, so we should go for a solution that will let people use both formats side by side without too much confusion.

Describe the solution you'd like Instead of simData.bp, write files like simData.bp3, simData.bp4, simData.bp5. Optionally even enforce version numbers if users don't specify them, e.g. Series("simData.bp", Access::CREATE) might create simData.bp4. Only do this if we find a solution that does not break existing workflows.

Describe alternatives you've considered Automatic version detection in ADIOS2 if using the generic ending .bp Being explicit about versions is still good

pnorbert commented 2 years ago

There are two differences between BP4 and BP5 directory content:

franzpoeschel commented 2 years ago

Thank you for the info. So we can use some form of automatic detection as long as there is no clear file ending.

pnorbert commented 2 years ago

Also, using FileStream as engine for reading makes adios check for the type of data, and launches BP4 or BP5.

franzpoeschel commented 2 years ago

Ah, very good So we can use that as default in reading procedures and not worry much about BP versions

pnorbert commented 2 years ago

Well, for 4 and 5, not for BP3

franzpoeschel commented 2 years ago

That's probably ok, since noone is really using BP3 anymore anyway

ax3l commented 2 years ago

Likely, and if they do we have a manual switch for it (after it crashes for them): OPENPMD_BP_BACKEND https://openpmd-api.readthedocs.io/en/0.14.4/backends/adios1.html

ax3l commented 2 years ago

Being able to use .bp3, .bp4 and .bp5 explicitly would nonetheless be cool/explicit/transparent, as we discussed last week. We might need to settle for .bp (BP3), .bp4 and .bp5 in the end, if I remember the ADIOS1 conventions correctly.

franzpoeschel commented 2 years ago

OPENPMD_BP_BACKEND distinguishes ADIOS1 and ADIOS2, not BP3 and BP4

We might need to settle for .bp (BP3), .bp4 and .bp5 in the end, if I remember the ADIOS1 conventions correctly.

You remember correctly, I've removed the .bp3 file ending again since it does not work. Does not matter too much, the important thing is to properly distinguish BP4 and BP5. (Also BP3 is relatively easy to visually spot because it's a file, not a folder)