Bug Report on Cilk_spawn issues

Bug Report on Cilk_spawn issues

Hi,

I have a simple Cilk++ program:

int cilk_main(int argc, char *argv[])
{
cilk_spawn {
cilk_spawn {std::cout<<"Thread 1"< cilk_spawn {std::cout<<"Thread 2"< cilk_sync;
}
cilk_spawn {
cilk_spawn {std::cout<<"Thread 3"< cilk_spawn {std::cout<<"Thread 4"< cilk_sync;
}
cilk_sync;
}

My platform is: Linux octave 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 05:23:09 UTC 2010 i686 GNU/Linux

When I compile this program , the compiler will complain:
cilk++ -o tb -O3 -DNDEBUG -I include -Wall -m32 tb.cilk -lpng -lcilkutil -lm -L lib/i386
tb.cilk: In function void cilk __cilk_spawn_block_005(void*, volatile __cilkrts_frame_t*):
tb.cilk:22: internal compiler error: in make_decl_rtl, at varasm.c:1015
Please submit a full bug report,
with preprocessed source if appropriate.
This compiler version is 4.2.4 (Cilk Arts build 8503)
See for instructions.
make: *** [tb] Error 1

Will anybody explain to me why? The Intel Cilk++ programmer's guide does Not say that I can not use cilk_spawn with {} blocks.

Thanks!

Yuan

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The internal compiler error is clearly a bug on our part. Thank you for the bug report. As indicated in the programmer's guide, cilk_spawn must precede a function call.However, the syntax you want to use has been considered and is still being considered for a future version. In the mean time, I suggest that you "outline" into a separate function those parts of a function that you wish to spawn.
- Pablo

Leave a Comment

Please sign in to add a comment. Not a member? Join today