- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using a Core i7-6700 CPU. Why does tbb create only one thread by default?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suppose it is caused by the affinity mask of the calling thread. task_scheduler_init respects the affinity mask of the calling thread and, if only one bit is set, it can return 1. Do you use other threading models inside your application? Try to call task_scheduler_init::default_num_threads in the beginning of the main function. However, the affinity mask can be set externally, e.g. with the taskset utility. What OS do you use and how the application is launched?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alex (Intel) wrote:
I suppose it is caused by the affinity mask of the calling thread. task_scheduler_init respects the affinity mask of the calling thread and, if only one bit is set, it can return 1. Do you use other threading models inside your application? Try to call task_scheduler_init::default_num_threads in the beginning of the main function. However, the affinity mask can be set externally, e.g. with the taskset utility. What OS do you use and how the application is launched?
Hi Alex,
This problem is indeed caused by another library I use, namely dlib.
I'm using Arch Linux so I used the package on AUR. It constraints all the threads to only one core.
However, when I compiled dlib from source, the problem disappears.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page