Does running a parallel "make -jN check" work safely?
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Tue Feb 24 22:03:00 GMT 2004
> From: Jim Wilson <wilson@specifixinc.com>
>
> Kaveh R. Ghazi wrote:
> > I'm wondering whether running "make -jN check" is safe. I'm
>
> I have problems with the java testsuite when I use make -jN. Some of
> the java tests are self-timing. They time a loop, use that timing info
> to set a timer, and then do something that might hang. See for instance
> libjava/testsuite/libjava.lang/Thread_Interrupt.java. These tests work
> fine normally, but are unreliable with make -jN. I suspect that the
> changing load average disrupts the timing of them. I avoid parallel
> make checks because of this problem. I am talking about using N >
> number of processors here. Maybe they work OK if N <= number of processors.
>
> If your target is a simulator, and you have a broken simulator that
> requires the dejagnu testglue.o file, then running tests in parallel may
> fail because of conflicts with the testglue.o file. This one might have
> been fixed though; I am not sure.
Thanks for the info. I get random libjava Thread_* failures
regardless. :-/ I don't use a sim so can't say much about that.
The thing I was worried about was if I run multilib passes (e.g. -m32
vs -m64 on sparc-solaris) whether it would run those in parallel too
and clobber the identically named executable for testcase.c with -m32
and testcase.c with -m64.
When Brad said he used parallel check regularly, I decided to give it
a try comparing serial vs -j10 (on a 32-cpu box). It seems to work
fine when the results were diff'ed. Turns out that multiple passes in
$RUNTESTFLAGS are executed serially. So that wasn't an issue.
Therefore, the maximum parallelization you'll get for "make -jN check"
is one thread for each of the gcc, g++, g77, objc, libstdc++-v3,
libjava and libffi testsuites. (More if you bootstrap with Ada and/or
treelang, but I generally don't.) So in my case, you'll achieve
maximum benefit at -j7. That's a vast improvement, BTW and allows me
to run with extra passes more often. I've made -jN a standard part of
my scripts that test GCC now.
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu
More information about the Gcc
mailing list