]> git.donarmstrong.com Git - uiuc_igb_scripts.git/commitdiff
slurm interactive jobs need --pty, a shell, and srun
authorDon Armstrong <don@donarmstrong.com>
Tue, 27 Jun 2017 17:22:26 +0000 (10:22 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 27 Jun 2017 17:22:26 +0000 (10:22 -0700)
dqsub

diff --git a/dqsub b/dqsub
index 0a04f2d2396c208b0ebdd613b948b8f05e2c07d4..1058b91914e896a7c88db741d349b6e85afa35ea 100755 (executable)
--- a/dqsub
+++ b/dqsub
@@ -194,7 +194,12 @@ if ($options{batch} eq 'pbs') {
 
 if ($options{interactive}) {
     print STDERR 'running: '.$JOB_SUBMITTER.' '.join(' ',@qsub_options) if $DEBUG;
 
 if ($options{interactive}) {
     print STDERR 'running: '.$JOB_SUBMITTER.' '.join(' ',@qsub_options) if $DEBUG;
-    exec($JOB_SUBMITTER,@qsub_options);
+    if ($options{batch} eq 'pbs') {
+        exec($JOB_SUBMITTER,@qsub_options);
+    } else {
+        exec('srun',@qsub_options);
+    }
+
 } else {
     my @array = ();
     if ($options{array}) {
 } else {
     my @array = ();
     if ($options{array}) {
@@ -296,7 +301,7 @@ sub generate_slurm_options{
         push @qo,'--mem='.$options{mem};
     }
     if ($options->{interactive}) {
         push @qo,'--mem='.$options{mem};
     }
     if ($options->{interactive}) {
-        push @qo,'-I';
+        push @qo,'--pty',$ENV{SHELL}//'bash';
     }
     if ($options->{name}) {
         push @qo,'-J',$options->{name};
     }
     if ($options->{name}) {
         push @qo,'-J',$options->{name};