diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-02-06 23:56:12 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-02-06 23:56:12 -0500 |
commit | e214aab49bc83b845d045b9a2d85615ed9ad64d6 (patch) | |
tree | 8403539304cd4206a52cf6024780e1584d09823d /vest/parallelize.pl | |
parent | 6e348e552ca8551cf54c1610f6e02f7058b60f09 (diff) |
parallelize vest on large shared memory machines using fork and make
Diffstat (limited to 'vest/parallelize.pl')
-rwxr-xr-x | vest/parallelize.pl | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/vest/parallelize.pl b/vest/parallelize.pl index daaf9b2f..cb5406ec 100755 --- a/vest/parallelize.pl +++ b/vest/parallelize.pl @@ -21,12 +21,12 @@ my $SCRIPT_DIR; BEGIN { use Cwd qw/ abs_path /; use File::Basename; $SCRIPT_DIR = dirname(abs_path($0)); push @INC, $SCRIPT_DIR, "$SCRIPT_DIR/../environment"; } use LocalConfig; +use Cwd qw/ abs_path cwd getcwd /; use File::Temp qw/ tempfile /; use Getopt::Long; use IPC::Open2; use strict; use POSIX ":sys_wait_h"; -use Cwd qw(getcwd); my $tailn=5; # +0 = concatenate all the client logs. 5 = last 5 lines my $recycle_clients; # spawn new clients when previous ones terminate @@ -58,12 +58,6 @@ sub debug { print STDERR "DEBUG: $filename($line): ",join(' ',@_),"\n"; } } -sub abspath($) { - my $p=shift; - my $a=`readlink -f $p`; - chomp $a; - $a -} my $is_shell_special=qr.[ \t\n\\><|&;"'`~*?{}$!()].; my $shell_escape_in_quote=qr.[\\"\$`!].; sub escape_shell { @@ -116,7 +110,7 @@ sub extend_path($$;$$) { return $base.$ext; } -my $abscwd=abspath(&getcwd); +my $abscwd=abs_path(&getcwd); sub print_help; my $use_fork; @@ -152,7 +146,7 @@ if ($no_which) { chomp $cmd; die "$prog not found - $cmd" unless $cmd; } -#$cmd=abspath($cmd); +#$cmd=abs_path($cmd); for my $arg (@ARGV) { $cmd .= " ".escape_shell($arg); } @@ -180,7 +174,7 @@ if ($errordir) { print SF "$cdcmd$cmd\n"; close SF; chmod 0755,$scriptfile; - $errordir=abspath($errordir); + $errordir=abs_path($errordir); &verbose("-e dir: $errordir"); } |