You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the static tbb::global_control object in Embree sometimes affects the rest of the application using Embree.
Unfortunately I haven't been able to construct a simple example, so here is a rough explanation of what is happening in our application:
There are several tbb::task_arenas in our code which are given a parameter setting their maximum amount of threads. In between there is Embree code running. Sometimes when tbb::task_arenas are supposed to run single threaded they instead run multi threaded, but only if Embree code has run before.
So far I haven't been able to find the exact cause. The parameters for the tbb::task_arenas are set correctly at all times. Setting tbb::global_control immediately before every tbb::task_arena creation (and resetting afterwards) leads to the original/desired behaviour. Because tbb::global_control only has an effect during its lifetime, my guess is that the static one in Embree might mess up the rest of the application.
Thread counts behave as desired with TBB v2021.5.0 (interface version 12050) and Embree v3.13.4.
With TBB v2021.13.0 (Interface version 12130) thread counts misbehave, both with Embree v3.13.4 and v4.3.3. Since it only seems to happen in combination with Embree I'm quite sure that it's an Embree problem nonetheless.
This affects both Windows and Linux (WSL).
The text was updated successfully, but these errors were encountered:
It seems like the
static tbb::global_control
object in Embree sometimes affects the rest of the application using Embree.Unfortunately I haven't been able to construct a simple example, so here is a rough explanation of what is happening in our application:
There are several
tbb::task_arena
s in our code which are given a parameter setting their maximum amount of threads. In between there is Embree code running. Sometimes whentbb::task_arena
s are supposed to run single threaded they instead run multi threaded, but only if Embree code has run before.So far I haven't been able to find the exact cause. The parameters for the
tbb::task_arena
s are set correctly at all times. Settingtbb::global_control
immediately before everytbb::task_arena
creation (and resetting afterwards) leads to the original/desired behaviour. Becausetbb::global_control
only has an effect during its lifetime, my guess is that thestatic
one in Embree might mess up the rest of the application.Thread counts behave as desired with TBB v2021.5.0 (interface version 12050) and Embree v3.13.4.
With TBB v2021.13.0 (Interface version 12130) thread counts misbehave, both with Embree v3.13.4 and v4.3.3. Since it only seems to happen in combination with Embree I'm quite sure that it's an Embree problem nonetheless.
This affects both Windows and Linux (WSL).
The text was updated successfully, but these errors were encountered: