Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

flow_graph thread harmonization with OpenMP ?

nyue
Novice
447 Views

I am developing a node which calls external code/function that are OpenMP aware, what is the best practice of passing the maximum number of threads to the underlying OpenMP code so that everyone play nice and respect the overall threads count availability. Is there some function I can query in flow_graph in regards to available thread so that I don't oversubscribe for the underlying OpenMP code.

 

Kind regards

 

0 Kudos
3 Replies
NoorjahanSk_Intel
Moderator
418 Views

Hi,


Thanks for posting in intel communities.


You can use the async_node of OneTBB to call external code/function.

Please refer to the below link for more details:

https://spec.oneapi.io/versions/1.1-rev-1/elements/oneTBB/source/flow_graph/async_node_cls.html


OneTBB workload is balanced dynamically between worker threads every time. The number of worker threads processing a parallel construction always changesdepending on workload. Both OneTbb and OpenMP threads will be active.


Please refer to the below link for more details:

https://oneapi-src.github.io/oneTBB/main/tbb_userguide/appendix_B.html


You can query the number of threads by referring to the below link

https://oneapi-src.github.io/oneTBB/main/tbb_userguide/Migration_Guide/Task_Scheduler_Init.html


Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
400 Views

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
383 Views

Hi,


I have not heard back from you, so I will close this inquiry now. If you need further assistance, please post a new question.


Thanks & Regards,

Noorjahan.


0 Kudos
Reply