bugGNU Octave - Bugs: bug #32756, Ignore unknown datatypes in HDF5...


bug #32756: Ignore unknown datatypes in HDF5 files but load remainder of file correctly

Submitted by:  Daniel Davis <ddesics>
Submitted on:  Sat 12 Mar 2011 03:20:03 PM UTC  
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Performance
Status: Patch SubmittedAssigned to: None
Originator Name: Daniel DavisOpen/Closed: Open
Release: devOperating 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 04 Jul 2016 02:02:40 AM UTC, comment #1:

I have tested this patch, and reviewed the code. It all looks good to me.

I'm attaching a changeset based on the patch.

(file #37698)

Lachlan Andrew <lachlan>
Project Member
Sat 12 Mar 2011 03:20:03 PM UTC, original submission:

Currently, when octave encounters an unknown datatype in an HDF5 file, it fails to load the file.

For an example, try loading the attached bug.h5 with
The file fails to load.

A patch is attached which fixes this, so that octave will emit a warning stating that it can't identify the data type and is skipping the specified variable. Octave will then proceed to load the portions of the file which it can identify.

Copying the hdf5_make_range_type function from ov-range.cc is an ad-hoc hack and something better can certainly be done, but I didn't dig into octave's code to see how best to access the function from ls-hdf5.cc

I eventually intend to try to pull something together to let octave read structured data types from hdf5 files, but this is a temporary fix that will allow octave to read more non-octave created hdf5 files until that time, without affecting octave created files.

The file test.h5 is a test to verify that I did not break octave's loading of ranges, since I changed that section of code. It should load a variable named val which has a vector going from 1 to 15 in increments of 1.

Daniel Davis <ddesics>


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

Attach File(s):

Attached Files
file #22908:  bug.h5 added by ddesics (157KiB - application/octet-stream - Bug testing file and patch.)
file #22909:  hdf5-patch added by ddesics (2KiB - application/octet-stream - Bug testing file and patch.)
file #22910:  test.h5 added by ddesics (5KiB - application/octet-stream - Bug testing file and patch.)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by lachlan (Updated the item)
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by ddesics (Submitted the item)

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

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 04 Jul 2016 02:02:40 AM UTClachlanAttached File-=>Added bug_32756_hdf5_continue.cset, #37698
    Fri 30 Sep 2011 04:44:39 PM UTCrik5CategoryNone=>Libraries
    Fri 30 Sep 2011 04:44:14 PM UTCrik5StatusNone=>Patch Submitted
    Sat 12 Mar 2011 03:20:03 PM UTCddesicsAttached File-=>Added bug.h5, #22908
      Attached File-=>Added hdf5-patch, #22909
      Attached File-=>Added test.h5, #22910

    Back to the top

    Powered by Savane 3.1-cleanup1