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

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).

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.

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.


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.

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 ;)


Attachment: cilk-plus.exp
Description: Binary data

Attachment: cxx-cilk-plus.exp
Description: Binary data

Attachment: cilk-dg.exp
Description: Binary data

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