}
if (not defined $options{batch}) {
- qx/which sbatch/;
+ qx{which sbatch >/dev/null 2>&1};
if ($? == 0) {
$options{batch} = 'slurm'
} else {
if ($options{array_all_in_one_job}) {
$options{array_per_job} = scalar @array;
} else {
- push @qsub_options,'-t','1-'. ceil(scalar @array / $options{array_per_job});
+ if ($options{batch} eq 'pbs') {
+ push @qsub_options,'-t';
+ } else {
+ push @qsub_options,'-a';
+ }
+ push @qsub_options,'1-'. ceil(scalar @array / $options{array_per_job});
if ($options{array_slot_limit}) {
$qsub_options[$#qsub_options] .= '%'.$options{array_slot_limit};
}