Openpmd-api: Invalid field data.

Created on 4 Jan 2019  路  4Comments  路  Source: openPMD/openPMD-api

Describe the bug
I get invalid field data , when I'm loading a PIConGPU simulation output with the API.
The fields are almost everywhere equal zero, for some iterations there are nan values as well.
If I load the same arrays using h5py, I get a normal field distribution .

To Reproduce

import openPMD
import os
import matplotlib.pyplot as plt

path = os.path.join("/bigdata/hplsim/scratch/ordyna35/runs/FoilLTC_02/", "simOutput/h5/simData_%T.h5")
series = openPMD.Series(path, openPMD.Access_Type.read_only)
i  = series.iterations[1000]
B_z = i.meshes['B']['z']
B_z_dat = B_z.load_chunk([0,0], B_z.shape)

See the attached file for more details.
notebook pdf

Expected behavior
The array returned with load_chunk should be the same as the one acquired through the h5py package.

Software Environment:

  • version of openPMD-api: 0.6.3-a
  • installed openPMD-api via: pip
  • operating system: Ubuntu 14.04.5 LTS
  • machine: Jupyter service on the HZDR hypnos.
  • name and version of Python implementation: CPython, 3.6.2
  • version of HDF5: 1.8.14
  • version of ADIOS1: [e.g. 1.13.1]
  • name and version of MPI: [e.g. OpenMPI 3.0.0]
    @ax3l @n01r

jupyter.profile

HDF5 Python3 question

All 4 comments

Hi and thank you for the well-documented report!

Before you can use the load_chunk-ed data, make sure to perform series.flush(). openPMD-api is a asynchronous-API that by default collects several read and write operations in order to increase performance.

Side note: please be warned that the next release will change the argument order of the store_chunk/load_chunk methods in order to make it simpler: https://openpmd-api.readthedocs.io/en/latest/install/upgrade.html#alpha Just switch your argument order when updating to the upcoming 0.7.0 release in a few days.

Thank you for the tip with series.flush() now it works just fine.

Hurray, glad that helped! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

C0nsultant picture C0nsultant  路  6Comments

hightower8083 picture hightower8083  路  6Comments

titoiride picture titoiride  路  3Comments

lucafedeli88 picture lucafedeli88  路  3Comments

KseniaBastrakova picture KseniaBastrakova  路  6Comments