[vtkusers] Problem in reading more than 1000 files by vtk readers
Ahmad
falahatpisheh at gmail.com
Sun Feb 5 21:28:35 EST 2012
Hi all,
I am trying to read 10,000 Tecplot ASCII files by using vtkTecplotReader.
1000 files in 10 different folders. I get the error *too many open files*.
For debug purposes, I tried to read only 1000 files in one folder. I get the
same error after reading 508 files. Could someone help me on the correct way
of reading many files.
It seems that the file handles are not released by the vtkTecplotReader.
The way I read the files is as follows.
for (int ifile = 0; ifile < 1000; ifile++){
{
string fullpath_filename;
ostringstream strout(fullpath_filename);
for ( int i = 0 ; i < 1 ; i++){
vtkSmartPointer<vtkTecplotReader> reader =
vtkSmartPointer<vtkTecplotReader>::New();
strout << direc[ifile] << "\\" << filename_prefix_veloc << setw( 6 ) <<
setfill( '0' ) << filelist[ifile] << ".dat";
fullpath_vel_filename = strout.str();
reader->SetFileName(fullpath_filename.c_str());
reader->Update(); // this is the line where the error occurs when ifile ==
508.
strout.str("");
}
}
I am running the code on a dual quad core Xeon processors, Windows 7 64 bit
machine with Visual Studio 2008.
I would be very grateful for any help.
falahatpisheh at gmail.com
Ahmad
--
View this message in context: http://vtk.1045678.n5.nabble.com/Problem-in-reading-more-than-1000-files-by-vtk-readers-tp5459233p5459233.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list