cilk runtime assert hit at reducer.cpp:370

cilk runtime assert hit at reducer.cpp:370

we are using cilk_8503 on linux and are hitting a cilk runtime assert:

reducer.cpp:370: static void global_reducer_map::destroy_if_empty(): Assertion `map' failed.

it looks like there may be a race condition here when running multiple cilk contexts simultaneously. what do you think?

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

It's entirely possible, though I can't see it by examining the code. Can you give us a test case that reproduces the problem?

- Barry

I attached a test program that hits the reducer.cpp:370 assert as well as uncovers some heap double frees. We ran it on a dual core machine.

Attachments: 

AttachmentSize
Download cilk_2B_2Breducercrash.tar.gz615 bytes

I've got it, and it definitely appears broken. The problem is in moving between the global reducer map and the reducer map in your Cilk code. I'll let you know when/if we come up with a solution.

In the mean time, the new runtime doesn't appear to have the same problem.

- Barry

Is the new runtime publically available? The most recent version available for download is 8503. We can test patches to version 8503, or we can test a new download version.

We look forward to any bug fixes for this problem.

Thanks!

Also, we are on the verge of shipping a product in which this assertion occasionally fails. I don't want to have to write about this bug in the release notes, if I can avoid it. What are the chances of getting this fixed right away?-Bradley

> Is the new runtime publically available? The most recent version available for
download is 8503. We can
> test patches to version 8503, or we can test a new
download version.

Cilk technology is currently in Beta as part of the Intel compiler for
both 32 and 64 bit Intel chips on both Windows and Linux. If you are
interested in signing up for the beta program, please visit http://software.intel.com/en-us/articles/intel-parallel-studio-microsoft-visual-studio-2010-support/.

The new version does away with the Cilk linkage entirely, so cilk::run is no longer used. You simply call functions using the Cilk keywords and the runtime will automatically start. We've also done away with the cilk::context. There's now only one set of workers, and they're shared among all of the user threads. This eliminates the oversubscription you see in the example you posted.

- Barry

We identified a couple of critical sections in the global reducer map that we protected with an internal cilk mutex. Please review the changes to reducer.cpp.

Attachments: 

AttachmentSize
Download reducer.cpp20.06 KB

Hi. I believe there is one more section that needs to be protected in forget(). I have a version of reducer.cpp that I'd like to post, but "Add Files" seems useless and if I muck with it too much, it makes Internet Explorer reload the page.

Here isWilliam's version of reducer.cpp that he was unable to post.

==
Aubrey W.
Intel Software Network Support

Attachments: 

AttachmentSize
Download reducer.cpp20.06 KB

Thanks very much for the help, Aubrey.

Leave a Comment

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