diff --git a/README.md b/README.md index 8eff1aa434364e23d27a1b36c21ea8cffbe6e04c..206e86e20ba7074d34ab42f772243fd6f40e10a8 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,8 @@ - [ae_file](wetb/hawc2/ae_file.py): Read AE (aerodynamic blade layout) files - [pc_file](wetb/hawc2/pc_file.py): Read PC (profile coefficient) files - [shear_file](wetb/hawc2/shear_file.py): Create user defined shear file -- [at_time_file](wetb/hawc2/at_time_file.py): read at output_at_time files +- [at_time_file](wetb/hawc2/at_time_file.py): Read at output_at_time files +- [log_file](wetb/hawc2/log_file.py): Read and interpret log files - [ascii2bin](wetb/hawc2/ascii2bin): Compress HAWC2 ascii result files to binary ### [gtsdf](wetb/gtsdf) diff --git a/wetb/hawc2/simulation.py b/wetb/hawc2/simulation.py index 50a41ddf694defa6c9c2353d25776277c26b77e3..9f3d2a8daa296d165e0402f1e0c4c2d02e50860f 100644 --- a/wetb/hawc2/simulation.py +++ b/wetb/hawc2/simulation.py @@ -143,7 +143,7 @@ class Simulation(object): print ("-"*50) print ("stderr:\n", self.stderr) print ("#"*50) - self.logFile.errors(list(set([l for l in self.stderr.split("\n") if 'error' in l.lower()]))) + self.errors = (list(set([l for l in self.stderr.split("\n") if 'error' in l.lower()]))) self.status = ERROR # else: # self.stop() @@ -162,21 +162,21 @@ class Simulation(object): if self.logFile.status not in [log_file.DONE]: self.logFile.status = ABORTED -class SimulationProcess(Process): - - def __init__(self, modelpath, htcfile, hawc2exe="HAWC2MB.exe"): - Process.__init__(self) - self.modelpath = modelpath - self.htcfile = os.path.abspath(htcfile) - self.hawc2exe = hawc2exe - self.res = [0, "", "", ""] - self.process = process([self.hawc2exe, self.htcfile] , self.modelpath) - - - def run(self): - p = psutil.Process(os.getpid()) - p.nice = psutil.BELOW_NORMAL_PRIORITY_CLASS - exec_process(self.process) +#class SimulationProcess(Process): +# +# def __init__(self, modelpath, htcfile, hawc2exe="HAWC2MB.exe"): +# Process.__init__(self) +# self.modelpath = modelpath +# self.htcfile = os.path.abspath(htcfile) +# self.hawc2exe = hawc2exe +# self.res = [0, "", "", ""] +# self.process = process([self.hawc2exe, self.htcfile] , self.modelpath) +# +# +# def run(self): +# p = psutil.Process(os.getpid()) +# p.nice = psutil.BELOW_NORMAL_PRIORITY_CLASS +# exec_process(self.process) class SimulationThread(Thread):