[m-rev.] for review: Separate processor counting from thread pinning.

Paul Bone paul at bone.id.au
Wed Jun 25 18:58:28 AEST 2014


On Wed, Jun 25, 2014 at 10:12:06AM +1000, Peter Wang wrote:
> On Tue, 24 Jun 2014 19:45:43 +1000, Paul Bone <paul at bone.id.au> wrote:
> > On Tue, Jun 24, 2014 at 12:22:27PM +1000, Julien Fischer wrote:
> > >
> > > On Mon, 23 Jun 2014, Peter Wang wrote:
> > >
> > >> Branches: master, 14.01
> > >>
> > >> In low-level C parallel grades we need the number MR_num_processors to
> > >> prime MR_num_threads when it is not explicitly set by the user, even if
> > >> thread pinning support is not available.
> > >
> > > BTW, can you add a brief entry to the 14.01.1 NEWS about this.
> > 
> > I thought this worked already, maybe it didn't fill out MR_num_threads
> > properly but it did create the correct number of Mercury engines.
> 
> A quick grep will reveal that MR_num_threads is set in only two places:
> in MR_setup_thread_pinning, and in response to MERCURY_OPTIONS=-Pn.
> If MR_num_threads stays at its initial value of zero, it crashes due to
> division by zero while creating the engine for the primordial thread:
> 
>     eng->MR_eng_victim_counter = (eng->MR_eng_id + 1) % MR_num_threads;
> 

Okay thanks.  It looks like I left a bug here - I can't imagine how I didn't
trip over it earlier but that's not important now.


-- 
Paul Bone



More information about the reviews mailing list