<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Hi Tim,<br>
<br>
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. <br>
<br>
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 .<br>
<br>
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.<br>
<br>
Regards<br>
Uwe Filges<br>
Paul Scherrer Institut<br>
Switzerland<br>
<br>
<br>
<br>
Tim Kelley wrote:<br>
<blockquote type="cite" cite="mid004b01c35563$f4866ec0$0200a8c0@tcvhome">
<meta content="MSHTML 6.00.2723.2500" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">Hello all,</font></div>
<div> </div>
<div><font face="Arial" size="2">Just a heads-up regarding HDF5. </font><font
face="Arial" size="2">I installed the latest version of the HDF 5
library* and hit some problems running napi5_test. </font></div>
<div> </div>
<div><font face="Arial" size="2">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.</font></div>
<div> </div>
<div><font face="Arial" size="2">Simple hacks get past this. If one
replaces the line in NX5getnextentry( ):</font></div>
<div> </div>
<div><font face="Arial" size="2">else if (iRet == 0)</font></div>
<div> </div>
<div><font face="Arial" size="2">with </font></div>
<div> </div>
<div><font face="Arial" size="2">else if (iRet == 0 || iRet == -1),</font></div>
<div> </div>
<div><font face="Arial" size="2">and changes a few similar lines in
NX5getattrinfo & NX5getnextattr (changing </font><font face="Arial"
size="2">lines like while(iRet != 0) to while( iRet > 0) eliminates
infinite loops), then napi5_test runs successfully.</font></div>
<div> </div>
<div><font face="Arial" size="2">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.</font><font face="Arial"
size="2"> </font></div>
<div> </div>
<div><font face="Arial" size="2">Regards,</font></div>
<div><font face="Arial" size="2">Tim Kelley</font></div>
<div><font face="Arial" size="2"><a href="mailto:tkelley@caltech.edu">tkelley@caltech.edu</a></font></div>
<div> </div>
<div> </div>
<div><font face="Arial" size="2">* version 1.6.0, precompiled for
linux with gcc 3.2.2</font></div>
<div> </div>
<pre wrap="">
<hr width="90%" size="4">
_______________________________________________
NeXus mailing list
<a class="moz-txt-link-abbreviated" href="mailto:NeXus@anl.gov">NeXus@anl.gov</a>
<a class="moz-txt-link-freetext" href="http://www.neutron.anl.gov/mailman/listinfo/nexus">http://www.neutron.anl.gov/mailman/listinfo/nexus</a>
</pre>
</blockquote>
<br>
</body>
</html>