The fixes to having dangling file handles and the incorrect rewinding of tecplot files<div>has been fixed on VTK master.</div><div><br></div><div>You are correct in that gz_rewind doesn't fully rewind the file, so instead we are</div>
<div>closing and reopening the file.<br><br><div class="gmail_quote">On Sat, Feb 11, 2012 at 1:48 AM, Ahmad <span dir="ltr"><<a href="mailto:falahatpisheh@gmail.com">falahatpisheh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Excellent catch. That fixed the problem of file handling. The thing is that<br>
for some reason the rewinding does not work properly. it does not completely<br>
rewound to the beginning of the file. Since my Tecplot file has comments in<br>
the first few lines, the rewound position will be positioned in the middle<br>
of the comments (in my case s->start=320 in gz_open function) and a lot of<br>
errors will be printed on the screen indicating "unknown format found in the<br>
file". This significantly slows down the reading of 1000 files. Can you<br>
please help me with that?<br>
<br>
The solution that I found is as follows which works fine for me. But I am<br>
not sure if this reduce the generality of the library.<br>
<br>
In gz_open function in gzio.c file, I found out that in my case<br>
s->start=320. Can I have your opinion about setting this to s->start=0 to<br>
completely rewind to the beginning of the file and not skip the header?<br>
<br>
</div>Is it really necessary to rewind the file? Isn't it better to close and open<br>
a new one? Is it because of speed? Please let me know. Thank you.<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Problem-in-reading-more-than-1000-files-by-vtk-readers-tp5459233p5474525.html" target="_blank">http://vtk.1045678.n5.nabble.com/Problem-in-reading-more-than-1000-files-by-vtk-readers-tp5459233p5474525.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Robert Maynard<br>
</div>