help-make
[Top][All Lists]
Advanced

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

Re: Long dependency chain in otherwise parallel build


From: Mike Shal
Subject: Re: Long dependency chain in otherwise parallel build
Date: Sat, 27 May 2017 11:57:06 -0400

On Sat, May 27, 2017 at 11:18 AM, Jed Brown <address@hidden> wrote:
> Is it possible (without recursive make) to have make start building
> these other Fortran modules as soon as their dependencies are met
> instead of only after all the independent objects (from C sources) have
> been built?

I'm curious about this too. We had a similar issue at Mozilla recently
where the long pole was scheduled at the end of the build, but only
when building in parallel. It seems that make switches from a
depth-first search when building with -j1 to a breadth-first search
when building with -j2+. We worked around it by moving around the
dependencies so the long pole in the build was at a depth of 0, but it
sounds like that won't help in your case. Unfortunately no amount of
reordering dependencies will help, since it seems to be primarily
driven by the depth of the target. Here's some background info:
https://bugzilla.mozilla.org/show_bug.cgi?id=1262241#c5

If there is a setting somewhere to tweak the scheduler to use a DFS in
parallel mode, I think that would help make use of all the cores for
the duration of the build.

-Mike



reply via email to

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