[m-users.] uncaught Mercury exception using mdprof_create_feedback

Paul Bone paul at bone.id.au
Mon Sep 29 10:07:36 AEST 2014


On Sun, Sep 28, 2014 at 04:35:17PM +0200, Matthias Guedemann wrote:
> Dear all,
> 
> I am using mmc version 14.01.1, trying to use the implicit parallelism
> feature.
> 
> My program looks roughly like this:
> 
> ,----
> | main(!IO) :-
> |     ...
> |     (( prepareGraph(E1),
> |        G1 = createGraph(E1),
> |        R1 = analyseGraph(G1)),
> |      ( prepareGraph(E2),
> |        G2 = createGraph(E2),
> |        R2 = analyseGraph(G2)),
> |      ( prepareGraph(E3),
> |        G3 = createGraph(E3),
> |        R3 = analyseGraph(G3))
> |     ),
> |     ...
> |     some IO on results
> `----
> 
> This works without problems, I can also execute the three independent
> conjunction groups using parallel-AND in the asm_fast.par.gc.stseg grade
> with 300% CPU usage. But when I use
> 
> % mmc --deep-profiling --profile-for-feedback
> 
> 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
> 
> What am I doing wrong?

You're not, this is a very experimentail feature and it doesn't work for all
Mercury programs.  I think that you would get this type of error if the
program throws an exception.  But it could also be a genuine bug.  I'd like
to fix, or at least understand this problem.  Can you sand me the complete
program and the Deep.data and Deep.procrep files?

You can either file a bug or send me them directly, I don't mind.  They
don't need to go to the list as I'm the author of this part of Mercury.

Thanks.


-- 
Paul Bone



More information about the users mailing list