Boost logo

Boost-Build :

Subject: Re: [Boost-build] Programmatic Job Count
From: Phillip Seaver (phil_at_[hidden])
Date: 2008-11-20 08:49:28

Vladimir Prus wrote:
> On Wednesday 19 November 2008 11:16:00 you wrote:
>> On Tuesday 18 November 2008 21:04:38 Brad Howes wrote:
>>> Is there any way to tell Boost how many jobs to run in parallel from
>>> within a Jamfile, a programmatic equivalent to '-j N'?
>> It is not possible, but hopefully will be possible later today :-)
> Brad,
> Please update and rebuild Boost.Jam. Then, put the following in your Jamroot:
> import modules ;
> modules.poke : PARALLELISM : 4 ;
> and it should have the same effect as -j4 on command line. Presently, the PARALLELISM
> variable overrides -j option. Soonish, I'll make it so:
> - you can create file project-config.jam, containing:
> option jobs : 4 ;
> and have 4 jobs by default
> - you can use --jobs=10 on command like, overriding project-config.jam
> Let me know if the Boost.Jam change works for you, and if the future directions
> seems right,
> Thanks,
> Volodya

That's cool, Volodya. Will that work from site-config.jam? That seems
a logical place to use it for those of us that use machines with
different numbers of processors. We have 2-, 4-, and 8-core machines
that we regularly build on, so it would make more sense (for us) to make
it machine-specific.

One thing that I've thought of a few times related to this is a special
value to "-j" that tells it to match the number of CPU's. So, on my
4-core machine, it would be as if I had typed "-j4". If I can use it
from site-config.jam or user-config.jam, though, that idea is a little
less needed. :-)


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at