CPack Multicore Usage

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CPack Multicore Usage

Jörg Kreuzberger
Hi

My Project is compiling multicore without any problems using Unix makefiles or ninja.

In calls to cpack only one core is used if Makefiles are used. Is there any option to enable multicore?
If i use ninja in cpack builds, the cpack build is broken, cause there seems no dependencies considered?

Is ninja use in cpack intended? Or are there any contraints using ninja and cpack?

Greetz, Joerg

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPack Multicore Usage

Konstantin Tokarev


20.07.2017, 11:22, "Jörg Kreuzberger" <[hidden email]>:
> Hi
>
> My Project is compiling multicore without any problems using Unix makefiles or ninja.
>
> In calls to cpack only one core is used if Makefiles are used. Is there any option to enable multicore?

Yes, you should run make -jN, where N is a number of your cores or slightly larger

> If i use ninja in cpack builds, the cpack build is broken, cause there seems no dependencies considered?
>
> Is ninja use in cpack intended? Or are there any contraints using ninja and cpack?
>
> Greetz, Joerg
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake

--
Regards,
Konstantin
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPack Multicore Usage

Chuck Atkins
 
> In calls to cpack only one core is used if Makefiles are used. Is there any option to enable multicore?

It depends on what your trying to achieve.  Typically the bottleneck for CPack is in the compression step of the resulting tar (or rpm, etc.).  In that case, CMake is limited by the libarchive, libz, libbz2, liblzma, etc. implementations it's linked to, which are typically single threaded.  It's really no different than taking an install tree and running "tar -czf foo.tgz /path/t/foo-prefix".  So in that sense, even if you can parallelizes the "temporary" install step where it collects the files to packages, actually generating and compressing the package, which is the costly part, will likely remain a single process.




--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPack Multicore Usage

Jörg Kreuzberger
In reply to this post by Jörg Kreuzberger
I think i had a wrong understanding of the cpack process itself.
so i did a cmake configure and called cpack to build the software and generate the packages (deb, tgz)
but better would be to
configure, build with make -jx and then call cpack, cause cpack does not "rebuild" the software again, it uses the compiled software and just starts the "install" into its _CPack_Packages subdirectories

Thank for your patience :-)


-----Ursprüngliche Nachricht-----
Von: Chuck Atkins <[hidden email]>
Gesendet: Fr 21.07.2017 21:32
Betreff: Re: [CMake] CPack Multicore Usage
An: Konstantin Tokarev <[hidden email]>;
CC: Jörg Kreuzberger <[hidden email]>; [hidden email];

>  
> > In calls to cpack only one core is used if Makefiles are used. Is there any
> option to enable multicore?
>
> It depends on what your trying to achieve.  Typically the bottleneck for CPack
> is in the compression step of the resulting tar (or rpm, etc.).  In that case,
> CMake is limited by the libarchive, libz, libbz2, liblzma, etc. implementations
> it's linked to, which are typically single threaded.  It's really no different
> than taking an install tree and running "tar -czf foo.tgz /path/t/foo-prefix". 
> So in that sense, even if you can parallelizes the "temporary" install step
> where it collects the files to packages, actually generating and compressing
> the package, which is the costly part, will likely remain a single process.
>
>
>
>

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPack Multicore Usage

Chuck Atkins
cause cpack does not "rebuild" the software again, it uses the compiled software and just starts the "install" into its _CPack_Packages subdirectories

Just running `cpack` does not.  However, CMake does generate a "package" make target that is tied into your dependencies, so if instead of running `make -jN; cpack` you could also run 'make -jN package' which will run the build, since it's a dependency of the package target.

- Chuck

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...