(Lack of) Documentation and Examples of Parallel (MPI) VTK

I’ve noticed that there are no parallel vtk demonstrations other than what’s presented in these pair of blogs. Even then, they are focused on Python implementation and on “low level” uses of it (ie. basics of sending data between ranks, using MPI collectives, etc.). I’ve yet to find anything that explicitly uses the parallelized filters/readers in vtk, such as vtkXMLPUnstructuredGridReader or vtkPResampleWithDataSet (the two I’m particularly interested in at the moment).

There’s a previously unanswered forum post trying to troubleshoot an implementation of vtk parallel algorithm, but it doesn’t try to use any actual parallelized vtk functions.

There’s also a brief description of the parallel pipeline in a wiki article, but this again feels incomplete.

Is there some resource that I’m missing that documents a “full” parallel vtk program? Ie. Parallel read, parallel filter, and parallel write?


Hopefully to maybe contribute to this gap, here’s a list of things that appears to be important for this workflow (but how exactly I’m supposed to use them together remains a mystery):

  • vtkMPIController: Effectively replaces standard MPI commands for VTK’s use
  • vtkStreamingDemandDrivenPipeline: Appears to be how work is handed out to processors and how results are communicated. I would assume this uses vtkMPIController on the backend.

The simplest approach is to look at existing implementation and parallel tests.

This is complex to document and generalize as it get tricky really fast, only the wiki article you found exists and gives you the basics.

There is also a dedicated course: VTK Advanced Training | Kitware Europe

Thanks for the reply! I couldn’t find much in the way of implementation before, but I forgot to check for tests. This one in particular was helpful for me.


1 Like