Re: [Qt-creator] parallel processing in make
On Fri, Jul 16, 2010 at 09:48:47AM +0200, eike.zil...@nokia.com wrote: > > On Jul 16, 2010, at 3:49 AM, ext 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 I can't imagine why make couldn't guess at a default value by > checking the number of cores :P I have (at work...) alias make='make -j 30'. Overwriting that with 'make -j 2' or such "just because there was no -j on the commandline" might be counterproductive. For me it's one of the cases where trying to be "clever" has a high potential to hurt someone... Andre' ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
On Jul 16, 2010, at 8:01 PM, ext alan.westbr...@nokia.com wrote: > Well then that would definitely be a problem for me, I start everything from > spotlight! > > No, seriously, CMD+Space Enter -> BAM! > > =) > > Alan > > On Jul 15, 2010, at 11:12 PM, ext Kai Koehne wrote: > >> On 7/16/2010 3:09 AM, ext Carter, Nathan wrote: >>> >>> Is there a way to tell Creator to use "make -j N" for some N in all >>> projects? I know that I can change it on a per-project basis, but since >>> it's a value that's pretty much just contingent on how many cores my >>> machine has, I'd like to just say "please use all cores all the time." >>> >>> I couldn't find this in the options. Did I miss it or should I file a >>> request for it? >>> >>> (Or I could set MAKEFLAGS="-j 4" in my environment, but I guess I'm not >>> sure where Qt Creator gets its environment from in OS X, when launched from >>> Finder rather than the command line...maybe from my bash .profile?? I have >>> no idea.) >> >> Google is your friend :) Setting them in ~/.MacOSX/environment.plist >> worked for me in the past (although I just learned that it might fail if >> you start QtCreator from Spotlight). It seems that it doesn't work on 10.5, but it works on 10.6 again (for me it does). Note though, that you have to log out and log in again after changing environment.plist, because that actually sets the environment for the launchd process that is the mother of all your processes when logged in. ++ Eike >> I think this is really something you want to set system-wide / per user, >> and not somewhere inside QtCreator. >> >> Kai >> -- >> Kai Koehne >> Software Engineer >> Nokia, Qt Development Frameworks >> >> Nokia gate5 GmbH >> Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany >> Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B >> Umsatzsteueridentifikationsnummer: DE 812 845 193 >> Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori >> ___ >> Qt-creator mailing list >> Qt-creator@trolltech.com >> http://lists.trolltech.com/mailman/listinfo/qt-creator > > > ___ > Qt-creator mailing list > Qt-creator@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-creator -- Eike Ziller Software Engineer Nokia, Qt Development Frameworks Nokia gate5 GmbH Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B Umsatzsteueridentifikationsnummer: DE 812 845 193 Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
Well then that would definitely be a problem for me, I start everything from spotlight! No, seriously, CMD+Space Enter -> BAM! =) Alan On Jul 15, 2010, at 11:12 PM, ext Kai Koehne wrote: > On 7/16/2010 3:09 AM, ext Carter, Nathan wrote: >> >> Is there a way to tell Creator to use "make -j N" for some N in all >> projects? I know that I can change it on a per-project basis, but since >> it's a value that's pretty much just contingent on how many cores my machine >> has, I'd like to just say "please use all cores all the time." >> >> I couldn't find this in the options. Did I miss it or should I file a >> request for it? >> >> (Or I could set MAKEFLAGS="-j 4" in my environment, but I guess I'm not sure >> where Qt Creator gets its environment from in OS X, when launched from >> Finder rather than the command line...maybe from my bash .profile?? I have >> no idea.) > > Google is your friend :) Setting them in ~/.MacOSX/environment.plist > worked for me in the past (although I just learned that it might fail if > you start QtCreator from Spotlight). > > I think this is really something you want to set system-wide / per user, > and not somewhere inside QtCreator. > > Kai > -- > Kai Koehne > Software Engineer > Nokia, Qt Development Frameworks > > Nokia gate5 GmbH > Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany > Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B > Umsatzsteueridentifikationsnummer: DE 812 845 193 > Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori > ___ > Qt-creator mailing list > Qt-creator@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-creator ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
> 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. Because you can't define the -j flag in the makefile itself; it's only recognized as an environment variable or as a command line parameter. > Actually, I think he meant: "j argument present but not set". > Such as "make -j". And yes, that should automagically use all available > cores. As I described earlier, it simply does everything in parallel. It doesn't restrict how many processes it spawns, which for any sizable project means you're going to have dozens of compilers all at each others' throats. "make -j" is a bad idea and in my opinion shouldn't exist. /s/ Adam ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
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 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@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-creator > -- Aurélien Vallée +33 6 47 41 70 37 ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
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@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
On Fri, Jul 16, 2010 at 7:08 AM, 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 I can't imagine why make couldn't guess at a default value by >> checking the number of cores :P >> >> (Our little project ibjom, a replacement for nmake on Windows, does exactly >> that.) > > But isn't that what QThread::idealThreadCount() DOES? :P I see I misread what you said. No, actually, make probably can't do that. I've seen way too many projects that don't have the dependency tracking set up right that fail when parallel builds are in use, which is probably enough to make the GNU folks refuse to make the default behavior incompatible. /s/ Adam ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
>> 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 I can't imagine why make couldn't guess at a default value by > checking the number of cores :P > > (Our little project ibjom, a replacement for nmake on Windows, does exactly > that.) But isn't that what QThread::idealThreadCount() DOES? :P > Doesn't make automatically use all available cores if the 'j' argument is not > set? I'm sure I read that somewhere. No, without specifying an argument it runs as many parallel tasks as possible, limited only by dependency tracking. Good way to choke a system. Not a mistake I'll make twice. /s/ Adam ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
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? Doesn't make automatically use all available cores if the 'j' argument is not set? I'm sure I read that somewhere. On Fri, Jul 16, 2010 at 11:15 AM, Oleg Shalnev wrote: > In Linux I just modify "Additional arguments" > > > 2010/7/16 Carter, Nathan > > >> Is there a way to tell Creator to use "make -j N" for some N in all >> projects? I know that I can change it on a per-project basis, but since >> it's a value that's pretty much just contingent on how many cores my machine >> has, I'd like to just say "please use all cores all the time." >> >> I couldn't find this in the options. Did I miss it or should I file a >> request for it? >> >> (Or I could set MAKEFLAGS="-j 4" in my environment, but I guess I'm not >> sure where Qt Creator gets its environment from in OS X, when launched from >> Finder rather than the command line...maybe from my bash .profile?? I have >> no idea.) >> >> Nathan >> ___ >> Qt-creator mailing list >> Qt-creator@trolltech.com >> http://lists.trolltech.com/mailman/listinfo/qt-creator >> > > > > -- > Oleg Shalnev (Kalpa Project) > -- > mailto: o...@kalpa.ru > skype: oleg_shalnev > jabber: oleg.shal...@gmail.com > http://kalpa.ru > > ___ > Qt-creator mailing list > Qt-creator@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-creator > > ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
In Linux I just modify "Additional arguments" 2010/7/16 Carter, Nathan > > Is there a way to tell Creator to use "make -j N" for some N in all > projects? I know that I can change it on a per-project basis, but since > it's a value that's pretty much just contingent on how many cores my machine > has, I'd like to just say "please use all cores all the time." > > I couldn't find this in the options. Did I miss it or should I file a > request for it? > > (Or I could set MAKEFLAGS="-j 4" in my environment, but I guess I'm not > sure where Qt Creator gets its environment from in OS X, when launched from > Finder rather than the command line...maybe from my bash .profile?? I have > no idea.) > > Nathan > ___ > Qt-creator mailing list > Qt-creator@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-creator > -- Oleg Shalnev (Kalpa Project) -- mailto: o...@kalpa.ru skype: oleg_shalnev jabber: oleg.shal...@gmail.com http://kalpa.ru <>___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
On Jul 16, 2010, at 3:49 AM, ext 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 I can't imagine why make couldn't guess at a default value by checking the number of cores :P (Our little project ibjom, a replacement for nmake on Windows, does exactly that.) Br, Eike > On Thu, Jul 15, 2010 at 8:09 PM, Carter, Nathan wrote: >> >> Is there a way to tell Creator to use "make -j N" for some N in all >> projects? I know that I can change it on a per-project basis, but since >> it's a value that's pretty much just contingent on how many cores my machine >> has, I'd like to just say "please use all cores all the time." >> >> I couldn't find this in the options. Did I miss it or should I file a >> request for it? >> >> (Or I could set MAKEFLAGS="-j 4" in my environment, but I guess I'm not sure >> where Qt Creator gets its environment from in OS X, when launched from >> Finder rather than the command line...maybe from my bash .profile?? I have >> no idea.) >> >> Nathan >> ___ >> Qt-creator mailing list >> Qt-creator@trolltech.com >> http://lists.trolltech.com/mailman/listinfo/qt-creator >> > > ___ > Qt-creator mailing list > Qt-creator@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-creator -- Eike Ziller Software Engineer Nokia, Qt Development Frameworks Nokia gate5 GmbH Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B Umsatzsteueridentifikationsnummer: DE 812 845 193 Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
On 7/16/2010 3:09 AM, ext Carter, Nathan wrote: > > Is there a way to tell Creator to use "make -j N" for some N in all projects? > I know that I can change it on a per-project basis, but since it's a value > that's pretty much just contingent on how many cores my machine has, I'd like > to just say "please use all cores all the time." > > I couldn't find this in the options. Did I miss it or should I file a > request for it? > > (Or I could set MAKEFLAGS="-j 4" in my environment, but I guess I'm not sure > where Qt Creator gets its environment from in OS X, when launched from Finder > rather than the command line...maybe from my bash .profile?? I have no idea.) Google is your friend :) Setting them in ~/.MacOSX/environment.plist worked for me in the past (although I just learned that it might fail if you start QtCreator from Spotlight). I think this is really something you want to set system-wide / per user, and not somewhere inside QtCreator. Kai -- Kai Koehne Software Engineer Nokia, Qt Development Frameworks Nokia gate5 GmbH Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B Umsatzsteueridentifikationsnummer: DE 812 845 193 Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] parallel processing in make
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 /s/ Adam On Thu, Jul 15, 2010 at 8:09 PM, Carter, Nathan wrote: > > Is there a way to tell Creator to use "make -j N" for some N in all projects? > I know that I can change it on a per-project basis, but since it's a value > that's pretty much just contingent on how many cores my machine has, I'd like > to just say "please use all cores all the time." > > I couldn't find this in the options. Did I miss it or should I file a > request for it? > > (Or I could set MAKEFLAGS="-j 4" in my environment, but I guess I'm not sure > where Qt Creator gets its environment from in OS X, when launched from Finder > rather than the command line...maybe from my bash .profile?? I have no idea.) > > Nathan > ___ > Qt-creator mailing list > Qt-creator@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-creator > ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
[Qt-creator] parallel processing in make
Is there a way to tell Creator to use "make -j N" for some N in all projects? I know that I can change it on a per-project basis, but since it's a value that's pretty much just contingent on how many cores my machine has, I'd like to just say "please use all cores all the time." I couldn't find this in the options. Did I miss it or should I file a request for it? (Or I could set MAKEFLAGS="-j 4" in my environment, but I guess I'm not sure where Qt Creator gets its environment from in OS X, when launched from Finder rather than the command line...maybe from my bash .profile?? I have no idea.) Nathan ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator