mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
pass in PATH variable from master node. When you're running of a grid but really just qsubbing everything to 1 slave node
This commit is contained in:
parent
2d1da3219d
commit
27b36e0c96
@ -18,7 +18,19 @@ sub trim($)
|
||||
my $host = `hostname`; chop($host);
|
||||
print STDERR "STARTING UP AS PROCESS $$ ON $host AT ".`date`;
|
||||
|
||||
my ($CONFIG_FILE,$EXECUTE,$NO_GRAPH,$CONTINUE,$FINAL_STEP,$FINAL_OUT,$VERBOSE,$IGNORE_TIME,$DELETE_CRASHED,$DELETE_VERSION);
|
||||
my ($CONFIG_FILE,
|
||||
$EXECUTE,
|
||||
$NO_GRAPH,
|
||||
$CONTINUE,
|
||||
$FINAL_STEP,
|
||||
$FINAL_OUT,
|
||||
$VERBOSE,
|
||||
$IGNORE_TIME,
|
||||
$DELETE_CRASHED,
|
||||
$DELETE_VERSION,
|
||||
$MASTER_PATH
|
||||
);
|
||||
|
||||
my $SLEEP = 2;
|
||||
my $META = "$RealBin/experiment.meta";
|
||||
|
||||
@ -48,7 +60,8 @@ die("experiment.perl -config config-file [-exec] [-no-graph]")
|
||||
'verbose' => \$VERBOSE,
|
||||
'sleep=i' => \$SLEEP,
|
||||
'max-active=i' => \$MAX_ACTIVE,
|
||||
'no-graph' => \$NO_GRAPH);
|
||||
'no-graph' => \$NO_GRAPH,
|
||||
'master-path=s' => \$MASTER_PATH);
|
||||
if (! -e "steps") { `mkdir -p steps`; }
|
||||
|
||||
die("error: could not find config file")
|
||||
@ -3442,7 +3455,14 @@ sub create_step {
|
||||
$subdir = "lm" if $subdir eq "interpolated-lm";
|
||||
open(STEP,">$file") or die "Cannot open: $!";
|
||||
print STEP "#!/bin/bash\n\n";
|
||||
print STEP "PATH=\"".$ENV{"PATH"}."\"\n";
|
||||
|
||||
if (defined($MASTER_PATH)) {
|
||||
print STEP "PATH=\"$MASTER_PATH\"\n";
|
||||
}
|
||||
else {
|
||||
print STEP "PATH=\"".$ENV{"PATH"}."\"\n";
|
||||
}
|
||||
|
||||
print STEP "cd $dir\n";
|
||||
print STEP "echo 'starting at '`date`' on '`hostname`\n";
|
||||
print STEP "mkdir -p $dir/$subdir\n\n";
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Author: Rico Sennrich
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Author: Rico Sennrich
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user