fix internal/external OpenMP thread affinity clash
authorSzilard Pall <pszilard@cbr.su.se>
Mon, 24 Sep 2012 21:54:50 +0000 (23:54 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 31 Oct 2012 01:37:26 +0000 (02:37 +0100)
commitc68d61e160d3c805a86af76b6c4d1814aaa516e5
tree63306f3c5672fa0feb94d8eeabdf370a539aa6f9
parent2b20403823e1376b134979933fdc3dd28071e2b9
fix internal/external OpenMP thread affinity clash

Thread affinity set by the OpenMP library, either automatically or
requested by the user through environment variables, can conflict with
the mdrun internal affinity setting.
To avoid performance degradation, as Intel OpenMP has affinity setting
on by default, we will explicitly disable it unless the user manually
set OpenMP affinity through one of the KMP_AFFINITY or GOMP_CPU_AFFINITY
environment variables. If any of these variables is set, we honor the
externally set affinity and turn off the internal one.

Change-Id: I78c6347154d6f11695ee04243db17bbb2e5cb0a7
include/gmx_omp.h
src/gmxlib/gmx_omp.c
src/kernel/runner.c