]> git.donarmstrong.com Git - uiuc_igb_scripts.git/blobdiff - dqsub
add --join option
[uiuc_igb_scripts.git] / dqsub
diff --git a/dqsub b/dqsub
index 27b8b39c5b43e97a0da442b65e241fd9aa247438..b1d1d0519e0e5b398e0c09ade09fe1491322b47f 100755 (executable)
--- a/dqsub
+++ b/dqsub
@@ -31,6 +31,8 @@ dqsub [options]
    --ppn processors per node to use
    --mem memory to request
    --dir Directory to run the script in (default current directory)
+   --account, -A Account name to use
+   --join, -J join error and output streams (default)
    --name, -N Name of the job
    --debug, -d debugging level (Default 0)
    --help, -h display this help
@@ -60,6 +62,15 @@ command run in the current directory.
 File to read array arguments from. If not provided, and B<--array> is
 given, arguments will be read from STDIN.
 
+=item B<--account, -A>
+
+Account name to use
+
+=item B<--join, J>
+
+Whether to join STDOUT and STDERR. On by default; disable with
+C<--nojoin>.
+
 =item B<--debug, -d>
 
 Debug verbosity. (Default 0)
@@ -94,6 +105,7 @@ my %options = (nodes           => 1,
                man             => 0,
                interactive     => 0,
                array_per_job   => 1,
+               join            => 1,
               );
 
 GetOptions(\%options,
@@ -106,6 +118,8 @@ GetOptions(\%options,
            'array_slot_limit|array-slot-limit=i',
            'array_all_in_one_job|array-all-in-one-job!',
            'ppn|processors-per-node=i',
+           'account|A=s',
+           'join|J!',
            'mem|memory=s',
            'time|walltime=s','cputime|cput=s','host=s',
            'pmem|process_mem|process-mem=s',
@@ -178,6 +192,9 @@ sub generate_qsub_options{
     if (defined $options->{ppn}) {
         $l[$#l] .= ':ppn='.$options->{ppn};
     }
+    if (defined $options->{account}) {
+        push @qo,'-A',$options->{account};
+    }
     my %l_options =
         (mem => 'vmem',
          time => 'walltime',
@@ -201,6 +218,10 @@ sub generate_qsub_options{
     } else {
         push @qo,'-N',join('_',@{$args}[0..min($#{$args},2)]);
     }
+    # join error and output streams
+    if ($options->{join}) {
+        push @qo,'-j','oe';
+    }
     return @qo;
 }