summaryrefslogtreecommitdiff
path: root/vest/parallelize.pl
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-30 17:08:38 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-30 17:08:38 +0000
commit4ca7a82eabb67e8a5de863ae10767259bd876dfb (patch)
tree52934e5b07b8ba758d3c5f1b6287b7cce83b0acb /vest/parallelize.pl
parent908abbbea0c491de061f43b246581e0cf4f3f02e (diff)
par show cd, -e dir if verbose
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@78 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'vest/parallelize.pl')
-rwxr-xr-xvest/parallelize.pl14
1 files changed, 9 insertions, 5 deletions
diff --git a/vest/parallelize.pl b/vest/parallelize.pl
index cd2576a9..9ac0f30d 100755
--- a/vest/parallelize.pl
+++ b/vest/parallelize.pl
@@ -203,8 +203,7 @@ if (my $pid = fork){
sleep 2; # give other thread time to start sentserver
$script =
qq{wait
-$cdcmd
-$sentclient $host:$port:$key $cmd
+$cdcmd$sentclient $host:$port:$key $cmd
};
if ($verbose){
print STDERR "Client script:\n====\n";
@@ -247,11 +246,12 @@ sub numof_live_jobs {
return ($#livejobs + 1);
}
my (@errors,@outs,@cmds);
-my $scriptfile=extend_path("$errordir/","$executable.sh",1,1);
+my $scriptfile=extend_path("$errordir","$executable.sh",1,1);
if ($errordir) {
open SF,">",$scriptfile || die;
- print SF $cmd,"\n";
+ print SF "$cdcmd$cmd\n";
close SF;
+ chmod 0755,$scriptfile;
}
sub launch_job_on_node {
my $node = $_[0];
@@ -286,7 +286,11 @@ sub launch_job_on_node {
$jobid =~ s/^(\d+)(.*?)$/\1/g;
$jobid =~ s/^Your job (\d+) .*$/\1/;
print STDERR " short job id $jobid\n";
- if ($verbose){ print STDERR "cmd: $cmd\n"; }
+ if ($verbose){
+ print STDERR "-e dir: $errordir\n" if $errordir;
+ print STDERR "cd: $abscwd\n";
+ print STDERR "cmd: $cmd\n";
+ }
if ($joblist == "") { $joblist = $jobid; }
else {$joblist = $joblist . "\|" . $jobid; }
my $cleanfn="`qdel $jobid 2> /dev/null`";