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

How can I specify one-thread, multitple-chunks for debugging?

Moszkowicz__Uri1
Beginner
609 Views

I've got some crashes that I think are simply due to changes refactoring my code into multiple chunks. How can I run a TBB application where multiple chunks are created but only a single thread is used? This would allow me to reproduce problems in a debugger without having to also debug race conditions.

0 Kudos
2 Replies
Mark_L_Intel
Moderator
531 Views

I apologize for a long response time.


You can control the number of threads the following way:


    auto mp = tbb::global_control::max_allowed_parallelism;

  tbb::global_control gc(mp, nth + 1); // One more thread, but sleeping


0 Kudos
Mark_L_Intel
Moderator
511 Views

The Intel support for this issue ends due to no customer feedback.


0 Kudos
Reply