Hi,<br><br><div>This is a known issue when a VTK XML file has an appended data section larger than 2GB(<a href="http://public.kitware.com/Bug/view.php?id=6938">http://public.kitware.com/Bug/view.php?id=6938</a>).<br><br><div>
To work around the problem you can look at writing out the file as any of the following:</div><div><ul><li>Partitioned VTK XML</li><li>Ensight Gold Binary</li><li>Exodus II ( Will require you too link to the exodus library found at <a href="http://sourceforge.net/projects/exodusii/">http://sourceforge.net/projects/exodusii/</a> )</li>
</ul><br>On Tue, Jan 4, 2011 at 5:45 AM, Guenter Bartsch <<a href="mailto:guenter.bartsch@googlemail.com">guenter.bartsch@googlemail.com</a>> wrote:<br>><br>> hi all,<br>><br>> we have run into a problem reading a pretty large (3.6 GB) .vtu file.<br>
> the file was produced by a fortran program that writes vtk data in the<br>> old ascii format which results in a 17G ascii file which takes very<br>> long to load in paraview (and results in an error message). so, we<br>
> have written a converter program that reads the ascii file and outputs<br>> xml:<br>><br>><br>> int main(int argc, char *argp[])<br>> {<br>> if (argc != 2) {<br>> cerr << "usage: " << argp[0] << " <vtk filename>\n\n";<br>
> return 1;<br>> }<br>><br>> char *filename = argp[1];<br>><br>> cout << "Input filename: " << filename << "\n";<br>><br>> vtkSmartPointer<vtkUnstructuredGridReader> reader =<br>
> vtkSmartPointer<vtkUnstructuredGridReader>::New();<br>> reader->SetFileName(filename);<br>><br>> char *ofilename = "foo.vtu";<br>> cout << "Output filename: " << ofilename << "\n";<br>
> vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer =<br>> vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New();<br>> writer->SetFileName(ofilename);<br>> writer->SetInputConnection(reader->GetOutputPort());<br>
> writer->Write();<br>><br>> return EXIT_SUCCESS;<br>> }<br>><br>> this program runs fine. now, if i open the resulting file in paraview,<br>> i run into this error as soon as i hit apply:<br>><br>
> ERROR: In /opt/paraview-3.8.1/src/ParaView-3.8.1/VTK/IO/vtkXMLUnstructuredDataReader.cxx,<br>> line 652<br>> vtkXMLUnstructuredGridReader (0x143f0c40): Cannot read cell<br>> connectivity from Cells in piece 0 because the "connectivity" array is<br>
> not long enough.<br>><br>> the converter did work on a smaller test data set and paraview could<br>> open it - only now with the large data set paraview fails. here is the<br>> header of the failing file:<br>
><br>> <?xml version="1.0"?><br>> <VTKFile type="UnstructuredGrid" version="0.1"<br>> byte_order="LittleEndian" compressor="vtkZLibDataCompressor"><br>
> <UnstructuredGrid><br>> <Piece NumberOfPoints="106496000"<br>> NumberOfCells="105122745" ><br>> <PointData Vectors="vectors"><br>> <DataArray type="Float32" Name="vectors"<br>
> NumberOfComponents="3" format="appended" RangeMin="0.0021820231521"<br>> RangeMax="24.459394872" offset="0" /><br>> </PointData><br>
> <CellData><br>> </CellData><br>> <Points><br>> <DataArray type="Float32" Name="Points" NumberOfComponents="3"<br>> format="appended" RangeMin="0"<br>
> RangeMax="5007.1818403" offset="1580185620" /><br>> </Points><br>> <Cells><br>> <DataArray type="Int64" Name="connectivity" format="appended"<br>
> RangeMin="" RangeMax=""<br>> offset="2045521660" /><br>> <DataArray type="Int64" Name="offsets" format="appended"<br>
> RangeMin="" RangeMax=""<br>> offset="3504937336" /><br>> <DataArray type="UInt8" Name="types" format="appended"<br>
> RangeMin="" RangeMax=""<br>> offset="3671971228" /><br>> </Cells><br>> </Piece><br>> </UnstructuredGrid><br>> <AppendedData encoding="base64"><br>
> _WJgAAACAAAAAAAAAvXYAALF2AADJdgAAUHcAA...<br>><br>> does anyone know what could be going on here? do we need to configure<br>> paraview to handle larger files? is this a bug? could the original<br>> ascii data set have been corrupt and the error reflects now in the xml<br>
> file?<br>><br>> thanks in advance and best regards,<br>><br>> guenter<br>> _______________________________________________<br>> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>><br>> Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a><br>
><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><br><br><br><br>--<br>Robert Maynard<br></div>
</div>