Mercury Bugs - mercury
View Issue Details
0000333mercuryBugpublic2014-06-16 11:412018-03-13 14:38
Reporterwangp 
Assigned Topbone 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000333: MR_num_idle_engines count goes wrong
DescriptionHi Paul, I think you can solve this faster than I can.

I've made a copy of the parallel fib benchmark, except that it repeats. Parallel execution works for the first fib call. Afterwards, fewer engines do any work. Soon, parallel execution never occurs again.

MR_num_idle_engines should be the culprit:

Program received signal SIGINT, Interrupt.
0x0000000000405dac in fib_par_plain_module1 () at fib_par_plain.c:206
206 MR_parent_sv(3) = MR_r1;
(gdb) p MR_num_idle_engines
$2 = -2
(gdb) c
Continuing.
fib(40) = 165580141
fib(40) = 165580141
^C
Program received signal SIGINT, Interrupt.
0x00007ffff6789d00 in sem_wait () from /lib64/libpthread.so.0
(gdb) p MR_num_idle_engines
$3 = 0
TagsNo tags attached.
Attached Files? fib_par_plain.m (435) 2014-06-16 11:41
https://bugs.mercurylang.org/file_download.php?file_id=216&type=bug

Notes
(0000700)
pbone   
2014-06-16 12:14   
It looks very odd where MR_num_idle_engines is -2. I'll take a look but I think 0000334 should be done first and might even help with this bug.

Thanks.
(0000982)
pbone   
2018-03-13 14:38   
Unassigned things from me.

Issue History
2014-06-16 11:41wangpNew Issue
2014-06-16 11:41wangpStatusnew => assigned
2014-06-16 11:41wangpAssigned To => pbone
2014-06-16 11:41wangpFile Added: fib_par_plain.m
2014-06-16 12:14pboneNote Added: 0000700
2018-03-13 14:38pboneStatusassigned => acknowledged
2018-03-13 14:38pboneNote Added: 0000982