Intel's OpenMP implementation allows the KMP_STACKSIZE environment variable to specify stack size for a thread, and OMP_STACKSIZE is the gcc equivalent. Is there a similar facility in Cilk++? I know threads/workers are really "behind the scenes" given the task parallel interface of Cilk++, but I have found the KMP_STACKSIZE useful for task parallel (i.e. OpenMP 3.0) as well as thread parallel programs. In either case, tasks are mapped to threads/workers and need memory, and some times a lot of memory.
In particular, I have a Cilk++ program that runs using 16 threads on a particular machine. It fails with worker stack overflow if fewer threads are used:
Stack overflow on Cilk++ worker 0xd15c540, h=0xd15cb00 t=0xd15eb08. Aborting program.
I have written implementations in OpenMP 3.0 and in Cilk 5 that do not overflow the stack, even without the stack size increase. I have the OS stack size limit set to unlimited, though the machine node actually has 32M of RAM.
UNC Chapel Hill