Meshio-convert to `xdmf` from Abaqus raises version error for `h5py`

I am not sure if this concerns dolfin per se, but I am having trouble converting a quadrilateral mesh generated in Abaqus using meshio. I pip-installed meshio[all] but it raises a version error when writing to a xdmf file.
meshio version: 3.1.1

  • MWE:
import meshio 
mFile = meshio.read('trialMesh.inp')
pts, clls = mFile.points, mFile.cells
msh_meshio = meshio.Mesh(pts, clls)
meshio.write('trialMeshio_convert.xdmf',msh_meshio)
/usr/local/lib/python3.6/dist-packages/h5py/__init__.py:75: UserWarning: h5py is running against HDF5 1.10.0 when it was built against 1.10.4, this may cause problems
  '{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)
Traceback (most recent call last):
  File "test_quads_convert.py", line 49, in <module>
    meshio.write('trialMeshio_convert.xdmf',msh_meshio)
  File "/usr/local/lib/python3.6/dist-packages/meshio/_helpers.py", line 240, in write
    return interface.write(filename, mesh, *args, **_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/meshio/_xdmf/main.py", line 465, in write
    XdmfWriter(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/meshio/_xdmf/main.py", line 275, in __init__
    self.h5_file = h5py.File(self.h5_filename, "w")
  File "/usr/local/lib/python3.6/dist-packages/h5py/_hl/files.py", line 391, in __init__
    fapl = make_fapl(driver, libver, rdcc_nslots, rdcc_nbytes, rdcc_w0, **kwds)
  File "/usr/local/lib/python3.6/dist-packages/h5py/_hl/files.py", line 108, in make_fapl
    plist.set_libver_bounds(low, high)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5p.pyx", line 1140, in h5py.h5p.PropFAID.set_libver_bounds
ValueError: Invalid high library version bound (invalid high library version bound)

Hi,

I was having a similar problem which I managed to resolve using the suggestions provided here: Gmsh 4.4.1 in FEniCS? Meshio
Hope it helps

Best Regards,
Kart

1 Like

@Kart thanks for the reference. I installed meshio without all it’s dependencies and separately installed lxml and h5py using the local HDF5 as suggested in the link above. Thanks for the pointer.

Do the solution still work for you people? It doesn’t work for me, I get a gigantic error message when builing h5py as posted in the link in the solution of this question. Any other remedy?

What is the version of meshio that you are using to generate a xdmf file? Uninstalling meshio and it’s dependencies and reinstalling it back (with lxml and h5py) should work. Can you post a MWE?

I had the same problem in the docker containers provided in FEnics.I used a workaround to solve this.I hope that can help in fast resolution of this.

@raboynics I was only able to replicate your problem when I tried installing everything on a new computer. Here is how I fixed it:

  1. First uninstall meshio and h5py using pip3 uninstall h5py and pip3 uninstall meshio
  2. Next pip3 install cython
  3. Then pip3 install --no-binary=h5py h5py --user The massive error is because of cython
  4. pip3 install meshio --user
    This should work
2 Likes

I too have struggled a lot with the h5py/hdf5 version mismatch problem. Eventually this helped me:
pip3 uninstall h5py
pip3 install h5py==2.10.0
I looked at the available versions of h5py at: h5py · PyPI

1 Like