help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Maximizing Library Build Parallelism


From: EXT-Pennington, Dale K
Subject: Maximizing Library Build Parallelism
Date: Tue, 13 Jan 2009 09:12:31 -0600

Folks,

I am using gmake 3.80 and an AIX 6.1 system. We are working to upgrade
our make setup to allow us to use the -j option whereever we can to
speed up builds.

The particular issue is libraries. The make manuals warns about building
parts of a library in parallel because multiple processes attemping ar
commands on the same archive at the same time might corrupt said
archive.

Now I could just add the .NOTPARALLEL target to the makefiles that make
the libraries, but I would prefer to make the objects in parallel if I
can.

For a simple test, I set up a makefile to see if I could just turn off
any -j option when doing the archive part. The test makefile looked like

all :
        @echo "Testing Make CMD = " $(MAKECMDGOALS) " Flags = "
$(MAKEFLAGE)
        @$(MAKE) objs --no-print-directory
        @($MAKE) lib -j 1 --no-print-directory

objs :
        @echo "Testing Make CMD = " $(MAKECMDGOALS) " Flags = "
$(MAKEFLAGE)

lib :
        @echo "Testing Make CMD = " $(MAKECMDGOALS) " Flags = "
$(MAKEFLAGE)

(In the real app, objs would depend on the list of objects to go in the
archive, and lib would depend on objs)

When I ran a test with just 'gmake' I saw what I expects, all's flags
were blank, objs and lib 's flags had the --no-print-directory

When I ran a test with 'gmake -j 2' I saw the following :
Testing Make CMD =  Flags = --jobserver-fds=3,4 -j
Testing Make CMD = objs Flags = --no-print-directory -
--jobserver-fds=3,4 -j
gmake[1]: warning: -jN forced in submake: disabling jobserver mode.
Testing Make CMD = lib Flags = --no-print-directory

Looking at is, the -j override would seem to work as expected, but I get
that warning message. I would prefer not to have that, as part of the
goal for the final system is to only have significant error messages on
the screen when performing a build using this make setup in the CM area.

Any suggestions on how I might deal with that (or is there a better
method for what I am trying to do).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]