This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Hi Iain,
     I have prefixed all my replies below with "BVI:"


Balaji V. Iyer.

From: Iain Sandoe [] 
Sent: Sunday, November 3, 2013 11:01 AM
To: Iyer, Balaji V
Cc: Joseph S. Myers; Tobias Burnus; gcc patches
Subject: Re: Testsuite / Cilk Plus: Include library path in compile flags in gcc.dg/cilk-plus/cilk-plus.exp

On 30 Oct 2013, at 20:55, Joseph S. Myers wrote:

> On Wed, 30 Oct 2013, Tobias Burnus wrote:
>> On the other hand, one could use the existence of libcilkrts* as detected by
>> the patch to decide whether to link or not: If the library is there, one can
>> link - if not found, it is unlikely to work (unless it is, e.g. found in
>> /usr/lib).
> The way to detect it is to try to link with it, rather than just looking 
> for it in the build tree.  If you just look for it in the build tree and 
> assume it's missing if not found there, you break installed testing.  See 
> Andrew's recent patch fixing this for asan/ubsan testing (or what I did 
> for tests linking with libatomic on the C11-atomic branch).

In addition to other posters, a few other observations.

1). the c execute tests all fail on Darwin (because nothing is calling set_ld_library_path_env_vars).
  Note that this could cause particularly subtle issues, if one builds consecutive versions of the compiler with the same install path (and install the compiler after testing).  Since the new compiler could end up testing the previously installed shlib [at least on Darwin].

A minimal fix for the execute tests (in-tree testing) is to add set_ld_library_path_env_vars after the ld_library_path is decided (although this does not fix installed testing, of course).

BVI: Thanks for letting me know about this. I will try to test this in 

2). The C tests are extremely time-consuming (m32/m64) with NO -jxx on the c/l:

  x86_64-linux (32 cores 2.8G Xeon) : 36m/421m/6m
  x86_64-darwin12 (8 cores 2.8G Xeon) : 45m/309m/2m.

c.f. the g++ tests which take ~2m wall clock.

BVI: yes, I know about this. It is because some of the Cilk tests are run for higher iterations to make it force a steal. This is one of the main place were runtime bugs could occur. My original solution was to put them all in separate directories with separate scripts to run them, but someone in GCC community did not like that idea. This way, when people compile with -jN, they will be run in parallel. If that is a good idea, I can look into reorganizing them. 

this might be nothing to do with cilk, but it certainly warrants investigation.

3). The "torture" mixes you have are not obvious (at least to me):

 * there are a lot of tests where you do "-O0" and "" 
 * also you test "-O2 -ftree-vectorize" (but not -O2) 
 * but -O3 with / without -ftree-vectorize.
 * you test a few LTO combinations for C but none for C++
 * you test C with/without -std=c99. 
 * but don't test C++ with -std=c++98 and -std=c++11.

There might be perfectly good reasons for these; but, as I say, they are not obvious ( at least to me ;) ) and probably warrant a comment in the .exp as to the rationale for the choices.

BVI: Thanks for  looking into this for me. Originally (when I had submitted Array Notations), I had used the torture frame work. Someone in GCC community asked me not to use them. I am testing them using several flags because these are the flags many of our branch users have reported using. I will be happy to add a comment in .exp file stating so.


I'm attaching three .exp files which might form the basis of an alternate implementation of the testing - they fix the execute tests on darwin and work for installed testing too.

However, given that Q2 and Q3 above might involve some changes, there are probably additional modifications needed.

in the new .exps, the c++ tests do -std=c++98 and -std=c++11, 
but otherwise do the same torture mix as you have, so would also need adjustment once the questions are resolved.

BVI: I have tests that use C++11 specific code (e.g. lamba functions) and I have called these flags inside the code using /* dg-options */

cilk-dg.exp => gcc/testsuite/lib/cilk-dg.exp
cilk-plus.exp => gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
cxx-cilk-plus.exp => gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp

rename / use / ignore - as appropriate ;)

BVI: Thanks again for working on this.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]