Patchwork RE: Testsuite / Cilk Plus: Include library path in compile flags in gcc.dg/cilk-plus/cilk-plus.exp

login
register
mail settings
Submitter aldot
Date Nov. 8, 2013, 12:09 p.m.
Message ID <CAC1BbcQDtx64ps4X2uXH9THpzzo6jVNF9DUJwVm_RbMM0HHvsw@mail.gmail.com>
Download mbox | patch
Permalink /patch/289819/
State New
Headers show

Comments

aldot - Nov. 8, 2013, 12:09 p.m.
On 6 November 2013 08:04, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Nov 06, 2013 at 02:24:01AM +0000, Iyer, Balaji V wrote:
>>     Fixed patch is attached. The responses to your question are given below. Is this patch OK?
>>
>> Here is the ChangeLog entry:
>>
>> +2013-11-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
>> +
>> +       * c-c++-common/cilk-plus/CK/fib.c: Reduced the iteration from
>> +       40 to 30.  Replaced iteration variable with a #define.  Instead of
>> +       returning non-zero value for error, called __builtin_abort ().  Fixed
>> +       a bug of calling fib_serial in serial case instead of fib.
>> +       * c-c++-common/cilk-plus/CK/fib_init_expr_xy.c: Likewise.
>> +       * c-c++-common/cilk-plus/CK/fib_no_return.c: Likewise.
>> +       * c-c++-common/cilk-plus/CK/fib_no_sync.c: Likewise.
>> +       * gcc.dg/cilk-plus/cilk-plus.exp: Removed duplicate/un-necessary
>> +       compiler flag testing.
>
> Ok.
Balaji,
May i suggest you rephrase the .exp so it does not line-wrap and is
actually readable like in attached (untested) 01 or at least 00?

Thanks for your consideration..
Mike Stump - Nov. 8, 2013, 6:01 p.m.
On Nov 8, 2013, at 4:09 AM, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
> On 6 November 2013 08:04, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Wed, Nov 06, 2013 at 02:24:01AM +0000, Iyer, Balaji V wrote:
>>>    Fixed patch is attached. The responses to your question are given below. Is this patch OK?

> May i suggest you rephrase the .exp so it does not line-wrap and is
> actually readable like in attached (untested) 01 or at least 00?

I like the direction irrespective of line length.  :-)
Iain Sandoe - Nov. 8, 2013, 8:27 p.m.
hi Balaji,

On 8 Nov 2013, at 10:01, Mike Stump <mikestump@comcast.net> wrote:

> On Nov 8, 2013, at 4:09 AM, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
>> On 6 November 2013 08:04, Jakub Jelinek <jakub@redhat.com> wrote:
>>> On Wed, Nov 06, 2013 at 02:24:01AM +0000, Iyer, Balaji V wrote:
>>>>   Fixed patch is attached. The responses to your question are given below. Is this patch OK?
> 
>> May i suggest you rephrase the .exp so it does not line-wrap and is
>> actually readable like in attached (untested) 01 or at least 00?
> 
> I like the direction irrespective of line length.  :-)


the  current cilk-plus c testsuite  is now much more realistic in run-time (2:40mins vs. 160mins on my laptop)
however:

(i)  it still fails to call " set_ld_library_path_env_vars " and thus fails to work properly on Darwin as described in a previous mail.

(ii) it still does not work for installed testing viz:

runtest --tool gcc --target_board=xxxx cilk-plus.exp
(with some suitable xxxx and site.exp for your setup).

(iii) I remain surprised (as perhaps was Jeff) that existing torture facilities were not the best solution for this.

cheers
Iain
Iyer, Balaji V - Nov. 8, 2013, 8:31 p.m.
> -----Original Message-----
> From: Iain Sandoe [mailto:iain@codesourcery.com]
> Sent: Friday, November 8, 2013 3:28 PM
> To: Iyer, Balaji V
> Cc: Bernhard Reutner-Fischer; Jakub Jelinek; Joseph S. Myers; Tobias Burnus;
> gcc patches; Mike Stump
> Subject: Re: [PATCH] Testsuite / Cilk Plus: Include library path in compile flags
> in gcc.dg/cilk-plus/cilk-plus.exp
> 
> hi Balaji,
> 
> On 8 Nov 2013, at 10:01, Mike Stump <mikestump@comcast.net> wrote:
> 
> > On Nov 8, 2013, at 4:09 AM, Bernhard Reutner-Fischer
> <rep.dot.nop@gmail.com> wrote:
> >> On 6 November 2013 08:04, Jakub Jelinek <jakub@redhat.com> wrote:
> >>> On Wed, Nov 06, 2013 at 02:24:01AM +0000, Iyer, Balaji V wrote:
> >>>>   Fixed patch is attached. The responses to your question are given
> below. Is this patch OK?
> >
> >> May i suggest you rephrase the .exp so it does not line-wrap and is
> >> actually readable like in attached (untested) 01 or at least 00?
> >
> > I like the direction irrespective of line length.  :-)
> 
> 
> the  current cilk-plus c testsuite  is now much more realistic in run-time
> (2:40mins vs. 160mins on my laptop)
> however:
> 
> (i)  it still fails to call " set_ld_library_path_env_vars " and thus fails to work
> properly on Darwin as described in a previous mail.
> 

I am planning to look into this next week and as soon as I get  a solution, I will send out a patch.

> (ii) it still does not work for installed testing viz:
> 
> runtest --tool gcc --target_board=xxxx cilk-plus.exp (with some suitable xxxx
> and site.exp for your setup).
> 
I will look into this also.

> (iii) I remain surprised (as perhaps was Jeff) that existing torture facilities
> were not the best solution for this.
> 
> cheers
> Iain
> 
> 

Thanks,

Balaji V. Iyer.

Patch

Index: gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
===================================================================
--- gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp	(revision 204561)
+++ gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp	(working copy)
@@ -25,31 +25,40 @@ 
 
 verbose "$tool $libdir" 1
 set library_var [get_multilibs]
-# Pointing the ld_library_path to the Cilk Runtime library binaries. 
+# Pointing the ld_library_path to the Cilk Runtime library binaries.
 set ld_library_path "${library_var}/libcilkrts/.libs"
 
 set ALWAYS_CFLAGS ""
 lappend ALWAYS_CFLAGS "-L${library_var}/libcilkrts/.libs"
 
 dg-init
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O1 -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O2 -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O3 -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -O2 -ftree-vectorize -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -O2 -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -O3 -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -g -O0 -std=c99" " "
 
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -fcilkplus $ALWAYS_CFLAGS " " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O1 -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -std=c99 -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -ftree-vectorize -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -g -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -flto -g -fcilkplus $ALWAYS_CFLAGS" " "
+set tests [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]]
+for flags [list \
+	" -fcilkplus" \
+	" -O1 -fcilkplus" \
+	" -O2 -fcilkplus" \
+	" -O3 -fcilkplus" \
+	" -g -fcilkplus" \
+	" -g -O2 -ftree-vectorize -fcilkplus" \
+	" -fcilkplus -std=c99" \
+	" -fcilkplus -O2 -std=c99" \
+	" -fcilkplus -O3 -std=c99" \
+	" -fcilkplus -g -O0 -std=c99" \
+	] {
+	dg-runtest $tests "$flags" " "
+}
 
+set tests [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]]
+for flags [list \
+	" -g -fcilkplus $ALWAYS_CFLAGS " \
+	" -O1 -fcilkplus $ALWAYS_CFLAGS" \
+	" -O2 -std=c99 -fcilkplus $ALWAYS_CFLAGS" \
+	" -O2 -ftree-vectorize -fcilkplus $ALWAYS_CFLAGS" \
+	" -O3 -g -fcilkplus $ALWAYS_CFLAGS" \
+	" -O3 -flto -g -fcilkplus $ALWAYS_CFLAGS" \
+	] {
+	dg-runtest $tests "$flags" " "
+}
 
-
 dg-finish