18
|
1
|
|
2 ## Interface for AbstractClusterLauncher
|
|
3 #
|
|
4 class IClusterLauncher(object):
|
|
5
|
|
6 ## Constructor.
|
|
7 #
|
|
8 def __init__( self ):
|
|
9 pass
|
|
10
|
|
11 ## Useful commands before running the program (check, open database connector...).
|
|
12 #
|
|
13 def start(self):
|
|
14 pass
|
|
15
|
|
16 ## Useful commands after the program was run (clean, close database connector...).
|
|
17 #
|
|
18 def end(self):
|
|
19 pass
|
|
20
|
|
21 ## Launch jobs in parallel on each file in the query directory.
|
|
22 #
|
|
23 def run(self):
|
|
24 pass
|
|
25
|
|
26 ## Initialize the job (jobname, command, launcher).
|
|
27 #
|
|
28 def initializeJob(self, fileName, count):
|
|
29 pass
|
|
30
|
|
31 ## Return all the job commands as a string.
|
|
32 #
|
|
33 def getJobCommandsAsString(self, fileName, jobName, minFreeGigaInTmpDir=1):
|
|
34 pass
|
|
35
|
|
36 ## Return the generic help as a string.
|
|
37 #
|
|
38 def getGenericHelpAsString(self):
|
|
39 pass
|
|
40
|
|
41 ## Check the generic attributes before running the program.
|
|
42 #
|
|
43 def checkGenericAttributes(self):
|
|
44 pass
|
|
45
|
|
46 ## Check the specific attributes of each program launcher.
|
|
47 #
|
|
48 def checkSpecificAttributes(self):
|
|
49 pass
|
|
50
|
|
51 ## Check that all required programs are in the user's PATH.
|
|
52 #
|
|
53 def checkProgramAvailability(self):
|
|
54 pass
|
|
55
|
|
56 ## Return the command-line to launch in each job. Specified in each wrapper.
|
|
57 #
|
|
58 def getProgramCommandLineAsString(self):
|
|
59 pass
|
|
60
|
|
61 ## Return the list of files to keep at the end of each job. Specified in each wrapper.
|
|
62 #
|
|
63 def getListFilesToKeep(self):
|
|
64 pass
|
|
65
|
|
66 ## Return the list of files to remove at the end of each job. Specified in each wrapper.
|
|
67 #
|
|
68 def getListFilesToRemove(self):
|
|
69 pass
|
|
70
|
|
71 ## Return the name of the job file as a string.
|
|
72 #
|
|
73 def getJobFileNameAsString(self, count):
|
|
74 pass
|
|
75
|
|
76 ## Return the command to update the job status in the table.
|
|
77 #
|
|
78 def getCmdUpdateJobStatusAsString(self, newStatus):
|
|
79 pass
|
|
80
|
|
81 ## Return the launching command as a string. Launch the wrapper, retrieve its exit status, update status if error.
|
|
82 #
|
|
83 def getCmdToLaunchWrapper(self, fileName, genericCmd, exeWrapper):
|
|
84 pass
|
|
85
|
|
86 ## Return the commands to keep the output files.
|
|
87 #
|
|
88 def getCmdToKeepFiles( self, fileName, lFilesToKeep ):
|
|
89 pass
|
|
90
|
|
91 ## Return the commands to remove the temporary files.
|
|
92 #
|
|
93 def getCmdToRemoveFiles( self, fileName, lFilesToRemove ):
|
|
94 pass
|
|
95
|
|
96 ## Remove all job files.
|
|
97 #
|
|
98 def removeAllJobFiles( self ):
|
|
99 pass
|
|
100
|
|
101 ## Remove all job stdout.
|
|
102 #
|
|
103 def removeAllJobStdouts( self ):
|
|
104 pass
|
|
105
|
|
106 ## Remove all job stderr.
|
|
107 #
|
|
108 def removeAllJobStderrs( self ):
|
|
109 pass
|
|
110
|
|
111 ## Process the output file if necessary.
|
|
112 #
|
|
113 def processOutputFile( self, tmpFile, outFile ):
|
|
114 pass
|
|
115
|
|
116 ## Concatenate output files from all jobs.
|
|
117 #
|
|
118 def catOutputFiles( self ):
|
|
119 pass
|
|
120
|
|
121 ## Return the specific help as a string.
|
|
122 #
|
|
123 def getSpecificHelpAsString( self ):
|
|
124 pass
|
|
125
|
|
126 ## Return the help as a string.
|
|
127 #
|
|
128 def getHelpAsString( self ):
|
|
129 pass
|
|
130
|
|
131 ##Set a generic attribute from the command-line arguments.
|
|
132 #
|
|
133 def setAGenericAttributeFromCmdLine( self, o, a="" ):
|
|
134 pass
|
|
135
|
|
136 ## Set the specific attributes from the command-line arguments.
|
|
137 #
|
|
138 def setASpecificAttributeFromCmdLine( self, o, a="" ):
|
|
139 pass
|
|
140
|
|
141 ## Set the attributes from the command-line arguments.
|
|
142 #
|
|
143 def setAttributesFromCmdLine( self ):
|
|
144 pass
|
|
145
|
|
146 ##
|
|
147 #
|
|
148 def setInputDirectory( self, arg ):
|
|
149 pass
|
|
150
|
|
151 ##
|
|
152 #
|
|
153 def setQueueName( self, arg ):
|
|
154 pass
|
|
155
|
|
156 ##
|
|
157 #
|
|
158 def setGroupIdentifier( self, arg ):
|
|
159 pass
|
|
160
|
|
161 ##
|
|
162 #
|
|
163 def setInputFileSuffix( self, arg ):
|
|
164 pass
|
|
165
|
|
166 ##
|
|
167 #
|
|
168 def setAcronym( self, arg ):
|
|
169 pass
|
|
170
|
|
171 ##
|
|
172 #
|
|
173 def setConfigFile( self, arg ):
|
|
174 pass
|
|
175
|
|
176 ##
|
|
177 #
|
|
178 def setCurrentDirectory( self ):
|
|
179 pass
|
|
180
|
|
181 ##
|
|
182 #
|
|
183 def setTemporaryDirectory( self, arg ):
|
|
184 pass
|
|
185
|
|
186 ##
|
|
187 #
|
|
188 def setJobTableName( self, arg ):
|
|
189 pass
|
|
190
|
|
191 ##
|
|
192 #
|
|
193 def setCatOutputFiles( self ):
|
|
194 pass
|
|
195
|
|
196 ##
|
|
197 #
|
|
198 def setClean( self ):
|
|
199 pass
|
|
200
|
|
201 ##
|
|
202 #
|
|
203 def setVerbosityLevel( self, arg ):
|
|
204 pass
|
|
205
|
|
206 ##
|
|
207 #
|
|
208 def setExecutableWrapper( self, arg ):
|
|
209 pass
|
|
210
|
|
211 ## Set the wrapper and program command-lines of the program launcher. Append the program launcher to 'self.lPrgLaunchers'.
|
|
212 #
|
|
213 def setSingleProgramLauncher( self ):
|
|
214 pass
|
|
215
|
|
216 ##
|
|
217 #
|
|
218 def getInputDirectory( self ):
|
|
219 pass
|
|
220
|
|
221 ##
|
|
222 #
|
|
223 def getQueueName( self ):
|
|
224 pass
|
|
225
|
|
226 ##
|
|
227 #
|
|
228 def getGroupIdentifier( self ):
|
|
229 pass
|
|
230
|
|
231 ##
|
|
232 #
|
|
233 def getInputFileSuffix( self ):
|
|
234 pass
|
|
235
|
|
236 ##
|
|
237 #
|
|
238 def getAcronym( self ):
|
|
239 pass
|
|
240
|
|
241 ##
|
|
242 #
|
|
243 def getConfigFile( self ):
|
|
244 pass
|
|
245
|
|
246 ##
|
|
247 #
|
|
248 def getCurrentDirectory( self ):
|
|
249 pass
|
|
250
|
|
251 ##
|
|
252 #
|
|
253 def getTemporaryDirectory( self ):
|
|
254 pass
|
|
255
|
|
256 ##
|
|
257 #
|
|
258 def getJobTableName( self ):
|
|
259 pass
|
|
260
|
|
261 ##
|
|
262 #
|
|
263 def getCatOutputFiles( self ):
|
|
264 pass
|
|
265
|
|
266 ##
|
|
267 #
|
|
268 def getClean( self ):
|
|
269 pass
|
|
270
|
|
271 ##
|
|
272 #
|
|
273 def getVerbosityLevel( self ):
|
|
274 pass
|
|
275
|
|
276 ##
|
|
277 #
|
|
278 def getWrapperName( self ):
|
|
279 pass
|
|
280
|
|
281 ##
|
|
282 #
|
|
283 def getProgramName( self ):
|
|
284 pass
|
|
285
|
|
286 ##
|
|
287 #
|
|
288 def getPatternToConcatenate( self ):
|
|
289 pass
|
|
290 |