Software Archive
Read-only legacy content
17061 Discussions

Implementation of OpenMP Scatter, Compact and Balanced Mode

CPati2
New Contributor III
6,003 Views

Hi All,

If I am correct, then OpenMP thread distribution modes like scatter, compact and balanced are implemented specifically for Xeon Phi and aren't supported in general by OpenMP library.

Is there any documentation that I can refer to understand how this is implemented? In other words, what part of the code and of which library or software is called when we set environment variables like: KMP_AFFINITY=<compact/scatter/balanced>?

Thanks. 

0 Kudos
1 Solution
CPati2
New Contributor III
5,738 Views

Hi John, Tim and Jim,

I found the source code of Intel OpenMP hosted here.

Basically, if anyone modifies this code, then compiles and points to use this library, then the system will use new implementation rather than the default one. This is what I wanted to understand.

Thanks.

View solution in original post

0 Kudos
21 Replies
Roz__Foeed
Beginner
684 Views

Hi John,

I think my question is not regarding this.

I give compact enough resources to run 8 threads. In first case I give it 64 (I am not turning any cores off via sysfs before running benchmark in compact mode) cores to spawn 8 threads, so compact will fill core 0 and 1 with all 8 threads.

In second case I am giving compact mode 2 cores (i.e. 4 threads per core == 8 threads AND I am turning 62 cores off and only 2 cores are online via sysfs before running the benchmark in compact mode),  so it should fill all these cores with threads task.

Difference is number of cores that are online (via sysfs). So, is it that compact mode calculates how to map threads based on how many cores are online via sysfs kerala? OR is it that OS task apart from the benchmark running are affecting this due to less number of physical cores available to schedule task?

I don't see performance degradation when I do similar analysis for scatter mode.

Thanks.

0 Kudos
Reply