[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hdf5-support ?
From: |
David Bateman |
Subject: |
Re: hdf5-support ? |
Date: |
Thu, 18 Aug 2005 12:16:52 +0200 |
User-agent: |
Mozilla Thunderbird 0.8 (X11/20040923) |
andreas naessl wrote:
hi,
is the latest cygwin 2.1.71 octave-version for winXP able to read from hdf5-files? theoretically yes, as help says, it should even work in my ancient 2.1.42 installation. BUT i get a error message like "hdf5-libraries not linked"
before i spend a lot of time for cygwin download, i would like to know, if hdf5 support is really working in that package...
some other questions (cause i never worked with hdf5 data)
1) do i need some additional dlls for hdf5-support, which are not provided by
octave package?
From what you stated above it looks like the current cygwin build
doesn't link to libhdf5, so even getting the right dll won't help as the
code in octave to use hdf5 wasn't even built...
2) as far as i know there is some kind of hierarchical organisation of data in hdf5-files possible (like groups / folders) - is this supported by octave?
3) can i access only singe tables/2Darrays by a octave read, even if there are
many more datasets in a hdf5-file?
See answer from Nuno.
4) can i write back only one single changed table/2D-array within a acceptable
time in the case of a huge hdf5-file is containing many other arrays ? or has
the whole file to be rewritten on harddisk? i ask this for performance
reasons...
Short answer "No"... Long answer, the format used by octave to save to
hdf5 files is for each variable to create a group with two elements...
The first element is named "type" which defines the variable type (ie.
matrix, sparse, etc), and the second named "value" that actually
contains the data corresponding to this type.. The reason to do this is
that it made loading and saving to hdf5 files extensible for new types.
However octave can read hdf5 files saved by other programs and will
intuit the type of the variable from its format. It will not resave in
this format though. So firstly if you are using datasets from a source
that is not octave you can't resave in the same format, and so a
completely new file must be saved.
Your question still has sense if you are working with a file in octave's
format... Again, the answer is no. The reason is that the "mode"
variable in Fsave is not passed to the hdf5_ofstream constructor as
defined in ls-hdf5.h. Furthermore the std::ios::ate flag of mode in not
tested in the constructor, and the stream is always opened for saving like
file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
The fact is it probably wouldn't be very hard to modify octave to allow
the functionality you want, as it would just require passing the mode to
the hdf5_ofstream constructor in load-save.cc, then testing for
std::ios:ate in the constructor and using the right flags to H5Fcreate.
Want to send a patch?
Cheers
David
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------