--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)
'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',
@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));
}
if (defined $opt->{array}) {
my $array_opt = join("\n",@{$array});
$script .= <<EOF;
-OPT=\$(sed -n -e "\$PBS_ARRAYID p"<<'_HERE_DOC_END'
+OPT=\$(sed -n -e "\$PBS_ARRAYID p"<<'_HERE_DOC_END_'
$array_opt
_HERE_DOC_END_
)
exec $command "\$OPT";
EOF
}
- die "--array is currently not implemented";
} else {
$script .= <<EOF;
# there's no array, so just executing the command with arguments