parallel make -j N

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

parallel make -j N

Andrea Galeazzi
I generated a MakeFile Project (MinGW) and I'd like to speed up the
build process using -j N option. So I launched:
"make -j 2 all".
Unfortunately I noticed that the Makefile, generated by CMake self,
contains this row: $(MAKE) -f CMakeFiles\Makefile2 all , so Makefile2
won't be executed in parallel mode.
How can I pass this option to all build steps?
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: parallel make -j N

Bill Hoffman
On 1/16/2012 12:10 PM, Andrea Galeazzi wrote:
> I generated a MakeFile Project (MinGW) and I'd like to speed up the
> build process using -j N option. So I launched:
> "make -j 2 all".
> Unfortunately I noticed that the Makefile, generated by CMake self,
> contains this row: $(MAKE) -f CMakeFiles\Makefile2 all , so Makefile2
> won't be executed in parallel mode.
> How can I pass this option to all build steps?
> --
>
gmake will do the right thing.  when you run a toplevel make with -j2 it
will set an env var that is passed down to the $(MAKE) and it should
work.  I use it all the time.

-Bill

--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: parallel make -j N

Andrea Galeazzi
Yes but I'm using MinGW make (on Windows machine), the interpreter is

GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

When I launched the make project I also checked the child process
creation, the parent process is:
c.\...\cs-make.exe -j 2 all
but the child process is:
c:/.../cs-make -f CMakeFiles\Makefile2 all

Than, after a clean, I manually launched:
c:\..\cs-make.exe -j 2 -f CMakeFiles\Makefile2 all
In this way I reduced the build time from 25 min to 14 min.
Could MinGW-make have a different behavior from gmake?

-Andrea

Il 16/01/2012 18.37, Bill Hoffman ha scritto:

> On 1/16/2012 12:10 PM, Andrea Galeazzi wrote:
>> I generated a MakeFile Project (MinGW) and I'd like to speed up the
>> build process using -j N option. So I launched:
>> "make -j 2 all".
>> Unfortunately I noticed that the Makefile, generated by CMake self,
>> contains this row: $(MAKE) -f CMakeFiles\Makefile2 all , so Makefile2
>> won't be executed in parallel mode.
>> How can I pass this option to all build steps?
>> --
>>
> gmake will do the right thing.  when you run a toplevel make with -j2
> it will set an env var that is passed down to the $(MAKE) and it
> should work.  I use it all the time.
>
> -Bill
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>

--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: parallel make -j N

Andrea Galeazzi
Andre Heider ha scritto:
On Tue, Jan 17, 2012 at 10:32 AM, Andrea Galeazzi [hidden email] wrote:
  
Yes but I'm using MinGW make (on Windows machine), the interpreter is
    

GNU make on Windows doesn't support the jobserver, so whenever you
Makefile starts another make instance what will effectively run with
-j1.

  
The issue has been solved here: http://public.kitware.com/Bug/view.php?id=12882
--
korg Firma

KORG ITALY SPA

Via Cagiata, 85 – 60027 Osimo (AN) - ITALY

Ph.   +39 071 727161 -  Fax   +39 071 7231228

P.IVA e Cod. fiscale IT01460580424

Soggetta al controllo della Società KORG Inc. - Giappone

Reg. Imprese di n. 212056/1996 del 23/12/96

REA di Ancona al n. 133105 del 06/12/96

Capitale sociale Euro 814.253,16  i.v.

 

 

 

Ai sensi del D.Lgs. 30 giugno 2003, n. 196, “Codice in materia di protezione dei dati personali” si precisa che le informazioni contenute nel messaggio sono riservate e destinate esclusivamente alla persona od organizzazione sopra indicata. A chi legge il presente avviso - se non è l'effettivo destinatario, o un dipendente, o la persona responsabile della consegna del messaggio - si notifica che sono proibite copie, distribuzione o divulgazione di quanto in esso contenuto (C.P. 616). Se questo messaggio Vi è pervenuto per errore, Vi preghiamo di informarci immediatamente, di non leggerlo e di distruggerlo. Grazie.

 

According to Legislative Decree n. 196 of 30 June 2003 about “Personal Data Protection Code” we point out that the information contained in this message may be privileged and confidential and is intended only for the use of the individual entity named above. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this message is strictly prohibited. If you have received this message in error, please notify us immediately and destroy the original message. Thank you.

 

 


--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake