[m-users.] uncaught Mercury exception using mdprof_create_feedback

Julien Fischer jfischer at opturion.com
Mon Sep 29 12:47:32 AEST 2014



On Mon, 29 Sep 2014, Paul Bone wrote:

> 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.

The latter is unlikely, the deep profiling runtime system currently
aborts if an exception is thrown.

Cheers,
Julien.



More information about the users mailing list