From patchwork Mon Jun 20 21:04:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 101209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id A2E4CB6F7F for ; Tue, 21 Jun 2011 07:05:17 +1000 (EST) Received: (qmail 18401 invoked by alias); 20 Jun 2011 21:05:12 -0000 Received: (qmail 18333 invoked by uid 22791); 20 Jun 2011 21:05:08 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_YM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jun 2011 21:04:48 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5KL4igL008384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Jun 2011 17:04:44 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5KL4hiQ027327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Jun 2011 17:04:43 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p5KL4gs2014124; Mon, 20 Jun 2011 23:04:42 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p5KL4fQP014123; Mon, 20 Jun 2011 23:04:41 +0200 Date: Mon, 20 Jun 2011 23:04:41 +0200 From: Jakub Jelinek To: Mike Stump , Rainer Orth Cc: Jason Merrill , Nathan Froyd , gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [PATCH] parallelize gcc, gfortran and libstdc++ testing some more Message-ID: <20110620210441.GG16443@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20110617174709.GA3443@nightcrawler> <4DFF4B18.1070101@redhat.com> <20110620135459.GD16443@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110620135459.GD16443@tyan-ft48-01.lab.bos.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Mon, Jun 20, 2011 at 03:54:59PM +0200, Jakub Jelinek wrote: > On Mon, Jun 20, 2011 at 09:28:56AM -0400, Jason Merrill wrote: > > On 06/17/2011 08:20 PM, Mike Stump wrote: > > >On Jun 17, 2011, at 10:47 AM, Nathan Froyd wrote: > > >>I've done a lot of g++-only testsuite runs lately > > > > > >I think it is reasonable to have even more of them, say, if you have 16 cores and just test c++... I wonder what the scaling is like as we approach larger N. :-) > > > > In my test runs, one of the libstdc++ batches (normal3) takes longer > > than any of the g++ batches, so breaking that up would be more > > effective for me. :) > > Yeah, certainly, libstdc++ needs more parallelization most. > But, as I wrote already to Rainer in Autumn, the methodology > for splitting things up should be on a fast box look at > the time spent in each of the parts as reported by dejagnu > in the log files, and split it to make the jobs roughly even > sized with not overcomplicated patterns. So, here is a patch that parallelizes the longest test chunks on x86_64-linux some more. libstdc++ testing is now split into 10 jobs, roughly equally sized (used to be 4), check-gcc testing is now split into 10 jobs too (used to be 7, but the new division attempts to be more balanced, fastest job takes for me 8 minutes and longest job takes 11), and check-gfortran is now run in 7 jobs instead of 4. This should make these more comparable e.g. to check-g++ chunks etc. Regtested on x86_64-linux, verified the merged *.sum files are identical. Ok for trunk? 2011-06-20 Jakub Jelinek * Makefile.in (dg_target_exps): Set. (check_gcc_parallelize): Parallelize gcc testing into 10 jobs instead of 7, try to divide it more evenly. * Make-lang.in (check_gfortran_parallelize): Parallelize dg.exp into 6 jobs instead of 3. * testsuite/Makefile.am (check_DEJAGNU_normal_targets): Add check-DEJAGNUnormal[4-9]. (check-DEJAGNU): Split into 10 jobs for parallel testing instead of 4. * testsuite/Makefile.in: Regenerated. Jakub --- gcc/Makefile.in.jj 2011-06-15 11:54:43.000000000 +0200 +++ gcc/Makefile.in 2011-06-20 19:12:06.593450989 +0200 @@ -501,6 +501,10 @@ xm_include_list=@xm_include_list@ xm_defines=@xm_defines@ lang_checks=check-gcc lang_checks_parallelized=check-gcc +dg_target_exps:=alpha.exp,arm.exp,avr.exp,bfin.exp,cris.exp,frv.exp +dg_target_exps:=$(dg_target_exps),i386.exp,ia64.exp,m68k.exp,microblaze.exp +dg_target_exps:=$(dg_target_exps),mips.exp,powerpc.exp,rx.exp,s390.exp,sh.exp +dg_target_exps:=$(dg_target_exps),sparc.exp,spu.exp,xstormy16.exp # This lists a couple of test files that take most time during check-gcc. # When doing parallelized check-gcc, these can run in parallel with the # remaining tests. Each word in this variable stands for work for one @@ -514,10 +518,14 @@ lang_checks_parallelized=check-gcc # */ prefixed to it in runtest_file_p, it is usually desirable to include # a subdirectory name. check_gcc_parallelize=execute.exp=execute/2* \ - execute.exp=execute/\[013-9a-zA-Z\]* \ - compile.exp dg.exp \ - dg-torture.exp,builtins.exp \ - struct-layout-1.exp,unsorted.exp,stackalign.exp,i386.exp + execute.exp=execute/\[013-9a-fA-F\]* \ + execute.exp=execute/\[pP\]*,dg.exp \ + execute.exp=execute/\[g-oq-zG-OQ-Z\]*,compile.exp=compile/2* \ + compile.exp=compile/\[9pP\]*,builtins.exp \ + compile.exp=compile/\[013-8a-oq-zA-OQ-Z\]* \ + dg-torture.exp,ieee.exp \ + vect.exp,guality.exp,unsorted.exp \ + struct-layout-1.exp,stackalign.exp,$(dg_target_exps) lang_opt_files=@lang_opt_files@ $(srcdir)/c-family/c.opt $(srcdir)/common.opt lang_specs_files=@lang_specs_files@ lang_tree_files=@lang_tree_files@ --- gcc/fortran/Make-lang.in.jj 2011-05-24 23:59:28.000000000 +0200 +++ gcc/fortran/Make-lang.in 2011-06-20 20:29:29.986808197 +0200 @@ -171,9 +171,12 @@ check-fortran-subtargets : check-gfortra lang_checks += check-gfortran lang_checks_parallelized += check-gfortran # For description see comment above check_gcc_parallelize in gcc/Makefile.in. -check_gfortran_parallelize = dg.exp=gfortran.dg/\[a-cA-C\]* \ - dg.exp=gfortran.dg/\[d-mD-M\]* \ - dg.exp=gfortran.dg/\[n-zN-Z0-9\]* +check_gfortran_parallelize = dg.exp=gfortran.dg/\[adAD\]* \ + dg.exp=gfortran.dg/\[bcBC\]* \ + dg.exp=gfortran.dg/\[nopNOP\]* \ + dg.exp=gfortran.dg/\[isuvISUV\]* \ + dg.exp=gfortran.dg/\[efhkqrxzEFHKQRXZ\]* \ + dg.exp=gfortran.dg/\[0-9gjlmtwyGJLMTWY\]* # GFORTRAN documentation. GFORTRAN_TEXI = \ --- libstdc++-v3/testsuite/Makefile.am.jj 2011-03-03 10:37:23.000000000 +0100 +++ libstdc++-v3/testsuite/Makefile.am 2011-06-20 18:11:22.734808299 +0200 @@ -100,7 +100,7 @@ new-abi-baseline: @test ! -f $*/site.exp || mv $*/site.exp $*/site.bak @mv $*/site.exp.tmp $*/site.exp -check_DEJAGNU_normal_targets = $(patsubst %,check-DEJAGNUnormal%,0 1 2 3) +check_DEJAGNU_normal_targets = $(patsubst %,check-DEJAGNUnormal%,0 1 2 3 4 5 6 7 8 9) $(check_DEJAGNU_normal_targets): check-DEJAGNUnormal%: normal%/site.exp # Run the testsuite in normal mode. @@ -109,22 +109,17 @@ check-DEJAGNU $(check_DEJAGNU_normal_tar RANLIB="$(RANLIB)"; export RANLIB; \ if [ -z "$*$(filter-out --target_board=%, $(RUNTESTFLAGS))" ] \ && [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \ - $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNUnormal0 check-DEJAGNUnormal1 \ - check-DEJAGNUnormal2 check-DEJAGNUnormal3; \ - for idx in 0 1 2 3; do \ + $(MAKE) $(AM_MAKEFLAGS) $(check_DEJAGNU_normal_targets); \ + for idx in 0 1 2 3 4 5 6 7 8 9; do \ mv -f normal$$idx/libstdc++.sum normal$$idx/libstdc++.sum.sep; \ mv -f normal$$idx/libstdc++.log normal$$idx/libstdc++.log.sep; \ done; \ mv -f libstdc++.sum libstdc++.sum.sep; \ mv -f libstdc++.log libstdc++.log.sep; \ $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh \ - libstdc++.sum.sep normal0/libstdc++.sum.sep \ - normal1/libstdc++.sum.sep normal2/libstdc++.sum.sep \ - normal3/libstdc++.sum.sep > libstdc++.sum; \ + libstdc++.sum.sep normal[0-9]/libstdc++.sum.sep > libstdc++.sum; \ $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -L \ - libstdc++.log.sep normal0/libstdc++.log.sep \ - normal1/libstdc++.log.sep normal2/libstdc++.log.sep \ - normal3/libstdc++.log.sep > libstdc++.log; \ + libstdc++.log.sep normal[0-9]/libstdc++.log.sep > libstdc++.log; \ exit 0; \ fi; \ srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ @@ -140,13 +135,25 @@ check-DEJAGNU $(check_DEJAGNU_normal_tar $(RUNTESTFLAGS) abi.exp; \ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi; \ - dirs="`cd $$srcdir; echo [013-9][0-9]_*/* [ab]* de* [ep]*/*`";; \ + dirs="`cd $$srcdir; echo [013-9][0-9]_*/*`";; \ normal1) \ - dirs="`cd $$srcdir; echo 2[0-2]_*/*`";; \ + dirs="`cd $$srcdir; echo [ab]* de* [ep]*/*`";; \ normal2) \ - dirs="`cd $$srcdir; echo 2[4-9]_*/*`";; \ + dirs="`cd $$srcdir; echo 2[01]_*/*`";; \ normal3) \ - dirs="`cd $$srcdir; echo 23_*/* t*/*`";; \ + dirs="`cd $$srcdir; echo 22_*/*`";; \ + normal4) \ + dirs="`cd $$srcdir; echo 23_*/[a-km-tw-z]*`";; \ + normal5) \ + dirs="`cd $$srcdir; echo 23_*/[luv]*`";; \ + normal6) \ + dirs="`cd $$srcdir; echo 2[459]_*/*`";; \ + normal7) \ + dirs="`cd $$srcdir; echo 2[68]_*/*`";; \ + normal8) \ + dirs="`cd $$srcdir; echo 27_*/*`";; \ + normal9) \ + dirs="`cd $$srcdir; echo t*/*`";; \ esac; \ if [ -n "$*" ]; then cd "$*"; fi; \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ --- libstdc++-v3/testsuite/Makefile.in.jj 2011-03-08 11:39:33.199392326 +0100 +++ libstdc++-v3/testsuite/Makefile.in 2011-06-20 18:11:48.176808266 +0200 @@ -287,7 +287,7 @@ lists_of_files = \ extract_symvers = $(glibcxx_builddir)/scripts/extract_symvers baseline_subdir := $(shell $(CXX) --print-multi-dir) -check_DEJAGNU_normal_targets = $(patsubst %,check-DEJAGNUnormal%,0 1 2 3) +check_DEJAGNU_normal_targets = $(patsubst %,check-DEJAGNUnormal%,0 1 2 3 4 5 6 7 8 9) # Runs the testsuite, but in compile only mode. # Can be used to test sources with non-GNU FE's at various warning @@ -545,22 +545,17 @@ check-DEJAGNU $(check_DEJAGNU_normal_tar RANLIB="$(RANLIB)"; export RANLIB; \ if [ -z "$*$(filter-out --target_board=%, $(RUNTESTFLAGS))" ] \ && [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \ - $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNUnormal0 check-DEJAGNUnormal1 \ - check-DEJAGNUnormal2 check-DEJAGNUnormal3; \ - for idx in 0 1 2 3; do \ + $(MAKE) $(AM_MAKEFLAGS) $(check_DEJAGNU_normal_targets); \ + for idx in 0 1 2 3 4 5 6 7 8 9; do \ mv -f normal$$idx/libstdc++.sum normal$$idx/libstdc++.sum.sep; \ mv -f normal$$idx/libstdc++.log normal$$idx/libstdc++.log.sep; \ done; \ mv -f libstdc++.sum libstdc++.sum.sep; \ mv -f libstdc++.log libstdc++.log.sep; \ $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh \ - libstdc++.sum.sep normal0/libstdc++.sum.sep \ - normal1/libstdc++.sum.sep normal2/libstdc++.sum.sep \ - normal3/libstdc++.sum.sep > libstdc++.sum; \ + libstdc++.sum.sep normal[0-9]/libstdc++.sum.sep > libstdc++.sum; \ $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -L \ - libstdc++.log.sep normal0/libstdc++.log.sep \ - normal1/libstdc++.log.sep normal2/libstdc++.log.sep \ - normal3/libstdc++.log.sep > libstdc++.log; \ + libstdc++.log.sep normal[0-9]/libstdc++.log.sep > libstdc++.log; \ exit 0; \ fi; \ srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ @@ -576,13 +571,25 @@ check-DEJAGNU $(check_DEJAGNU_normal_tar $(RUNTESTFLAGS) abi.exp; \ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi; \ - dirs="`cd $$srcdir; echo [013-9][0-9]_*/* [ab]* de* [ep]*/*`";; \ + dirs="`cd $$srcdir; echo [013-9][0-9]_*/*`";; \ normal1) \ - dirs="`cd $$srcdir; echo 2[0-2]_*/*`";; \ + dirs="`cd $$srcdir; echo [ab]* de* [ep]*/*`";; \ normal2) \ - dirs="`cd $$srcdir; echo 2[4-9]_*/*`";; \ + dirs="`cd $$srcdir; echo 2[01]_*/*`";; \ normal3) \ - dirs="`cd $$srcdir; echo 23_*/* t*/*`";; \ + dirs="`cd $$srcdir; echo 22_*/*`";; \ + normal4) \ + dirs="`cd $$srcdir; echo 23_*/[a-km-tw-z]*`";; \ + normal5) \ + dirs="`cd $$srcdir; echo 23_*/[luv]*`";; \ + normal6) \ + dirs="`cd $$srcdir; echo 2[459]_*/*`";; \ + normal7) \ + dirs="`cd $$srcdir; echo 2[68]_*/*`";; \ + normal8) \ + dirs="`cd $$srcdir; echo 27_*/*`";; \ + normal9) \ + dirs="`cd $$srcdir; echo t*/*`";; \ esac; \ if [ -n "$*" ]; then cd "$*"; fi; \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \