On Thursday 29 May 2008 03:18:47 michael schuster wrote:
> I just noticed that "make" in SPECS barely uses one cpu, let alone all 16 I
> happen to have available on the machine I'm currently on.
> Can I improve on this situation easily?

Each package does the actual building through its own Solaris/build.sh script. 
Many of these use $MAKE $MAKE_CPUS which will do a parallel build with as many 
CPUs as you've got (assuming the detection code works universally [1]).

However, Stefan claims that parallel builds with C++ are harmful as the IPO 
can get confused. For this reason, *some* packages build only with -j1. Boost 
is a big example here; it could certainly use a 16-fold speedup in compilation 
on Dillon, but doesn't. I've never seen C++ weirdness with parallel builds 
(and all the KDE SVN modules use as many CPUs as you've got), but defer to him 
in this case.

You could try to build multiple packages in parallel. The Makefile in SPECS/ 
still has checking to suppress -j at that level, because we didn't use to have 
dependencies set up between the specfiles. Now that we do, you could remove 
that and let make sort it out. Then you could build multiple packages in 
parallel and let each package sort out how much parallelism it wants to apply 
to the build itself.



[1] The code is

MAKE_CPUS=`/usr/sbin/psrinfo | perl -e 'my $c=0; while(<>) { $c++ if /on-
line/; } $c=1 unless $c; $c=4 if $c>4; print "-j$c";'` ; export MAKE_CPUS

so you can see it's clamped to 4 cpus max, anyway. That's something to add to 
the configuration in Makefile.config and through Respect.pl, I suppose.



Reply via email to