[Bug libgomp/78289] OpenMP produces high CPU load if used in more than one process

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 10 14:38:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78289

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It is user's/programmer's responsibility to prevent oversubscribing the CPU. 
You can use OMP_NUM_THREADS=nn in environment, num_threads clause on parallel
region, or if you really want to oversubscribe the CPU, you can tune whether
the library will do busy waiting or not and how much (OMP_WAIT_POLICY=active,
OMP_WAIT_POLICY=passive, GOMP_SPINCOUNT=, affinity, ..., omp_* APIs that allow
to fine tune the earlier mentioned env var settings, etc.


More information about the Gcc-bugs mailing list