[Qt-creator] parallel processing in make
Aurélien Vallée
vallee.aurelien at gmail.com
Fri Jul 16 15:40:32 CEST 2010
Actually, I think he meant: "j argument present but not set".
Such as "make -j". And yes, that should automagically use all available
cores.
On Fri, Jul 16, 2010 at 2:49 PM, Carter, Nathan <NCARTER at bentley.edu> wrote:
>
> On Jul 15, 2010, at 9:49 PM, Coda Highland wrote:
>
> > I can't imagine why Creator couldn't guess at a default value anyway;
> > just ask QThreadPool what the ideal number of threads is. :P
>
> Actually, if Creator can do it with QThreadPool, why can't qmake do it with
> QThreadPool? Then my Makefile would always have the right -j argument for
> the machine it was created on.
>
>
> On Jul 16, 2010, at 6:29 AM, Danny Price wrote:
>
> > I used to do that but the setting is lost when the pro.user file is
> regenerated. Is there a way to set this in the .pro file?
>
> Yes, but even better, let's have it as the default behavior for qmake to
> choose a -j N argument for make, but you can override it if you'd rather not
> use all cores or something like that.
>
>
> > Doesn't make automatically use all available cores if the 'j' argument is
> not set? I'm sure I read that somewhere.
>
> No, here's what I just tried on my 4-core system with one
> small/medium-sized Qt project:
>
> make clean ; time make
> Time: 1m10s
> Activity monitor showed:
> Two cores nearly unused the whole time
> Other two partially used the whole time (up+down)
>
> make clean ; time make -j 2
> Time: 42s
> Activity monitor showed:
> Two cores only slightly (30%?) used the whole time
> Other two maxed out the whole time
>
> make clean ; time make -j 4
> Time: 34s
> Activity monitor showed:
> All four cores maxed out the whole time
>
> So make does not guess correctly from the point of view of "please finish
> as fast as possible."
>
> Nathan
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
--
Aurélien Vallée
+33 6 47 41 70 37
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100716/30eefac8/attachment.html
More information about the Qt-creator-old
mailing list