Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#69861 closed defect (fixed)

hdf5 @1.14.4.2_0: Run-time error

Reported by: Michael-P-Allen (Mike Allen) Owned by: eborisch (Eric A. Borisch)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Dave-Allured (Dave Allured)
Port: hdf5

Description

The recent upgrade to hdf5 @1.14.4.2_0 seems to have broken my Fortran HDF5 codes, generating runtime errors and a segfault. The errors disappear if I downgrade to hdf5 @1.14.3_4. I am running with Xcode v15.3, Sonoma 14.4.1 on an Intel-based Mac mini.

I attach a small f90 code which uses some basic HDF5 routines from the library. It is compiled with the HDF5-supplied wrapper script h5fc. If I compile and run with hdf5 @1.14.4.2_0+cxx+fortran+gfortran+hl active, I get a load of error messages (log file attached), starting with

HDF5-DIAG: Error detected in HDF5 (1.14.4-2) thread 0:
  #000: H5.c line 1025 in H5open(): library initialization failed
    major: Function entry/exit
    minor: Unable to initialize object

If instead I compile and run with hdf5 @1.14.3_4+cxx+fortran+gfortran+hl active, I get no errors.

In both cases, the compilation line produced by h5fc -show is the same, namely /opt/local/bin/gfortran-mp-13 -pipe -Os -m64 -I/opt/local/include -L/opt/local/lib /opt/local/lib/libhdf5hl_fortran.a /opt/local/lib/libhdf5_hl.a /opt/local/lib/libhdf5_fortran.a /opt/local/lib/libhdf5.a -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk /opt/local/lib/libaec/lib/libsz.dylib /opt/local/lib/libz.dylib -ldl -lm

Attachments (2)

hdf5_test.f90 (1.0 KB) - added by Michael-P-Allen (Mike Allen) 5 months ago.
Simple f90 program using HDF5 library
hdf5_run.log (3.1 KB) - added by Michael-P-Allen (Mike Allen) 5 months ago.
Error message produced after compiling and running

Download all attachments as: .zip

Change History (9)

Changed 5 months ago by Michael-P-Allen (Mike Allen)

Attachment: hdf5_test.f90 added

Simple f90 program using HDF5 library

Changed 5 months ago by Michael-P-Allen (Mike Allen)

Attachment: hdf5_run.log added

Error message produced after compiling and running

comment:1 Changed 5 months ago by jmroot (Joshua Root)

Owner: set to eborisch
Status: newassigned

comment:2 Changed 5 months ago by eborisch (Eric A. Borisch)

Can you see if these changes work for you?

Staged here but not yet merged into the trunk.

comment:3 Changed 5 months ago by Michael-P-Allen (Mike Allen)

Yes thanks, applying this patch to the Portfile and reinstalling (to give hdf5 @1.14.4.2_1+cxx+fortran+gfortran+hl) seems to have fixed the problem. I have to say, I'm a newbie when it comes to patching Portfiles, so I hope I did this correctly.

comment:4 Changed 5 months ago by Michael-P-Allen (Mike Allen)

I have been unable to read the HDF files generated by this version, using Python code with h5py. (I've tried re-installing h5py, no joy). It seems like some kind of mismatch is happening. I've again reverted to hdf5 @1.14.3_4+cxx+fortran+gfortran+hl, re-installed h5py, recompiled, and regenerated the HDF files, and can again read them using h5py. I don't want to clutter this ticket with a new issue, so I'm inclined to wait until your patch gets merged, upgrade in the regular way, and then pick this problem up if necessary with a new ticket. Perhaps updating h5py is on the to-do list in any case.

Edit: I think the error occurs when the h5py module is loaded, not when the files are read.

Last edited 5 months ago by Michael-P-Allen (Mike Allen) (previous) (diff)

comment:5 Changed 5 months ago by Michael-P-Allen (Mike Allen)

The released port hdf5 @1.14.4.2_1+cxx+fortran+gfortran+hl fixes the problem I had in my Fortran codes. However, it seems to create an error in my Python codes when I import h5py from the py-h5py port. I've reported this in #69938.

comment:6 in reply to:  2 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed
Summary: Run-time error with hdf5 @1.14.4.2_0hdf5 @1.14.4.2_0: Run-time error

Replying to eborisch:

Can you see if these changes work for you?

Staged here but not yet merged into the trunk.

Committed in [7e7b85fad23dd07517750435c8cae8fde80d4e64/macports-ports].

comment:7 Changed 5 months ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added
Note: See TracTickets for help on using tickets.