This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/42624] libstdc++ parallel mode deadlocks in barrier



------- Comment #16 from singler at kit dot edu  2010-01-15 14:29 -------
First, let's remove superfluous #pragma omp single in two occurences, to make
things simpler (see attached patch for trunk).
The problem still persists, the program deadlocks.

When dropping in some prints (see attached patch), the log ends like this:

find going parallel, requesting 2 thread
thread 0 of 2 starts
thread 0 finished
thread 1 of 2 starts
thread 1 finished
successful join
find going parallel, requesting 2 thread
thread 0 of 2 starts
thread 0 finished

Analysis: Thread 1 never starts (or at least does not reach the first printf).
In general, for more threads, only thread 0 starts.  This obviously leads to
the deadlock.

So on first sight, I would blame it on the OpenMP implementation.  Maybe yet
some interference with the pthreads.  Any other explanations?


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]