Mercury Bugs - mercury
View Issue Details
0000364mercuryBugpublic2014-10-01 16:252014-10-07 11:37
Reporterpbone 
Assigned Topbone 
PrioritynormalSeverityminorReproducibilitysometimes
StatusresolvedResolutionfixed 
Platformx86_64OSLinuxOS VersionDebian jessie
Product Version 
Target VersionFixed in Version 
Summary0000364: Autoparallelisation analysis crashes on nondet disjunctions.
DescriptionMatthias Guedemann submitted this bug via e-mail users@mercurylang.org in September 2014.

> mdprof_create_feedback chokes on the created Deep.data file. I always
> get the error:
>
> ,----
> | Uncaught Mercury exception:
> | Software Error: measurements: predicate `measurements.check_total_calls'/3: Unexpected: TotalCalls \= CallsA + CallsB
> | Stack dump not available in this grade.
> `----
>
> when using
>
> % mdprof_create_feedback --implicit-parallelism Deep.data feedback.data
Steps To Reproduce
MCFLAGS:
  --deep-profiling --profile-for-feedback

mdprof_create_feedback --implicit-parallelism Deep.data feedback.data
Additional InformationI'd like to attempt to explain what's happening, this may be pretty detailed
so feel free to ignore it, I'm mostly explaining this to myself :-).

The autoparallelisation analysis scans your whole program for places where
parallelism could help (it skips parts of the program where it's obvious
that it won't help). It crashes when it looks in
euler_81_82_83_problem_set.euler_edge_81/4 which is nondeterminisic. It
tries to calculate the cost of every goal including the disjunction as a
whole, however it assumes that the disjunction is either a switch or a
"semidet disjunction" which is another special case. This incorrect
assumption causes the analysis to crash (because a consistency check fails).
It might be possible to comment out the consistency check, but then I'd be
concerned that something else would crash because of the same faulty
assumption. I'll see if I can fix the bug in the next week or so.
TagsNo tags attached.
Attached Filestgz euler.tgz (1,145,111) 2014-10-01 16:25
https://bugs.mercurylang.org/file_download.php?file_id=228&type=bug

Notes
(0000792)
pbone   
2014-10-07 11:37   
Fixed in revision: 4a431556b5b63e2f04de272684dd5abca18e86e0

https://github.com/Mercury-Language/mercury/commit/4a431556b5b63e2f04de272684dd5abca18e86e0

Issue History
2014-10-01 16:25pboneNew Issue
2014-10-01 16:25pboneStatusnew => assigned
2014-10-01 16:25pboneAssigned To => pbone
2014-10-01 16:25pboneFile Added: euler.tgz
2014-10-01 16:26pboneStatusassigned => acknowledged
2014-10-01 16:39pboneStatusacknowledged => assigned
2014-10-07 11:37pboneNote Added: 0000792
2014-10-07 11:37pboneStatusassigned => resolved
2014-10-07 11:37pboneResolutionopen => fixed