- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I notice that my program (compiled on Linux with ifort 11.1) ) executes OMP_THREADS_NUM+1 threads, and KMP_AFFINITY only binds OMP_THREADS_NUM threads. Why there is an extra thread? What is the extra thread doing?
Thanks
Pablo
I notice that my program (compiled on Linux with ifort 11.1) ) executes OMP_THREADS_NUM+1 threads, and KMP_AFFINITY only binds OMP_THREADS_NUM threads. Why there is an extra thread? What is the extra thread doing?
Thanks
Pablo
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In general, under Intel OpenMP, there are 2 additional supervisor threads. One of them is required by pthread library, and another by the Intel OpenMP library. In a properly written application (with suitable run-time affinity settings), the supervisor threads are suspended when the worker threads are active, so they don't interfere with performance. These additional threads are likely to be active during initial setup of thread pool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your answer.
I wonder though, what are the "requirements" of the threads libraries that prevent the main thread to be also the supervisor and create n-1 additional threads and then join the pool of threads.
Is it safe to assume that the supervisors do not participate at all to the computation? not even at the beginning when there is no parallel section?
Thanks,
Pablo
I wonder though, what are the "requirements" of the threads libraries that prevent the main thread to be also the supervisor and create n-1 additional threads and then join the pool of threads.
Is it safe to assume that the supervisors do not participate at all to the computation? not even at the beginning when there is no parallel section?
Thanks,
Pablo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure what you mean by "safe to assume." I suppose the occasional appearance of the supervisor threads can upset the physical allocation of worker threads to cores, if you don't invoke some mechanism such as (for Intel OpenMP) KMP_AFFINITY. The supervisor threads don't share the work which you specify to be distributed across threads in parallel regions; presumably they are active only for taking care of library tasks. I would not be at all surprised to see them active in the initial stages of OpenMP execution prior to beginning a parallel region.

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