[Top][All Lists]

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

Parallel Execution - Job numbers

From: Dan
Subject: Parallel Execution - Job numbers
Date: 23 Jun 2006 02:46:20 -0700
User-agent: G2/0.2

Hi.  At our work we have dualcore processors, so I want to take
advantage of gnu make's "-j 2" option to run two jobs at the same time.
 We use Windows, and use use two compilers - Watcom and Visualc.   The
Watcom build works fine, and we're seeing our compile times halved.  I
was expecting to get trouble with the precompiled headers, as the two
parallel jobs would probably be fighting with each other over the
precompiled header file.  With Watcom it seems to work okay, with the
occasional warning message, but nothing that slows it down really.
With the VisualC compiler it fails straight away due to the precompiled
header fighting.

Is there anyway I can find out which process a rule is running in?  For
example some kind of automatic variable?  That way I can have two
precompiled header files - one per parallel job.

For example, I could do this ...

%.obj: %.c
        $(cc) $< $(cc_args) /Fo$@ /Fpjob_$(jobnumber).pch

and this would use job_1.pch for job 1, and job_2.pch for job 2.

Is this any functionality like this?

- Dan

reply via email to

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