Re:GNU make insanity: finding the value of the -j parameter
by pavpanchekha on Sunday March 29, 2015 @02:49AM
(#9284109)
Say one of your build rules generates a data file by performing some expensive computations. The parallelism is internal to the code (say, it's a Monte-Carlo simulation), so it should run on a lot of cores, but if you're doing it multiple times (with, say, different parameters) in parallel, you don't want the total number of threads spawned to be more than the machine has.
[ Parent
| on HN ]
Re:GNU make insanity: finding the value of the -j parameter
by rlpb on Monday March 30, 2015 @06:15AM
(#9288612)
Why would you want to do it multiple times with different parameters in parallel? If your code can already scale to multiple cores, then just have each parameter set run one at a time, and you're already maximizing your CPU use.
Or integrate with make's jobserver as someone else has described.
Re:GNU make insanity: finding the value of the -j parameter
by foxhill on Sunday March 29, 2015 @11:33AM
(#9285156)
true, however my only complaint -
> you don't want the total number of threads spawned to be more than the machine has
that may not be necessarily true, and regardless, it might be a sane decision for yourself, but it might not be for others.