[Nexus] Changes in HDF 5: H5<x>iterate?
Uwe Filges
Uwe.Filges at psi.ch
Tue Jul 29 07:48:50 BST 2003
Hi Tim,
The named problem I have also find out and I have written a bug report
to the HDF support hotline. Presently I am waiting on anwser.
I am sure that the functions H5AIterate and H5GIterate of version 1.6.0
(HDF5) don't working correctly. In the description of the functions
(including version 1.6.0) you can find that the return value of these
functions is zero if all attributes or group members were processed,
but the return value is 1 in version 1.6.0 of HDF5 .
I think we should wait on the answer of NCSA before the NeXus API is
changed (properly changes are not necessary). I propose to use the HDF5
version 1.4.3 until the problem is solved.
Regards
Uwe Filges
Paul Scherrer Institut
Switzerland
Tim Kelley wrote:
> Hello all,
>
> Just a heads-up regarding HDF5. I installed the latest version of the
> HDF 5 library* and hit some problems running napi5_test.
>
> The problems come from the return value of H5Aiterate and H5GIterate,
> and affect NX5getattrinfo, NX5getnextattr and NX5getnextentry. The
> nexus API seems to expect them to return 1 while iteration is valid, 0
> at the end of the traversal, and -1 otherwise. However, these
> functions now seem to skip the 0 and go straight to -1. The state
> NX_EOD never seems to be reached; instead one gets immediately to the
> state NX_ERROR. This means functions like NX5getnextattr and
> NX5getnextentry fail with "ERROR: iteration was not successful",
> and NX5getattrinfo goes into infinite loops.
>
> Simple hacks get past this. If one replaces the line in
> NX5getnextentry( ):
>
> else if (iRet == 0)
>
> with
>
> else if (iRet == 0 || iRet == -1),
>
> and changes a few similar lines in NX5getattrinfo & NX5getnextattr
> (changing lines like while(iRet != 0) to while( iRet > 0) eliminates
> infinite loops), then napi5_test runs successfully.
>
> But this solution might hide a problem: the HDF5 behavior that
> supported the distinction between NX_EOD and NX_ERROR may
> have changed. Anyone relying on that distinction would want to know
> about this.
>
> Regards,
> Tim Kelley
> tkelley at caltech.edu <mailto:tkelley at caltech.edu>
>
>
> * version 1.6.0, precompiled for linux with gcc 3.2.2
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>NeXus mailing list
>NeXus at anl.gov
>http://www.neutron.anl.gov/mailman/listinfo/nexus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nexusformat.org/pipermail/nexus/attachments/20030729/99c2ac01/attachment.html
More information about the NeXus
mailing list