The following program causes a runtime crash reducer_impl.cpp:527: cilk assertion failed: h
My compiler is icc 13.1.1 on Ubuntu 12.04.
#include <cilk/reducer.h> #include <cilk/reducer_opadd.h> #include <cilk/cilk.h> #include void empty() {} std::atomic n; int test(int *x) { cilk::reducer_opadd r; n = 40000; while (n--) { cilk_spawn empty(); } return 0; } int main() { int x = 1; return test(&x); }