5 ms·
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 si
by pavpanchekha 12y ago
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.
- foxhill 12y agotrue, 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.
- rlpb 12y agoWhy 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.