1
2 """Command is run and output is analyzed"""
3
4 from PyFoam.Execution.BasicRunner import BasicRunner
5 from PyFoam.Execution.StepAnalyzedCommon import StepAnalyzedCommon
6
8 """The output of a command is analyzed while being run
9
10 Side effects (files written etc) depend on the analyzer"""
11
12 - def __init__(self,analyzer,
13 argv=None,
14 silent=False,
15 logname="PyFoamSolve",
16 server=False,
17 lam=None,
18 compressLog=False,
19 restart=False,
20 noLog=False,
21 logTail=None,
22 remark=None,
23 parameters=None,
24 jobId=None,
25 smallestFreq=60.):
26 """ @param analyzer: the analyzer for the output
27 argv, silent, logname, server, lam, noLog - see BasicRunner"""
28 BasicRunner.__init__(self,argv,silent,logname,
29 server=server,
30 lam=lam,
31 restart=restart,
32 compressLog=compressLog,
33 noLog=noLog,
34 logTail=logTail,
35 remark=remark,
36 parameters=parameters,
37 jobId=jobId)
38 StepAnalyzedCommon.__init__(self,
39 logname,
40 analyzer,
41 smallestFreq=smallestFreq)
42
43 self.writeToStateFile("LogDir",self.logDir)
44
49
52
54 exe=self.getAnalyzer("Execution")
55 if exe==None:
56 return None
57 else:
58 return exe.timeFirst()
59
66
68 exe=self.getAnalyzer("Execution")
69 if exe==None:
70 return None
71 else:
72 return exe.timeTotal()
73
80
86