This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/33893] New: [parallel mode] Algorithms rely on omp_set_dynamic(false)
- From: "singler at ira dot uka dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2007 12:31:57 -0000
- Subject: [Bug libstdc++/33893] New: [parallel mode] Algorithms rely on omp_set_dynamic(false)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The code in many places assumes that if it uses
num_threads (num_threads), that many threads will be
created. But that's not guaranteed if omp_set_dynamic (true)
and the library shouldn't tweak that. num_threads will
be the maximum number of threads that are created, that's
guaranteed, but you should check omp_get_num_threads ()
at runtime to see how many were created and how to divide
the work.
There is no easy failing test case so far, since the algorithms initialize the
num_thread clause with omp_get_max_threads(), which is already appropriately
reduced by the runtime library in the dynamic setting, so everything works
fine. Nevertheless, this issue should be addressed.
--
Summary: [parallel mode] Algorithms rely on
omp_set_dynamic(false)
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: singler at ira dot uka dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33893