bugGNU Octave - Bugs: bug #39491, Change H5Giterate to H5Literate...

 
 

bug #39491: Change H5Giterate to H5Literate for HDF5 API

Submitted by:  None
Submitted on:  Mon 15 Jul 2013 08:33:18 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  dspyz Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  dev
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 08 Sep 2014 05:35:36 PM UTC, comment #4: 

Has anyone had any luck with this?  I've hit a similar problem with reading a .mat file that loads fine in HDFView.  I've tested with both 3.8.0 and 3.6.4 on Mac OS X 10.9.2.  It wasn't clear if the diff

Anonymous
Thu 12 Jun 2014 04:53:15 PM UTC, comment #3: 

I replaced H5Giterate and on that occasion all functions deprecated in HDF API v1.8, but am not finished testing and cannot continue in the next few weeks. Sharing my progress in the attached diff on Andy's request (see http://lists.gnu.org/archive/html/help-octave/2014-06/msg00155.html ).

Some notes:

  • The HDF API may, depending on how it is compiled, support both v16 and v18 (see http://www.hdfgroup.org/HDF5/doc/RM/APICompatMacros.html ). Octave's configure should use v18 over v16 whenever possible, even when it is not the API default (which I think it didn't, not sure if my change worked yet)
  • Building should work against all compatibility levels of the hdf API (hdf configured with --with-default-api-version=[v18|v16] or with --disable-deprecated-symbols), needs testing. I had problems building against hdf libraries from a specific folder instead of the system-wide installed hdf version, there was/might still be an issue with octave's --with-hdf5-libdir=... and/or --with-hdf5-includedir=...
  • struct fields were sorted alphabetically after loading from hdf, because api v16 did not support tracking of creation order in the hdf file. It should work now with v18, but forward/backward (and matlab?) compatibility needs more testing (write with v16, read with v18, and vice versa).
  • my code may still contain some debug output commands

(file #31540)

Markus Appel <mappel>
Wed 17 Jul 2013 05:19:15 AM UTC, comment #2: 

This shouldn't be that difficult to fix if someone has a little time.  The old API for the H5Giterate function is here (http://www.hdfgroup.org/HDF5/doc/RM/H5G/H5Giterate.htm).  The replacement function is here (http://www.hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-Iterate).  They function prototypes aren't quite the same so someone will have to do a little reading to see how to replace the function.  The function only appears a few times in the code.  Below is a grep in the source tree.

./corefcn/ls-hdf5.cc:237:// This function is designed to be passed to H5Giterate, which calls it
./corefcn/ls-hdf5.cc:243:// It returns 1 on success (in which case H5Giterate stops and returns),
./corefcn/ls-hdf5.cc:244:// -1 on error, and 0 to tell H5Giterate to continue on to the next item
./corefcn/ls-hdf5.cc:592:  herr_t H5Giterate_retval = -1;
./corefcn/ls-hdf5.cc:603:    H5Giterate_retval = H5Giterate (hs.file_id, "/", &hs.current_item,
./corefcn/ls-hdf5.cc:606:  if (H5Giterate_retval > 0)
./corefcn/ls-hdf5.cc:614:      // an error occurred (H5Giterate_retval < 0) or there are no
./octave-value/ov-fcn-handle.cc:1154:                  if (H5Giterate (group_hid, "symbol table", &current_item,
./octave-value/ov-struct.cc:1038:         && (retval2 = H5Giterate (loc_id, name, &current_item,
./octave-value/ov-struct.cc:1671:         && (retval2 = H5Giterate (loc_id, name, &current_item,
./octave-value/ov-cell.cc:1237:        retval2 = H5Giterate (loc_id, name, &current_item,
./octave-value/ov-class.cc:1768:         && (retval2 = H5Giterate (group_hid, name, &current_item,

Rik <rik5>
Project Administrator
Mon 15 Jul 2013 08:38:37 PM UTC, comment #1: 

I tried to attach the .h5 file, but it caused a "no group chosen" error.  It's 9.4 MB.  I uploaded it to http://www.wikiupload.com/504WB3C4URTEYRU

Anonymous
Mon 15 Jul 2013 08:33:18 PM UTC, original submission:  

I'm trying to use octave to read a .h5 file using
load finalProg.h5
The file was built with another application using hdf5 1.8.4, but octave fails to read it because H5Giterate is deprecated as of hdf5 1.8

I emailed the HDF Group and they said to use H5Literate instead.

I get the following error message when I try to read the file:

error: load: error while reading hdf5 item all
HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 2963904320:
  #000: ../../../src/H5Gdeprec.c line 777 in H5Giterate(): group iteration failed
    major: Symbol table
    minor: Iteration failed
  #001: ../../../src/H5G.c line 1532 in H5G_iterate(): error iterating over links
    major: Symbol table
    minor: Iteration failed
  #002: ../../../src/H5Gobj.c line 599 in H5G_obj_iterate(): can't iterate over symbol table
    major: Symbol table
    minor: Iteration failed
  #003: ../../../src/H5Gstab.c line 522 in H5G_stab_iterate(): iteration operator failed
    major: Symbol table
    minor: Can't move to next iterator location
  #004: ../../../src/H5B.c line 1302 in H5B_iterate(): B-tree iteration failed
    major: B-Tree node
    minor: Iteration failed
  #005: ../../../src/H5B.c line 1225 in H5B_iterate_helper(): iterator function failed
    major: B-Tree node
    minor: Unable to list node
  #006: ../../../src/H5Gnode.c line 1021 in H5G_node_iterate(): iteration operator failed
    major: Symbol table
    minor: Can't move to next iterator location
error: load: error while reading hdf5 item events
HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 2963904320:
  #000: ../../../src/H5Gdeprec.c line 777 in H5Giterate(): group iteration failed
    major: Symbol table
    minor: Iteration failed
  #001: ../../../src/H5G.c line 1532 in H5G_iterate(): error iterating over links
    major: Symbol table
    minor: Iteration failed
  #002: ../../../src/H5Gobj.c line 599 in H5G_obj_iterate(): can't iterate over symbol table
    major: Symbol table
    minor: Iteration failed
  #003: ../../../src/H5Gstab.c line 522 in H5G_stab_iterate(): iteration operator failed
    major: Symbol table
    minor: Can't move to next iterator location
  #004: ../../../src/H5B.c line 1302 in H5B_iterate(): B-tree iteration failed
    major: B-Tree node
    minor: Iteration failed
  #005: ../../../src/H5B.c line 1225 in H5B_iterate_helper(): iterator function failed
    major: B-Tree node
    minor: Unable to list node
  #006: ../../../src/H5Gnode.c line 1021 in H5G_node_iterate(): iteration operator failed
    major: Symbol table
    minor: Can't move to next iterator location
  #007: ../../../src/H5Gdeprec.c line 777 in H5Giterate(): group iteration failed
    major: Symbol table
    minor: Iteration failed
  #008: ../../../src/H5G.c line 1532 in H5G_iterate(): error iterating over links
    major: Symbol table
    minor: Iteration failed
  #009: ../../../src/H5Gobj.c line 599 in H5G_obj_iterate(): can't iterate over symbol table
    major: Symbol table
    minor: Iteration failed
  #010: ../../../src/H5Gstab.c line 522 in H5G_stab_iterate(): iteration operator failed
    major: Symbol table
    minor: Can't move to next iterator location
  #011: ../../../src/H5B.c line 1302 in H5B_iterate(): B-tree iteration failed
    major: B-Tree node
    minor: Iteration failed
  #012: ../../../src/H5B.c line 1225 in H5B_iterate_helper(): iterator function failed
    major: B-Tree node
    minor: Unable to list node
  #013: ../../../src/H5Gnode.c line 1021 in H5G_node_iterate(): iteration operator failed
    major: Symbol table
    minor: Can't move to next iterator location

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #31540:  replace_deprecated_hdf.diff added by mappel (18KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mappel (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-06-12 mappel Attached File- => Added replace_deprecated_hdf.diff, #31540
    2013-07-17 rik5 SummaryChange H5Giterate to H5Literate => Change H5Giterate to H5Literate for HDF5 API
    2013-07-17 rik5 StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.5