Re: parallel build does not work

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Wed, 9 Sep 2009 16:12:44 -0500


Hi Tom,

> This is root 5.24 on Mac OS X 10.5.8 (the latest Leopard). This is a
Mac Pro with 4 cores.
> Is this a known problem? Is there any fix? -- building Root now
dominates my build time, and a 4-CPU build would help substantially.
> "make -j 1" works fine, but "make -j 4" fails in different ways each
time.

After checking this on several machines, it looks like this is actually a bug/problem in bash and/or make
in Mac OS X 10.5.8 (the latest Leopard). The symptoms of the problem is that a simple vanilla call
to cp inside the makefile (to copy the include files into ./include) leads make to keep a very large number
of 'pipe' open consuming a lots of file descriptor.

This problem is fixed in snow leopard (Mac OS X 10.6, with bash 3.2.48).

To work around the problem you simply need to increase the maximum number of opened file
descriptors per process on your machine by issuing (for example in your .bashrc):

     ulimit -S -n 2048

to increase the limit from 256 (your default) to 2048 (enough to cover the makefile 'leak').

I tested this with your 'loop' example and it succeeded 100% of the iterations.

Cheers,
Philippe. Received on Wed Sep 09 2009 - 23:12:52 CEST

This archive was generated by hypermail 2.2.0 : Thu Sep 10 2009 - 11:50:03 CEST