[m-rev.] for review: support thread local trailing in .par grades

Julien Fischer juliensf at csse.unimelb.edu.au
Wed May 9 16:19:04 AEST 2007


On Mon, 7 May 2007, Julien Fischer wrote:

>
> On Mon, 7 May 2007, Julien Fischer wrote:
>
>> 
>> For preliminary review by Zoltan or PeterW.
>> 
>> (This change requires more extensive bootchecking and I also need to
>> make sure that it doesn't break G12.)
>> 
>> Estimated hours taken: 8
>> Branches: main
>> 
>> Add support for thread local trailing in grades that support parallel
>> execution.  Previously the trail state for each context was copied into the
>> global variables defined in mercury_trail.[ch] when the context was loaded,
>> i.e. we had thread-local trailing in grades that did not support parallel
>> execution.
>> 
>> This change extends the runtime to support thread-local trailing in the
>> presence of parallel execution.  We do this by adding the relevant fields 
>> to
>> the MR_engine structure and redefining the abstract registers related to
>> trailing to make accesses to the trail state go via the relevant engine.
>> 
>> This also works for parallel trailing grades with the high-level C backend
>> because in those grades the trail state is store in a thread-local dummy
>> engine.
>> 
>> XXX the coupling between the high-level and low-level versions of the 
>> runtimes
>> w.r.t trailing is not good.  I intend to fix it as a separate change.
>> (It also affects thread local mutables.)
>
> Actually, ignore the hlc specific parts of this diff.  They don't
> work properly because of dodgy depedencies on parts of the MR_engine
> structure.  Using hlc.par.gc.tr will cause an abort in the runtime
> at the moment.  This should be fixable once the XXX above is addressed.

The hlc specific parts do work.  What doesn't work is having 
MERCURY_OPTIONS set to -P n, with n > 1, and trying to run a program 
compiled with --high-level-code.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list