[vtkusers] Slower rendering with OpenMP and Python?

Fahlgren, Eric eric.fahlgren at smith-nephew.com
Tue Jan 15 18:53:09 EST 2019


Seeing Felix's thread on attempts to speed up his contour filtering, I wanted to try this myself.  So, Windows 10, VTK 8.1.2, MSVC 2017, Python 3.7, installed MS MPI tools and SDK v 10.0.

I added these to my configuration script:

        -D VTK_SMP_IMPLEMENTATION_TYPE:STRING=OpenMP                 \
        -D Module_vtkFiltersParallelFlowPaths:BOOL=ON                \
        -D Module_vtkFiltersParallelGeometry:BOOL=ON                 \
        -D Module_vtkFiltersParallelStatistics:BOOL=ON               \
        -D Module_vtkFiltersParallelVerdict:BOOL=ON                  \
        -D Module_vtkParallelMPI4Py:BOOL=ON                          \
        -D Module_vtkRenderingParallel:BOOL=ON                       \
        -D Module_vtkRenderingParallelLIC:BOOL=ON                    \

The test is an animation sequence of the lower spine in a flexion-extension event with a dozen bones, most set to 50% transparency and texture mapped, various other synthetic geometry like cylinders and toroids, pretty simple stuff (no images of any sort, so no pixels or voxels).  Animation does reconfigure some rubber-banding objects (spinal discs and some cables from the test rig), but mostly the geometry remains as-is and the rendering at new xforms is the overwhelming time sink.

The SMP=Sequential baseline runs on Intel i7-7700k with HD 630 integrated graphics at 35 FPS.  With all the above parallelism enabled, it's at about half that, best case maybe 18 FPS.  Notably, the CPU usage is 12% (typical one thread on an 8-thread CPU) with Sequential, but pegs 80-90% with OpenMP enabled.

When we test on a machine with a GPU, GTX 1050 Ti, we see the baseline for SMP=Sequential is about 41 FPS, but with OpenMP it's 18 FPS here, too.  CPU usage is same as above, one-thread max with Sequential and "use it all" with OpenMP.

Is this expected for this mix of mostly static geometry?  Or am I setting the wrong configuration variables?  Or am I just doing something dumb?

Thanks,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190115/e394b6a1/attachment.html>


More information about the vtkusers mailing list