About OpenMP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

For those who are familiar with OpenMP, I want to assign each of  my OpenMP threads to a physical core and I have found that it can be achieved by using the ``GOMP_CPU_AFFINITY`` environment  variable. In its documentation (https://gcc.gnu.org/onlinedocs/libgomp/GOMP_005fCPU_005fAFFINITY.html) it uses words like "Binds threads to specific CPUs". I am just wondering what does it mean by CPU here? A physical core? A real CPU? A logical core?

Say if I run my program using something like this: "GOMP_CPU_AFFINITY="0 1 2 3" ./bin/mp.bin", and I am allocating three threads inside the program, and I am on a 16 core machine, does this gurante that my threads will be allocated to Core 0 1 2? 

Thanks a lot.

Best,
Bob
=====================================================
Bob Fang
MPhill Advanced Computer Science Student at Computer Lab, University of Cambridge.
Contact Address: Churchill College, Cambridge. CB3 0DS




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux