Hi!
On Mon, 29 Sep 2014 13:58:31 +0000, "Tannenbaum, Barry M" <barry.m.tannenbaum@intel.com> wrote:
In a nutshell, add the following code to main() before the call to f3():
int status = __cilkrts_set_param("nworkers", "2");
if (0 != status) {
// Failed to set the number of Cilk workers
return status;
}
Yeah, that's what I had proposed with the patch at the end of my previous
email,
<http://news.gmane.org/find-root.php?message_id=%3C8761g6g0je.fsf%40kepler.schwinge.homeip.net%3E>.
I'm sorry if I didn't make it obvious that more text and the patch were
following after the full-quote of the original issue description.
Here's the details: [...]
Thanks again for your helpful comments; that's appreciated.
Here's again my proposed patch. Note, that the include paths in GCC
compiler testing (gcc/testsuite/) are not set up to pick up the
<cilk/cilk_api.h> include file, so I've manually added a propotype for
the __cilkrts_set_param function to the three files. I can change that,
if requested.
commit ee7138e451d1f3284d6fa0f61fe517c82db94060
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Mon Sep 29 12:47:34 2014 +0200
Audit Cilk Plus tests for CILK_NWORKERS=1.
gcc/testsuite/
* c-c++-common/cilk-plus/CK/spawning_arg.c (main): Call
__cilkrts_set_param to set two workers.
* c-c++-common/cilk-plus/CK/steal_check.c (main): Likewise.
* g++.dg/cilk-plus/CK/catch_exc.cc (main): Likewise.