parsec
parsec copied to clipboard
OpenMP aware core binding
Original report by Thomas Herault (Bitbucket: herault, GitHub: therault).
It appears that if
OMP_PROC_BIND=true
is set in the environment, and we link with libgomp,
parsec_init()
will bind all the threads on the same core.
It’s possible that libgomp reduced the binding mask to 0x1, and then when calling parsec_init() with -1 for the number of cores, parsec tries to accomodate the binding and does not create computational threads. Or it’s possible that libgomp prevents parsec to bind on other cores.
However, tests with -c 8 show that every thread created (assumedly 8 ) are running on the same core (0).
The binding process in parsec_init should read the actual binding after a process is bound, check that the binding follows what was requested and at least that there is no over-subscription of any physical core by PaRSEC threads, and issue warnings when this is not the case.