HDF5 crashes if dataset name not started with "/"

Issue #486 resolved
Pete Kekenes-Huskey created an issue

Error is thrown when attempting to store numpy double array to hdf file object.

from dolfin import *
import numpy as np
mesh = UnitSquareMesh(20,20)
hdf = HDF5File(mesh.mpi_comm(), "a.h5", "w")
z = np.array([1.],dtype=np.double)
hdf.write(z,"att1")
hdf.write(z,"/att1")

Comments (6)

  1. Chris Richardson
    • marked as minor
    • changed milestone to 1.6

    Need to check all dataset paths begin with "/" This will work:

    from dolfin import *
    import numpy as np
    mesh = UnitSquareMesh(20,20)
    hdf = HDF5File(mesh.mpi_comm(), "a.h5", "w")
    z = np.array([1.],dtype=np.double)
    hdf.write(z,"/att1")
    
  2. Log in to comment