Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HDF5 OSX intermediate group creation errors #1741

Merged
merged 3 commits into from
Mar 25, 2022
Merged

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Mar 25, 2022

Still not sure what the original problem was, but going through the HDF5 C++ API seems to fix the following error occurring in amici::hdf5::hdf5CreateGroup with recent HDF5 versions on OSX:

>       return _amici.writeSolverSettingsToHDF5(*args)
E       RuntimeError: Failed to create group in hdf5CreateGroup: ssettings

../sdist/amici/amici.py:6129: RuntimeError
----------------------------- Captured stderr call -----------------------------
HDF5-DIAG: Error detected in HDF5 (1.10.8) thread 0:
  #000: H5Plcpl.c line 152 in H5Pset_create_intermediate_group(): can't find object for ID
    major: Object atom
    minor: Unable to find atom information (already closed?)
  #001: H5Pint.c line 3805 in H5P_object_verify(): property list is not a member of the class
    major: Property lists
    minor: Unable to register new atom
  #002: H5Pint.c line 3756 in H5P_isa_class(): not a property list
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.8) thread 0:
  #000: H5G.c line 288 in H5Gcreate2(): not link creation property list
    major: Invalid arguments to routine
    minor: Inappropriate type
  #001: H5Pint.c line 3756 in H5P_isa_class(): not a property list
    major: Invalid arguments to routine
    minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.8) thread 0:
  #000: H5P.c line 1488 in H5Pclose(): not a property list
    major: Invalid arguments to routine
    minor: Inappropriate type

H5::LinkCreatPropList::setCreateIntermediateGroup was only added in HDF5 1.10.6, but current Ubuntu LTS still comes with HDF5 1.10.4. Therefore we still need to keep the C version.

@dweindl dweindl marked this pull request as draft March 25, 2022 09:12
@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #1741 (177e804) into develop (9b13330) will increase coverage by 1.13%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1741      +/-   ##
===========================================
+ Coverage    77.87%   79.01%   +1.13%     
===========================================
  Files           73       73              
  Lines        11364    11364              
===========================================
+ Hits          8850     8979     +129     
+ Misses        2514     2385     -129     
Flag Coverage Δ
cpp 74.80% <ø> (+0.04%) ⬆️
petab 62.51% <ø> (ø)
python 71.32% <ø> (+3.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/hdf5.cpp 90.51% <ø> (ø)
src/solver_cvodes.cpp 69.53% <0.00%> (+0.18%) ⬆️
src/exception.cpp 80.64% <0.00%> (+6.45%) ⬆️
python/amici/conserved_moieties.py 90.41% <0.00%> (+24.65%) ⬆️

@dweindl dweindl requested a review from FFroehlich March 25, 2022 10:12
@dweindl dweindl marked this pull request as ready for review March 25, 2022 10:14
@dweindl dweindl force-pushed the fix_hdf5_create_group branch from a917efa to 177e804 Compare March 25, 2022 10:56
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@FFroehlich FFroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 very helpful, stared at the code for a while and couldn't figure out whats wrong

@dweindl dweindl merged commit f60957b into develop Mar 25, 2022
@dweindl dweindl deleted the fix_hdf5_create_group branch March 25, 2022 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants