Bug 42712 - search_n/iterator.cc times out in parallel-mode
Summary: search_n/iterator.cc times out in parallel-mode
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Johannes Singler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 16:35 UTC by Paolo Carlini
Modified: 2010-01-19 12:08 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-01-12 17:43:17


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Carlini 2010-01-12 16:35:00 UTC
I'm consistently seeing this time out when regtesting make check-parallel. Is it unavoidable withing the current infrastructure? Besides slowing down the testing itself (not a very big issue, momentarily, I will commit an hack for this), seems a quite puzzling behavior to me: if parallel-mode runs orders of magnitude slower than serial-mode, shouldn't in principle at minimum fall back to the latter?
Comment 1 Johannes Singler 2010-01-12 17:43:17 UTC
Maybe rather an endless loop.
Comment 2 Paolo Carlini 2010-01-12 18:00:32 UTC
My impression is that for some reason it's just slow, very slow: with TEST_DEPTH=10 it completes in a decent amount of time...
Comment 3 Johannes Singler 2010-01-18 09:08:09 UTC
Paolo, you were right, it was just the fallback switch missing for this case.  And since this specific test issues many thousands of calls with very small input, the overhead was very noticeable.  Patch upcoming...
Comment 4 Paolo Carlini 2010-01-18 11:21:41 UTC
Excellent. If possible, I would suggest removing my temporary hack from the testcase together with the parallel-mode patch.
Comment 5 singler@gcc.gnu.org 2010-01-19 11:18:19 UTC
Subject: Bug 42712

Author: singler
Date: Tue Jan 19 11:18:03 2010
New Revision: 156036

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156036
Log:
2010-01-19  Johannes Singler  <singler@kit.edu>

        PR libstdc++/42712
        * include/parallel/settings.h (_Settings): Add search_minimal_n.
        * include/parallel/algo.h (__search_switch):
        Add serial fallback for too small inputs.
        (__search_n_switch): Likewise.  Call serial fallback on higher level
        to gain special treatment for __count 0 or 1.
        * testsuite/25_algorithms/search_n/iterator.cc:
        Reenable full test depth for parallel mode.


Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/parallel/algo.h
    trunk/libstdc++-v3/include/parallel/settings.h
    trunk/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc

Comment 6 Paolo Carlini 2010-01-19 12:08:09 UTC
Confirmed fixed, thanks!