[vtkusers] using vtkXMLPMultiBlockDataWriter

Andrew Corrigan acorriga at lcp.nrl.navy.mil
Tue Dec 6 11:58:10 EST 2011


When I export structured or unstructured grids in parallel the only change beyond the serial version of my code was to use vtkXMLPUnstructuredGridWriter or vtkXMLPStructuredGridWriter and then prior to calling Write(), first call SetNumberOfPieces with the total number of MPI ranks, and  SetStartPiece and SetEndPiece with the processor's MPI rank.

vtkXMLPMultiBlockDataWriter, on the other hand, lacks this interface.    When I run my code in serial and export multi-block grids using vtkXMLMultiBlockDataWriter it works without any problem.  When I run in parallel, without doing anything different, except using the parallel writer, my code crashes when it calls Write().  What do I have to add to make vtkXMLPMultiBlockDataWriter work in parallel with MPI? I understand my question is a bit vague, but any hints or just pointing me in the right direction would be a big help.  So far I've looked at the header file for this parallel writer and googled around but haven't been able to figure out how to use the multi-block parallel writer.  Perhaps I am completely misunderstanding the way VTK handles multi-block datasets in parallel.

Thanks,
Andrew Corrigan


More information about the vtkusers mailing list