[vtkusers] Problem in reading more than 1000 files by vtk readers

Robert Maynard robert.maynard at kitware.com
Fri Feb 17 10:40:00 EST 2012


The fixes to having dangling file handles and the incorrect rewinding of
tecplot files
has been fixed on VTK master.

You are correct in that gz_rewind doesn't fully rewind the file, so instead
we are
closing and reopening the file.

On Sat, Feb 11, 2012 at 1:48 AM, Ahmad <falahatpisheh at gmail.com> wrote:

> Excellent catch. That fixed the problem of file handling. The thing is that
> for some reason the rewinding does not work properly. it does not
> completely
> rewound to the beginning of the file. Since my Tecplot file has comments in
> the first few lines, the rewound position will be positioned in the middle
> of the comments (in my case s->start=320 in gz_open function) and a lot of
> errors will be printed on the screen indicating "unknown format found in
> the
> file". This significantly slows down the reading of 1000 files. Can you
> please help me with that?
>
> The solution that I found is as follows which works fine for me. But I am
> not sure if this reduce the generality of the library.
>
> In gz_open function in gzio.c file, I found out that in my case
> s->start=320. Can I have your opinion about setting this to s->start=0 to
> completely rewind to the beginning of the file and not skip the header?
>
> Is it really necessary to rewind the file? Isn't it better to close and
> open
> a new one? Is it because of speed? Please let me know. Thank you.
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Problem-in-reading-more-than-1000-files-by-vtk-readers-tp5459233p5474525.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Robert Maynard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120217/b50698fa/attachment.htm>


More information about the vtkusers mailing list