X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dqsub;h=245f11ece72bca05abcc6736ba2c37badbaa5150;hb=6ff8280b017eb99c4ce759895d460bcb76646f4c;hp=7257d5c7873f8cda8882d77217bbaa4077866898;hpb=4e6aab12b0aa8a7752f231aa3b1219e8232250c5;p=uiuc_igb_scripts.git diff --git a/dqsub b/dqsub index 7257d5c..245f11e 100755 --- 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)); } @@ -202,7 +207,23 @@ sub write_qsub_script { # this script was written by dqsub EOF if (defined $opt->{array}) { - die "--array is currently not implemented"; + my $array_opt = join("\n",@{$array}); + $script .= <{array} eq 'chdir') { + $script .= <