[Bug libstdc++/33893] New: [parallel mode] Algorithms rely on omp_set_dynamic(false)

singler at ira dot uka dot de gcc-bugzilla@gcc.gnu.org
Thu Oct 25 12:32:00 GMT 2007


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



More information about the Gcc-bugs mailing list