From f8644b8a96555925b520d090ac6801fedc29e786 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@schedmd.com> Date: Thu, 7 Jan 2016 10:47:56 -0800 Subject: [PATCH] bsub - add cwd option --- contribs/openlava/bsub.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contribs/openlava/bsub.pl b/contribs/openlava/bsub.pl index afe810382b7..8bc21d37dbe 100644 --- a/contribs/openlava/bsub.pl +++ b/contribs/openlava/bsub.pl @@ -51,6 +51,7 @@ use Switch; my (#$start_time, #$account, #$array, + $workdir, $err_path, #$export_env, $exclusive, @@ -78,6 +79,7 @@ my $srun = "${FindBin::Bin}/srun"; GetOptions(#'a=s' => \$start_time, #'A=s' => \$account, + 'cwd=s' => \$workdir, 'e=s' => \$err_path, #'h' => \$hold, 'I' => \$interactive, @@ -159,6 +161,8 @@ if (_check_script($ARGV[0])) { $command .= " -e $err_path" if $err_path; $command .= " -o $out_path" if $out_path; +$command .= " -D $workdir" if $workdir; + #print " command = $command\n"; @@ -332,6 +336,7 @@ B<bsub> - submit a batch job in a familiar OpenLava format =head1 SYNOPSIS bsub + [-cwd Working Directory Path] [-e Error Path] [-I Interactive Mode] [-m Node List] @@ -352,6 +357,10 @@ The B<bsub> submits batch jobs. It is aimed to be feature-compatible with OpenLa =over 4 +=item B<-cwd Working Directory Path> + +Specify the working directory path for the job. + =item B<-e Error Path> Specify a new path to receive the standard error output for the job. -- GitLab