underworldcode / underworld2

underworld2: A parallel, particle-in-cell, finite element code for Geodynamics.
http://www.underworldcode.org/
Other
168 stars 58 forks source link

HDF5 load #662

Open antonio-schettino opened 1 year ago

antonio-schettino commented 1 year ago

Hello, I am experiencing problems with saving and loading *.h5 files. If I run the following code:

m_handle = mesh.save("Numerical_Models/Mesh-RIFT-v62.h5")

The result is a h5 file having name 'Mesh-RIFT-v62.h5'. When I try to load the mesh, I obtain the following errors on Mac (Apple Silicon M1) Screenshot 2023-06-04 alle 18 05 46

Conversely, everything works fine on Windows. Please can you help me?

julesghub commented 1 year ago

Hi @antonio-schettino, Thanks for the report. What version of the code are you using?

I see in the latest version (2.14.1) there is an exception for the RuntimeError generated here. https://github.com/underworldcode/underworld2/blob/b72fc39337db6c36a68b585540262c14cc9fc59e/underworld/mesh/_mesh.py#L655

If you are running an older version of Underworld can you update and try again.

antonio-schettino commented 1 year ago

Hi Julien,

I thank you for your reply. I have updated UW to version 2.14.1b. The new error is shown below. Screenshot 2023-06-07 alle 09 07 15

julesghub commented 1 year ago

i notice now you're using HDF5-1.12.1. I believe this could be the issue - I tested UW with 1.12.1 a while back and decided to stick to HDF5-1.10.9 for the UW docker. (I think it was for this load() reason). Can you use HDF5-1.10.9 instead?

Can you also send the file "Numerical_Models/Mesh-RIFT-v62.h5" and I'll test it.

antonio-schettino commented 1 year ago

I am using the Docker/Jupyter system, hence I don't figure out how to switch to an earlier version of the HDF library. I attach the saved mesh (zipped). Mesh-RIFT-v62.h5.zip