X-Git-Url: https://git.donarmstrong.com/?p=uiuc_igb_scripts.git;a=blobdiff_plain;f=dqsub;h=0a04f2d2396c208b0ebdd613b948b8f05e2c07d4;hp=51546237f17bee6d6c0fbdbae53cdf99e4d27582;hb=1a8b54ebd92ab8f698b327a4a78764ef37916f0a;hpb=b0ca2cd2abbc503a304210db7f3f5fc277679532 diff --git a/dqsub b/dqsub index 5154623..0a04f2d 100755 --- a/dqsub +++ b/dqsub @@ -158,7 +158,7 @@ if ($options{interactive} and @ARGV) { } if (not defined $options{batch}) { - qx/which sbatch/; + qx{which sbatch >/dev/null 2>&1}; if ($? == 0) { $options{batch} = 'slurm' } else { @@ -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}; }