public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/55411] New: OMP threads lose their OMP_WAIT_POLICY when another OMP thread gets destructed
@ 2012-11-20 10:03 jk3064 at arcor dot de
  2012-11-20 10:04 ` [Bug libgomp/55411] " jk3064 at arcor dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jk3064 at arcor dot de @ 2012-11-20 10:03 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55411

             Bug #: 55411
           Summary: OMP threads lose their OMP_WAIT_POLICY when another
                    OMP thread gets destructed
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jk3064@arcor.de


So there are 2 bugs:
 * the omp workers of a boost::thread are ignoring OMP_WAIT_POLICY
 * once the boost::thread gets destructed the main-thread's omp worker's
WAIT_POLICY get lost

used to compile the example:
g++ -fopenmp -lgomp -lboost_system -lboost_thread-mt -o foo.bin -O2 foo_omp.c

tested with gentoo:
Just run the example with `export OMP_WAIT_POLICY="ACTIVE"` and watch it in
another window with htop. First all created omp threads use 100%, then the
boost::thread and its omp workers are spawned (all with ~0% cpu usage, still
the main-thread's omp workers use 100%). Then the boost::thread gets destructed
and the main-threads omp workers fallback to 0% cpu usage.

PS: It would be nice if there was a GOMP_DEBUG to enable a more verbose output,
esp. to debug GOMP_SPINCOUNT & OMP_PROC_BIND.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-12-02 17:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-20 10:03 [Bug libgomp/55411] New: OMP threads lose their OMP_WAIT_POLICY when another OMP thread gets destructed jk3064 at arcor dot de
2012-11-20 10:04 ` [Bug libgomp/55411] " jk3064 at arcor dot de
2012-11-21  2:14 ` pinskia at gcc dot gnu.org
2012-11-21  3:20 ` jk3064 at arcor dot de
2012-11-21 10:31 ` jakub at gcc dot gnu.org
2012-11-21 20:30 ` jakub at gcc dot gnu.org
2012-11-21 20:32 ` jakub at gcc dot gnu.org
2012-12-02 17:26 ` jk3064 at arcor dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).