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 echoCommandLine=None):
27 """ @param analyzer: the analyzer for the output
28 argv, silent, logname, server, lam, noLog - see BasicRunner"""
29 BasicRunner.__init__(self,argv,silent,logname,
30 server=server,
31 lam=lam,
32 restart=restart,
33 compressLog=compressLog,
34 noLog=noLog,
35 logTail=logTail,
36 remark=remark,
37 parameters=parameters,
38 echoCommandLine=echoCommandLine,
39 jobId=jobId)
40 StepAnalyzedCommon.__init__(self,
41 logname,
42 analyzer,
43 smallestFreq=smallestFreq)
44
45 self.writeToStateFile("LogDir",self.logDir)
46
51
54
56 exe=self.getAnalyzer("Execution")
57 if exe==None:
58 return None
59 else:
60 return exe.timeFirst()
61
68
70 exe=self.getAnalyzer("Execution")
71 if exe==None:
72 return None
73 else:
74 return exe.timeTotal()
75
82
88