[vtkusers] parallel mesh reading and writing
John Biddiscombe
biddisco at cscs.ch
Thu Jan 25 05:27:22 EST 2007
Karl
>
> Thank you for your very detailed review of the subject. Indeed, I
> have to concur with yours and Kevin's comments (earlier on the
> thread) using the vtkXMLP* classes makes it very easy. We did indeed
> get an implementation that worked within a couple of hours and that is
> very appealing. Nonetheless, I still see some major advantages to
> dealing with one file instead of 1700 files as you mention in your
> later post. So . . . in your experience, how difficult would it be
> to write a general vtkHDF5UnstructuredGridReader/Writer? Would you
> be willing to contribute to such a project? The vtkExodus reader
> already introduces a dependency on netcdf and supposedly the next
> version of netcdf will be a layer on top of HDF5. So, there may be an
> implicit dependency on HDF5 within vtk in the future.
In my experience it would not be difficult to write a /*simple
*/parallel IO vtkHDF5UnstructuredGridReader/Writer : IF we can assume
that the zones on each processor are distinct and no geometry needs to
be "filtered" in any way before writing.
Simply do a gather operation to find the total number of points, each
processor writes out it's lot using the appropriate data space. Then do
the same for Cells etc, but with each processor incrementing it's
cell-points ID numbers to account for the other processors who are
writing out in earlier positions. Same for all the other arrays. Then
scalars are written in a similar manner.
If the geometry is fixed for subsequent time steps, then the scalars can
be written out as groups in time order. If the geometry is changing, new
groups would need to hold geom and scalars per time step. some
convention would need to be agreed on on how to lay it out.
If the mesh was partly duplicated on separate processors and needed to
be filtered in some way. then things get messy and a lot more work would
be needed.
For the simple case, check here for particle read write code (NB. I'll
be updating this soon with some more routines). This would give you a
good starting point.
https://svn.cscs.ch/vtkContrib/trunk/vtkCSCS/vtkH5Part/
Would I like to help? The answer is really, "when I need it!" - I do
have some particle data with geometry as well (particles bouncing off
objects etc), so I will need it eventually, but I don't know when...so
I'm not willing to commit myself right now.
JB
--
John Biddiscombe, email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
More information about the vtkusers
mailing list