@@ -27,14 +27,14 @@ class SLURMPlugin(SLURMLikeBatchManagerBase):
27
27
28
28
- template : template to use for batch job submission
29
29
30
+ - sbatch_args: arguments to pass prepend to the sbatch call
31
+
30
32
31
33
'''
32
34
33
35
34
36
def __init__ (self , ** kwargs ):
35
- '''
36
- Constructor
37
- '''
37
+
38
38
template = """
39
39
#!/bin/sh
40
40
"""
@@ -56,6 +56,10 @@ def _is_pending(self, taskid):
56
56
return o .find (taskid ) > - 1
57
57
58
58
def _submit_batchtask (self , scriptfile , node ):
59
+ """
60
+ This is more or less the _submit_batchtask from sge.py with flipped variable
61
+ names, different command line switches, and different output formatting/processing
62
+ """
59
63
cmd = CommandLine ('sbatch' , environ = os .environ .data ,
60
64
terminal_output = 'allatonce' )
61
65
path = os .path .dirname (scriptfile )
@@ -98,7 +102,7 @@ def _submit_batchtask(self, scriptfile, node):
98
102
sleep (self ._retry_timeout ) # sleep 2 seconds and try again.
99
103
else :
100
104
iflogger .setLevel (oldlevel )
101
- raise RuntimeError ('\n ' .join ((('Could not submit slurm task'
105
+ raise RuntimeError ('\n ' .join ((('Could not submit sbatch task'
102
106
' for node %s' ) % node ._id ,
103
107
str (e ))))
104
108
else :
@@ -109,5 +113,5 @@ def _submit_batchtask(self, scriptfile, node):
109
113
taskid = int (re .match ("Your job ([0-9]*) .* has been submitted" ,
110
114
lines [- 1 ]).groups ()[0 ])
111
115
self ._pending [taskid ] = node .output_dir ()
112
- logger .debug ('submitted slurm task: %d for node %s' % (taskid , node ._id ))
116
+ logger .debug ('submitted sbatch task: %d for node %s' % (taskid , node ._id ))
113
117
return taskid
0 commit comments