Intel® Cilk™ Plus

cilkplus tools and workflow discussion

Dear all,

We (i.e., my students and I, that is) are now using the GCC CilkPlus branch quite heavily, and we believe we're making progress in certain kinds of algorithms we're investigating. The purpose of this message is to find out if anyone else lurking in this forum has a CilkPlus "workflow" to share. For example debugging tools, profilers, etc. We do the following:

Cilk worker size deque

I understand that each worker in Cilk has its own deque from which it pops frames to work on and to which it pushes frames.

Is there any way I could somehow display/print/get/obtain the number of frames in a worker’s deque at any point i.e. the size of a worker’s deque?

I have dug into Cilk runtime code (scheduler.c, global_state.cpp, stacks.c, local_state.h … just to name few) and could not recognize anything that would give me such information. Push and pop functions only work on next_frame that is just a pointer to a struct of full_frame type.

Thank you.

__cilkrts_cilk_for_64 undifined

Dear all, I seem to be having a bit of an issue with some code using cilk_for on my machine. It's a 64-bit machine.

The code 

cilk_for(int i=0; i< x; i++) {}

where x is a signed int, gives me 

undefined reference to _cilkrts_cilk_for_64

Looks like a linker issue (maybe), but I cant figure it out, my includes are as follows:

#include <cilk/cilk.h>
#include <cilk/cilk_api.h>
#include <cilk/common.h>

gcc cilk plus git repository corrupted?


I have cloned the gcc Cilk Plus git repo awhile back.  Today, when I tried to pull from the repo, it failed with the following error:

$ git pull
error: Unable to find 43269d882367dc4f0e4c2651d6625e1b7de78764 under
Cannot obtain needed object 43269d882367dc4f0e4c2651d6625e1b7de78764
while processing commit d612d6bc401c95be8e7740ffea26a77845edd113.
error: Fetch failed.

Link Error using Cilk with C program

I am starting to use Cilk in my work. In this case I am trying to embed Cilk in some legacy C code. Here is the relevant code.


      CILK_C_REDUCER_OPADD(sum1, double, 0.0);
      cilk_for(L = L1; L <= L2; L++)
        REDUCER_VIEW(sum1) += a[L]*V[ind[L]];

I am using the __stdcall convention.

I am using Intel Parallel Studio 2013 with VS 2012. I am getting the following link errors:

problem in writing reducer

Hi all,

I'm attaching the example of writing the reducer for linked list. The problem is that i get an error at compile time as follows:

test1.cpp(81): error: class "cilk::reducer<IntListMonoid>" has no member "add_value"
        list->add_value(i); // "list->" accesses the view

test1.cpp(84): error: class "cilk::reducer<IntListMonoid>" has no member "get_value"
  return list->get_value(); // "list->" accesses the view

Cilk plus Critical section and locks

Hi All,

I'm a grad student and I have difficulties in implementing critical section and locks in cilkplus. I used cilkplus on the latest gcc. Could someone plese put a simple pseudocode along with the header files that have to be used for critical section and locks, so that I can understnad & implement using my code. Thanks.


Sushek Shekar.

Subscribe to Intel® Cilk™ Plus