The distcc docs discuss a lot about the problems when one machine has
several CPUs, and the conclusion is that if one of your machines is a
4-way SMP you have to run 4 processes on all the other machines too.
Here's a 3-line proof-of-concept patch for my proposed solution: if a is
4-way, and b and c are UP you'll set
DISTCC_HOSTS='1%a 2%a 3%a 4%a b c'
and just run one or two processes per "host". What comes before the %
sign can be anything, the important thing is that it's different for
each processor so that different lockfiles are used.

Wouldn't something like this work?

/Jonas Jensen
diff -ur distcc-timeout/src/clinet.c mydistcc/src/clinet.c
--- distcc-timeout/src/clinet.c	2002-11-04 21:32:36.000000000 +0100
+++ mydistcc/src/clinet.c	2002-11-04 21:29:40.000000000 +0100
@@ -83,6 +83,12 @@
     int fd;
     struct hostent *hp;
 
+    {
+    	char *tmp = strrchr(host, '%');
+	if (tmp)
+    	    host = tmp + 1;
+    }
+
     /* Ignore SIGPIPE; we consistently check error codes and will
      * see the EPIPE. */
     dcc_ignore_sigpipe(1);

Reply via email to