]> git.donarmstrong.com Git - uiuc_igb_scripts.git/commitdiff
add array slot limit
authorDon Armstrong <don@donarmstrong.com>
Wed, 5 Aug 2015 17:15:52 +0000 (10:15 -0700)
committerDon Armstrong <don@donarmstrong.com>
Wed, 5 Aug 2015 17:15:52 +0000 (10:15 -0700)
dqsub

diff --git a/dqsub b/dqsub
index 8d12b21fc6f4f9a6ec256c2e53f42aff47ff70a8..77ff2254cba4e75166ef13deb320883f00990686 100755 (executable)
--- a/dqsub
+++ b/dqsub
@@ -26,6 +26,7 @@ dqsub [options]
    --nodes nodes to use
    --array array mode (one of 'chdir' or 'xargs' or '')
    --array-from file to read arrays from (default STDIN)
+   --array-slot-limit
    --ppn processors per node to use
    --mem memory to request
    --dir Directory to run the script in (default current directory)
@@ -96,6 +97,7 @@ GetOptions(\%options,
            'nodes=i',
            'array=s',
            'array_from|array-from=s',
+           'array_slot_limit|array-slot-limit=i',
            'ppn|processors-per-node=i',
            'mem|memory=s',
            'dir=s',
@@ -136,6 +138,9 @@ if ($options{interactive}) {
         @array = read_array_options(\%options) if $options{array};
         # the -t option gives the range of elements for an array job
         push @qsub_options,'-t','1-'. scalar @array;
+        if ($options->{array_slot_limit}) {
+            @qsub_options[$#qsub_options] .= '%'.$options->{array_slot_limit};
+        }
     }
     call_qsub(\@qsub_options,write_qsub_script(\%options,\@ARGV,\@array));
 }