help-make
[Top][All Lists]
Advanced

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

Re: Is Parallel Execution Safe?


From: John Graham-Cumming
Subject: Re: Is Parallel Execution Safe?
Date: Tue, 22 Mar 2005 10:00:57 -0500

On Tue, 2005-03-22 at 17:52 +0530, Mathew Koshy wrote:
> I would like to know how efficient is –j option for large projects and
> is it enough to specify –j option in the top level makefile? i.e does
> GNU Make parses all makefile in a project before beginning to build
> targets so that it knows the full dependency graph and can do parallel
> builds *safely* with the "-j" flag?

It's definitely worth trying -j even on a single CPU machine (where -j2
may get you a faster build).   In theory -j is great, in practice... it
depends.  If your Makefiles are written with correct dependencies and
don't make assumptions about "left to right" prereq ordering then you
should be OK.

In my professional life I work on parallel GNU Make emulation and we've
seen that many times in large projects (i.e. 1000s of source files)
there are problems that cause GNU Make -j to break down for values > 4.
This is totally a rule of thumb, and not an indication of a problem with
GNU Make -j; I've just seen multiple customers who can't get past -j4
because their dependencies are not fully specified.

John.
-- 
John Graham-Cumming

Home: http://www.jgc.org/
Work: http://www.electric-cloud.com/
POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/






reply via email to

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