Subject: | Parallel operation problems (--fork) |
Parallel operation does not seem to work on my machine (linux, perl
5.8.8). If I try to prove Test-Harness-3.12 with -j4 --fork itself, then
I get only a Storable error:
$ perl -Mblib blib/script/prove -j4 --fork
Can't store CODE items at blib/lib/Storable.pm (autosplit into
blib/lib/auto/Storable/_store_fd.al) line 304, at
/usr/local/share/perl/5.8.8/Parallel/Iterator.pm line 673
So maybe B::Deparse should be turned on for Storable? I tried this with
the following patch:
--- ./lib/TAP/Harness.pm Wed Jun 18 01:27:31 2008
+++ ./lib/TAP/Harness.pm Tue Jul 15 15:55:02 2008
@@ -405,6 +405,8 @@ sub _aggregate_forked {
croak "Parallel::Iterator required for --fork option ($@)"
if $@;
+ local $Storable::Deparse = 1;
+ local $Storable::Eval = 1;
my $iter = Parallel::Iterator::iterate(
{ workers => $self->jobs || 0 },
sub {
and rerun the test, and now I get
# Testing Test::Harness 3.12, Perl 5.008008, /usr/bin/perl
t/000-load............. ok
===( 0 )==========================================================
... and nothing happens anymore. top shows me that there are indeed
multiple processes running, and strace shows that there's a lot of
transporting Storable-serialized data in a pipe or so.
It is also surprising that it is possible to specify -j without --fork.
Then everything works, the output looks different, but it seems to work
as a single job only.
Regards,
Slaven