On Tue, Mar 30, 2010 at 2:18 PM, Elena Pourmal <[email protected]> wrote:
> Michael,
>
> Could you please try h5check tool to see if file is corrupted?

I've been travelling (with a netbook -- no access to compilers), but I
can confirm the problem on
MacOSX.   I'm using the hdf5-18 libraries from macports:

$ port info hdf5-18
hdf5-18 @1.8.4-patch1 (science)
Variants:             threadsafe, (+)universal

Description:          HDF5 general purpose library and file format for storing
                      scientific data
Homepage:             http://www.hdfgroup.org/HDF5/

Library Dependencies: zlib, szip
Conflicts with:       hdf5
Platforms:            darwin
License:              unknown
Maintainers:          [email protected], [email protected]

$ port installed hdf5-18
The following ports are currently installed:
  hdf5-18 @1.8.4_0+universal
  hdf5-18 @1.8.4-patch1_0+universal (active)

> hdf5load("test.h5")
HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 0:
  #000: H5F.c line 1514 in H5Fopen(): unable to open file
    major: File accessability
    minor: Unable to open file
  #001: H5F.c line 1309 in H5F_open(): unable to read superblock
    major: File accessability
    minor: Read failed
  #002: H5Fsuper.c line 305 in H5F_super_read(): unable to find file signature
    major: File accessability
    minor: Not an HDF5 file
  #003: H5Fsuper.c line 153 in H5F_locate_signature(): unable to find
a valid file signature
    major: Low-level I/O
    minor: Unable to initialize object
Error in hdf5load("test.h5") : unable to open HDF file: test.h5

> system("/opt/hdfgroup.org/bin/h5check test.h5")

VALIDATING test.h5 according to library version 1.8.0

***Error***
Superblock:Unable to find super block signature at addr 0
***End of Error messages***
ASSUMING super block at physical address 0.
***Error***
Errors found when checking superblock. Validation stopped.
Superblock v.0/1:Undefined object header address in root group symbol
table entry at addr 24
Superblock v.0/1:Invalid End of File Address at addr 24
Superblock v.0/1:Invalid base address at addr 24
Superblock v.0/1:Invalid value for Group Internal Node K at addr 18
Superblock v.0/1:Invalid value for Group Leaf Node K at addr 16
Superblock v.0/1:Invalid Size of Lengths at addr 14
Superblock v.0/1:Invalid Size of Offsets at addr 13
***End of Error messages***
Non-compliance errors found
>



> We are in the process of releasing a new version of h5check, so there is no 
> an officially released tar ball yet.
> Please grab the code from 
> ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/epourmal/h5check.tar
>
> Elena
> On Mar 30, 2010, at 11:35 AM, Michael Dietze wrote:
>
>>
>>> Message: 5
>>> Date: Mon, 29 Mar 2010 19:12:51 -0600
>>> From: "George N. White III" <[email protected]>
>>> To: HDF Users Discussion List <[email protected]>
>>> Subject: Re: [Hdf-forum] R hdf5 package error
>>> Message-ID:
>>>      <[email protected]>
>>> Content-Type: text/plain; charset=ISO-8859-1
>>>
>>> On 3/29/10, [email protected] <[email protected]> wrote:
>>>>
>>>> I was wondering if anyone has experience with the hdf5 package for the R
>>>> statistical software.  Right now we can get the code to compile and while
>>>> it usually reads existing hdf5 files it doesn't write hdf5 files that can
>>>> be read by itself or other software.
>>>>
>>>> We have tried installing this on various Linux machines (both Red Hat and
>>>> Ubuntu) by using both the package managers and compiling the code from
>>>> scratch.  We've compiled using both HDF5 1.8 and 1.6 and neither works.
>>>
>>> We use R routinely with files converted using h4toh5, but 99% of the time we
>>> use hdf5load.   We try to use the platform's hdf5 library, which in our 
>>> case is
>>> 1.6 on Ubuntu and 1.8 via macports on MacOSX.
>>>
>>> There have been versions of the R hdf5 library for Ubuntu, but some versions
>>> abort when they encounter elements in the hdf5 that aren't supported.  Our
>>> files have such elements but the information is redundant, so we patch the
>>> library to omit the unsupported elements.
>>>
>>> Have you run "example(hdf5save)" successfully?
>>
>> Yes, that runs fine.  In fact, as long as we don't quit out of R we can
>> both read and write files, but if we quit and restart R then we can no
>> longer read the files we just wrote and were able to read a second ago.
>>
>>>> Specifically, this simple test in R produces the following error
>>>>
>>>> Step 1: create file (run from within R)
>>>>
>>>> library(hdf5)
>>>> data  = 1:10
>>>> hdf5save("test.h5","dat")
>>>
>>> did you mean: hdf5save("test.h5","data")
>>
>> That's a typo...just in the email, not in what I've been running -- I
>> actually meant for both to be "dat"
>>
>>>>
>>>> Step 2: exit and then restart R
>>>>
>>>> hdf5load("test.h5")
>>>>
>>>> HDF5-DIAG: Error detected in HDF5 library version: 1.6.6 thread
>>>> 47700932800864.  Back trace follows.
>>>> #000: H5F.c line 2049 in H5Fopen(): unable to open file
>>>>  major(04): File interface
>>>>  minor(17): Unable to open file
>>>
>>> This looks more like a permission problem.   If you change the filename to
>>> "/tmp/test.h5" do you get the same error?
>>
>> yes I get the same error
>>
>> I also checked that I do have read/write permissions for the file.  In
>> addition from outside R I ran
>>
>> h5dump test.h5
>>
>> which returned
>>
>> h5dump error: unable to open file "test.h5"
>>
>> An additional odd bit of info is that we do have one computer that runs
>> an older version of Ubuntu where the library has worked for a long time
>> and we only discovered this error when our sysadmin tried putting this
>> on our Redhat cluster.  Even when we download the same exact version of
>> hdf5 and the R hdf5 library that is on the machine that does work we
>> still can't get things to work.  We also found that on our newer Ubuntu
>> machines that the version that comes from the Synaptic package manager
>> doesn't work either.
>>
>> We are just storing vectors of floats so the data format is nothing odd
>> that should be hard to read or write.
>>
>> Also, for what it's worth, I tried contacting the author of the R hdf5
>> package about a week ago and got no response.
>>
>>>> #001: H5F.c line 1829 in H5F_open(): unable to read superblock
>>>>  major(04): File interface
>>>>  minor(24): Read failed
>>>> #002: H5Fsuper.c line 114 in H5F_read_superblock(): unable to find file
>>>> signature
>>>>  major(04): File interface
>>>>  minor(19): Not an HDF5 file
>>>> #003: H5F.c line 1281 in H5F_locate_signature(): unable to find a valid
>>>> file signature
>>>>  major(05): Low-level I/O layer
>>>>  minor(29): Unable to initialize object
>>>> Error in hdf5load("test.h5") : unable to open HDF file: test.h5
>>>
>>>
>>> --
>>> George N. White III <[email protected]>
>>> Head of St. Margarets Bay, Nova Scotia
>>>
>>>
>>>
>>> ------------------------------
>>>
>>> _______________________________________________
>>> Hdf-forum is for HDF software users discussion.
>>> [email protected]
>>> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>>>
>>>
>>> End of Hdf-forum Digest, Vol 9, Issue 55
>>> ****************************************
>> --
>> ________________________________________________________________________
>> Michael Dietze                                  [email protected]
>> Assistant Professor                             www.life.uiuc.edu/dietze
>> Department of Plant Biology                     (217) 265-8020
>> University of Illinois                          1405 IGB / 183 Morrill
>>
>>
>> _______________________________________________
>> Hdf-forum is for HDF software users discussion.
>> [email protected]
>> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>



-- 
George N. White III <[email protected]>
Head of St. Margarets Bay, Nova Scotia

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to