diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-03-16 19:49:13 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-03-16 19:49:13 -0400 |
commit | 003d5293b1647cfdf38af3c622adaa5db74a1409 (patch) | |
tree | 34b5700faed41db6389175ae60d0facb323802b3 /vest/dist-vest.pl | |
parent | 6b6eeff3130bcb40980886d8179ba4ad6842325e (diff) | |
parent | 237de3db6d5917707b745e3df7be42f2497e3783 (diff) |
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'vest/dist-vest.pl')
-rwxr-xr-x | vest/dist-vest.pl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/vest/dist-vest.pl b/vest/dist-vest.pl index 973a29ef..d17d7de1 100755 --- a/vest/dist-vest.pl +++ b/vest/dist-vest.pl @@ -194,7 +194,6 @@ sub modbin { my $src=$$_; $$_="$bindir/".basename($src); check_call("cp -p $src $$_"); - die "cp $src $$_ failed: $!" unless $? == 0; } } sub dirsize { @@ -372,13 +371,12 @@ while (1){ if ($first_shard) { print STDERR "$script\n"; $first_shard=0; } $nmappers++; - my $qcmd = "QSUB_CMD -N $client_name -o /dev/null -e $logdir/$client_name.ER $script_file"; + my $qcmd = "$QSUB_CMD -N $client_name -o /dev/null -e $logdir/$client_name.ER $script_file"; my $jobid = check_output("$qcmd"); - die "qsub failed: $!\nCMD was: $qcmd" unless $? == 0; chomp $jobid; $jobid =~ s/^(\d+)(.*?)$/\1/g; $jobid =~ s/^Your job (\d+) .*$/\1/; - push(@cleanupcmds, check_output("qdel $jobid 2> /dev/null")); + push(@cleanupcmds, "qdel $jobid 2> /dev/null"); print STDERR " $jobid"; if ($joblist == "") { $joblist = $jobid; } else {$joblist = $joblist . "\|" . $jobid; } @@ -398,7 +396,7 @@ while (1){ print STDERR "Waiting for mappers to complete...\n"; while ($nmappers > 0) { sleep 5; - my @livejobs = grep(/$joblist/, split(/\n/, check_output("qstat | grep -v ' C '"))); + my @livejobs = grep(/$joblist/, split(/\n/, unchecked_output("qstat | grep -v ' C '"))); $nmappers = scalar @livejobs; } print STDERR "All mappers complete.\n"; @@ -575,7 +573,11 @@ sub enseg { while (my $line=<SRC>){ chomp $line; if ($line =~ /^\s*<seg/i) { + if($line =~ /id="[0-9]+"/) { print NEWSRC "$line\n"; + } else { + die "When using segments with pre-generated <seg> tags, you must include a zero-based id attribute"; + } } else { print NEWSRC "<seg id=\"$i\">$line</seg>\n"; } |