Re: Parallel cmake (was: Re: boost 1.52.0 status)
Which does absolutely nothing. MAKE_JOBS has no effect on cmake. The build is strictly sequential. You can parallelize the bootstrap phase with CONFIGURE_ARGS += --parallel=${MAKE_JOBS} but the main build remains sequential so the overall gain is negligible. I haven't been able to figure out how to get cmake to build things in parallel, but then I'm largely unfamiliar with cmake. in cmake based builds when you cd WRKOBJDIR and do a gmake -j4 it usually works in driving all cores to utilization. I tried with USE_GMAKE = Yes and it drives all cores so I think please add CONFIGURE_ARGS = --parallel=${MAKE_JOBS} and USE_GMAKE = Yes and then both configure and build will go parallel.
Re: Parallel cmake (was: Re: boost 1.52.0 status)
On Tue, Dec 11, 2012 at 7:59 PM, Amit Kulkarni amitk...@gmail.com wrote: Which does absolutely nothing. MAKE_JOBS has no effect on cmake. The build is strictly sequential. You can parallelize the bootstrap phase with CONFIGURE_ARGS += --parallel=${MAKE_JOBS} but the main build remains sequential so the overall gain is negligible. I haven't been able to figure out how to get cmake to build things in parallel, but then I'm largely unfamiliar with cmake. in cmake based builds when you cd WRKOBJDIR and do a gmake -j4 it usually works in driving all cores to utilization. I tried with USE_GMAKE = Yes and it drives all cores so I think please add CONFIGURE_ARGS = --parallel=${MAKE_JOBS} and USE_GMAKE = Yes and then both configure and build will go parallel. Please just let me know what should I do, because I know nothing about DPB and related stuff (yet) ciao, david
Re: Parallel cmake (was: Re: boost 1.52.0 status)
Which does absolutely nothing. MAKE_JOBS has no effect on cmake. The build is strictly sequential. You can parallelize the bootstrap phase with CONFIGURE_ARGS += --parallel=${MAKE_JOBS} but the main build remains sequential so the overall gain is negligible. I haven't been able to figure out how to get cmake to build things in parallel, but then I'm largely unfamiliar with cmake. in cmake based builds when you cd WRKOBJDIR and do a gmake -j4 it usually works in driving all cores to utilization. I tried with USE_GMAKE = Yes and it drives all cores so I think please add CONFIGURE_ARGS = --parallel=${MAKE_JOBS} and USE_GMAKE = Yes and then both configure and build will go parallel. Please just let me know what should I do, because I know nothing about DPB and related stuff (yet) Ok, apply this diff ? cmake.diff Index: Makefile === RCS file: /cvs/ports/devel/cmake/Makefile,v retrieving revision 1.73 diff -u -p -r1.73 Makefile --- Makefile11 Dec 2012 11:51:39 - 1.73 +++ Makefile11 Dec 2012 19:06:41 - @@ -8,7 +8,7 @@ HOMEPAGE = http://www.cmake.org/ CATEGORIES = devel COMMENT = portable build system DISTNAME = cmake-2.8.10.2 -REVISION = 0 +REVISION = 1 MASTER_SITES = ${HOMEPAGE}files/v2.8/ MAINTAINER = David Coppa dco...@openbsd.org @@ -29,12 +29,16 @@ CONFIGURE_STYLE = simple CONFIGURE_ARGS = --prefix=${PREFIX} \ --datadir=/share/cmake \ --docdir=/share/doc/cmake \ - --system-libs + --system-libs \ + --parallel=${MAKE_JOBS} PORTHOME = ${WRKDIR} SEPARATE_BUILD = Yes USE_GROFF =Yes + +# gmake enables dpb parallel build +USE_GMAKE =Yes REGRESS_TARGET = test then use this in a .sh file (watch amd64/i386 etc... or use machine) and observe if all cores are used with top subst 4 with real cores you have i.e hw.ncpu rm -rf /usr/ports/logs/amd64/locks/* rm -rf /usr/ports/pobj/locks/* /usr/ports/infrastructure/bin/dpb -j 4 -p 4 -u -U -R -J 10 devel/cmake
Re: Parallel cmake (was: Re: boost 1.52.0 status)
On Tue, Dec 11, 2012 at 01:22:27PM -0600, Amit Kulkarni wrote: Which does absolutely nothing. MAKE_JOBS has no effect on cmake. The build is strictly sequential. You can parallelize the bootstrap phase with CONFIGURE_ARGS += --parallel=${MAKE_JOBS} but the main build remains sequential so the overall gain is negligible. I haven't been able to figure out how to get cmake to build things in parallel, but then I'm largely unfamiliar with cmake. in cmake based builds when you cd WRKOBJDIR and do a gmake -j4 it usually works in driving all cores to utilization. I tried with USE_GMAKE = Yes and it drives all cores so I think please add CONFIGURE_ARGS = --parallel=${MAKE_JOBS} and USE_GMAKE = Yes and then both configure and build will go parallel. Please just let me know what should I do, because I know nothing about DPB and related stuff (yet) Ok, apply this diff ? cmake.diff Index: Makefile === RCS file: /cvs/ports/devel/cmake/Makefile,v retrieving revision 1.73 diff -u -p -r1.73 Makefile --- Makefile 11 Dec 2012 11:51:39 - 1.73 +++ Makefile 11 Dec 2012 19:06:41 - @@ -8,7 +8,7 @@ HOMEPAGE =http://www.cmake.org/ CATEGORIES = devel COMMENT =portable build system DISTNAME = cmake-2.8.10.2 -REVISION = 0 +REVISION = 1 MASTER_SITES = ${HOMEPAGE}files/v2.8/ MAINTAINER = David Coppa dco...@openbsd.org @@ -29,12 +29,16 @@ CONFIGURE_STYLE = simple CONFIGURE_ARGS = --prefix=${PREFIX} \ --datadir=/share/cmake \ --docdir=/share/doc/cmake \ - --system-libs + --system-libs \ + --parallel=${MAKE_JOBS} PORTHOME = ${WRKDIR} SEPARATE_BUILD = Yes USE_GROFF = Yes + +# gmake enables dpb parallel build +USE_GMAKE = Yes REGRESS_TARGET = test The use of GNU make like this seems bogus. I take it CMake isn't doing something right. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Re: Parallel cmake (was: Re: boost 1.52.0 status)
I tried with USE_GMAKE = Yes and it drives all cores so I think please add CONFIGURE_ARGS = --parallel=${MAKE_JOBS} and USE_GMAKE = Yes and then both configure and build will go parallel. Please just let me know what should I do, because I know nothing about DPB and related stuff (yet) Ok, apply this diff ? cmake.diff Index: Makefile === RCS file: /cvs/ports/devel/cmake/Makefile,v retrieving revision 1.73 diff -u -p -r1.73 Makefile --- Makefile 11 Dec 2012 11:51:39 - 1.73 +++ Makefile 11 Dec 2012 19:06:41 - @@ -8,7 +8,7 @@ HOMEPAGE =http://www.cmake.org/ CATEGORIES = devel COMMENT =portable build system DISTNAME = cmake-2.8.10.2 -REVISION = 0 +REVISION = 1 MASTER_SITES = ${HOMEPAGE}files/v2.8/ MAINTAINER = David Coppa dco...@openbsd.org @@ -29,12 +29,16 @@ CONFIGURE_STYLE = simple CONFIGURE_ARGS = --prefix=${PREFIX} \ --datadir=/share/cmake \ --docdir=/share/doc/cmake \ - --system-libs + --system-libs \ + --parallel=${MAKE_JOBS} PORTHOME = ${WRKDIR} SEPARATE_BUILD = Yes USE_GROFF = Yes + +# gmake enables dpb parallel build +USE_GMAKE = Yes REGRESS_TARGET = test The use of GNU make like this seems bogus. I take it CMake isn't doing something right. as far back as 2008 I seem to remember cmake having implicit dependency on gmake (i tried it on on Solaris,FreeBSD and then OpenBSD). my builds would always parallel build with gmake but not with plain os make. i still haven't figured out why. maybe david can chime in with more... perhaps http://cmake.3232098.n2.nabble.com/parallel-make-j-N-td7193296.html which leads to http://public.kitware.com/Bug/view.php?id=12882
Re: Parallel cmake (was: Re: boost 1.52.0 status)
On Tue, 11 Dec 2012, Brad Smith wrote: The use of GNU make like this seems bogus. I take it CMake isn't doing something right. Hi, I've found another (related) problem. $MAKE_PROGRAM is not honored and cmake picks gmake up if it's installed (even without USE_GMAKE=Yes). From cmake-2.8.10.2/bootstrap: ---8--- CMAKE_KNOWN_MAKE_PROCESSORS=gmake make ... # If MAKE is set, use that for make processor, otherwise use list of known make if [ -n ${MAKE} ]; then cmake_make_processors=${MAKE} else cmake_make_processors=${CMAKE_KNOWN_MAKE_PROCESSORS} fi ---8--- Ok for the diff below? I've also added --parallel=${MAKE_JOBS} to CONFIGURE_ARGS. I still need to investigate the make vs. gmake parallelization issues... cheers, David Index: Makefile === RCS file: /cvs/ports/devel/cmake/Makefile,v retrieving revision 1.73 diff -u -p -r1.73 Makefile --- Makefile11 Dec 2012 11:51:39 - 1.73 +++ Makefile12 Dec 2012 05:52:46 - @@ -8,7 +8,7 @@ HOMEPAGE = http://www.cmake.org/ CATEGORIES = devel COMMENT = portable build system DISTNAME = cmake-2.8.10.2 -REVISION = 0 +REVISION = 1 MASTER_SITES = ${HOMEPAGE}files/v2.8/ MAINTAINER = David Coppa dco...@openbsd.org @@ -29,7 +29,9 @@ CONFIGURE_STYLE = simple CONFIGURE_ARGS = --prefix=${PREFIX} \ --datadir=/share/cmake \ --docdir=/share/doc/cmake \ - --system-libs + --system-libs \ + --parallel=${MAKE_JOBS} +CONFIGURE_ENV =MAKE=${MAKE_PROGRAM} PORTHOME = ${WRKDIR}