# Are there any prebuilt python wheel with openmp support?

**URL:** https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906
**Category:** Support
**Tags:** python
**Created:** [March 7, 2023, 5:14am UTC](https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906 "2023-03-07T05:14:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![turtleizzy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/turtleizzy/32/3227_2.png) [@turtleizzy](https://discourse.vtk.org/u/turtleizzy)
#### Post date: [March 7, 2023, 5:14am UTC](https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906/1 "2023-03-07T05:14:13Z")

</div>

It seems official python wheels were built without parallelization (openmp or tbb) support even if a handful of filters had vtkSMPTools support.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [March 8, 2023, 8:30am UTC](https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906/2 "2023-03-08T08:30:22Z")

</div>

@seanm @ben.boeckel @Charles_Gueunet

---

<div class="post-metadata">

### Author: ![Charles\_Gueunet](https://discourse.vtk.org/user_avatar/discourse.vtk.org/charles_gueunet/32/239_2.png) [@Charles\_Gueunet](https://discourse.vtk.org/u/Charles_Gueunet)
#### Post date: [March 8, 2023, 8:49am UTC](https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906/3 "2023-03-08T08:49:02Z")

</div>

I would think stdThread would be the best back-end to use as it does not requires external dependency.  
There are still some issues to set this backend as default VTK wide, wich would ends up in the python wheel as weel. I will try to update the current status. The result of [this pipeline](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8739/pipelines?commit_id=f7b617e05522aeb788c630421fa4ba994573a4a0) will be used to update the [main issue](https://gitlab.kitware.com/vtk/vtk/-/issues/18222).

---

<div class="post-metadata">

### Author: ![turtleizzy](https://discourse.vtk.org/user_avatar/discourse.vtk.org/turtleizzy/32/3227_2.png) [@turtleizzy](https://discourse.vtk.org/u/turtleizzy)
#### Post date: [March 8, 2023, 8:52am UTC](https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906/4 "2023-03-08T08:52:46Z")

</div>

Openmp also seems to be feasible cause almost all modern c++ compilers already have built-in support.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [March 8, 2023, 8:55am UTC](https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906/5 "2023-03-08T08:55:41Z")

</div>

Not on windows, no.

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [March 8, 2023, 11:42am UTC](https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906/6 "2023-03-08T11:42:22Z")

</div>

Charles I agree std::thread is probably the best backend in terms of eliminating dependencies etc. However, I have found cases where it is much, much slower than TBB (e.g. 2X) since it appears that its load balancing is poor. std::thread also seems to be very brittle. Ideally it would be nice to put VTK’s best foot forward if at all possible.

---

<div class="post-metadata">

### Author: ![Charles\_Gueunet](https://discourse.vtk.org/user_avatar/discourse.vtk.org/charles_gueunet/32/239_2.png) [@Charles\_Gueunet](https://discourse.vtk.org/u/Charles_Gueunet)
#### Post date: [March 8, 2023, 1:08pm UTC](https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906/7 "2023-03-08T13:08:26Z")

</div>

Part of these performance issue are to be addressed soon [in the following MR](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10027). Once merged, I plan to update the status of the stdThread back-end. First ensuring all tests are green, then to check the perf.  
For now on, even with the mentioned MR, the work stealing will be less advanced than the TBB one, leading to possible imbalance, but we have some tricks to try.

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [March 8, 2023, 1:23pm UTC](https://discourse.vtk.org/t/are-there-any-prebuilt-python-wheel-with-openmp-support/10906/8 "2023-03-08T13:23:02Z")

</div>

Most excellent, I’m looking forward to seeing how this turns out
