From: Don Armstrong Date: Wed, 8 Feb 2017 18:55:47 +0000 (-0800) Subject: sbatch reads from STDIN by default X-Git-Url: https://git.donarmstrong.com/?p=uiuc_igb_scripts.git;a=commitdiff_plain;h=8114b121daa2edbaf38bef1aaed2f5fe4fd028c2 sbatch reads from STDIN by default --- diff --git a/dqsub b/dqsub index 5b4b845..fe95bba 100755 --- a/dqsub +++ b/dqsub @@ -192,7 +192,7 @@ if ($options{batch} eq 'pbs') { if ($options{interactive}) { print STDERR 'running: qsub '.join(' ',@qsub_options) if $DEBUG; - exec('qsub',@qsub_options); + exec($JOB_SUBMITTER,@qsub_options); } else { my @array = (); if ($options{array}) { @@ -207,6 +207,9 @@ if ($options{interactive}) { } } } + if ($options{batch} eq 'pbs') { + push @qsub_options,'-'; + } call_qsub(\@qsub_options,write_qsub_script(\%options,\@ARGV,\@array)); } @@ -320,7 +323,7 @@ sub read_array_options{ sub call_qsub { my ($qsub_options,$script) = @_; my $qsub_fh; - open $qsub_fh,'|-',$JOB_SUBMITTER,@{$qsub_options},'-' or + open $qsub_fh,'|-',$JOB_SUBMITTER,@{$qsub_options} or die "Unable to start $JOB_SUBMITTER: $!"; print {$qsub_fh} $script or die "Unable to print to $JOB_SUBMITTER: $!";