VTK/Parallel

From KitwarePublic
< VTK
Revision as of 22:46, 21 November 2008 by Edice (talk | contribs) (New page: This is a spot to start documenting the ins and outs of making VTK work in parallel at the various levels. The page has been started by someone who is new to VTK, so there are probably er...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This is a spot to start documenting the ins and outs of making VTK work in parallel at the various levels. The page has been started by someone who is new to VTK, so there are probably errors in here. Other people will hopefully assist with fleshing out this page. Formatting will be sparse for the moment, I'll just put down my thoughts to begin with.

There doesn't seem to be much solid documentation for VTK in parallel. The mailing list gets regular questions, and I personally haven't come away from reading replies knowing everything I wanted to know.


There are several levels and meanings of "Parallel":

Loop-Level (compiler extensions, very fine)

This can be achieved via the new OpenMP features of GCC, Microsoft's Visual C++ (pro, not express) and Intel's icc. icc can also support Intels Thread Building Blocks (did I read that gcc also supports TBB?).

A loop can be run in parallel via compiler extensions. The only concern is whether the data it is accessing is thread-safe.

http://www.openmp.org

http://en.wikipedia.org/wiki/OpenMP


Algorithm-Level (threads, MPI, fine)

The algorithm has a parallel mode of operation built-in. Well-written quote from the mailing list:

Many of VTK's imaging filters support thread level parallelism. When VTK is compiled with threading support, those filters in the Imaging kit will automatically spawn threads to take advantage of the available parallelism near to the innermost loop. When processing this type of data, threading is fairly easy to do and scales, in terms of execution time, very well.

I assume that its up to the filter-writer as to how this can be implemented, and could also be done with MPI, sockets and processes, SOAP over web services, phone-a-friend and ask-the-audience. VTK does not provide any support for these alternate methods, but it does provide support for threading image filters via vtkThreadedImageAlgorithm.


Filter/Task-Level (threads, MPI, coarse)