fix sbatch array options
authorDon Armstrong <don@donarmstrong.com>
Tue, 6 Jun 2017 20:10:04 +0000 (13:10 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 6 Jun 2017 20:10:04 +0000 (13:10 -0700)
dqsub

diff --git a/dqsub b/dqsub
index 5154623..ed8b629 100755 (executable)
--- a/dqsub
+++ b/dqsub
@@ -203,7 +203,12 @@ if ($options{interactive}) {
         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};
             }