- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
is there a way in icc's openmp implementation to force openmp threads to be bound onto processors according to a specific arrangement? For example, if we have an SMP of multicores and an openmp application with 2 threads, how would we map the threads onto different physical packages or onto the same package but different cores? I know that Linux affinity system calls do exactly this job, but I am not sure how they could be incorporated easily and incrementaly in parallel constructs such as for loops.
Thanks in advance
is there a way in icc's openmp implementation to force openmp threads to be bound onto processors according to a specific arrangement? For example, if we have an SMP of multicores and an openmp application with 2 threads, how would we map the threads onto different physical packages or onto the same package but different cores? I know that Linux affinity system calls do exactly this job, but I am not sure how they could be incorporated easily and incrementaly in parallel constructs such as for loops.
Thanks in advance
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If your requirements don't justify the complication of affinity calls, have you considered using taskset(1) ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, so " taskset [mask] -- [command] [arguments] " seems to do the work for me, supposing that: 1) all forked threads inherit the affinity mask of the master thread, and 2) the Linux scheduler distributes application's threads in such way that the total workload is balanced accross the cpus corresponding to 'mask'. I think that the current Linux scheduler actually does both jobs, doesn't it?
But, as a general discussion, it seems to me weird that the openmp standard or a popular implementation of openmp such as this provided by icc, have not yet incorporated such cpu affinity extensions, given that we are entering the multicore era.
Anyway, thanks a lot!
But, as a general discussion, it seems to me weird that the openmp standard or a popular implementation of openmp such as this provided by icc, have not yet incorporated such cpu affinity extensions, given that we are entering the multicore era.
Anyway, thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
A mechanism to control the order of mapping OpenMP threads to physical processors (sockets), cores and logical processors has recently been implemented in an update to the Intel compiler 9.1.A description has not yet been incorporated into the main compiler documentation;however, if you care to submit a request to Intel Premier Support at https://premier.intel.com, and mention my name (Martyn), I shall be happy to send you a copy of the preliminary documentation.The feature will be fully documented in the next major version of the Intel compiler.
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