Skip to content
Snippets Groups Projects
Commit 3424a914 authored by mads's avatar mads
Browse files

bug fix

parent f71df4ae
No related branches found
No related tags found
No related merge requests found
......@@ -4,14 +4,15 @@ import sys
from threading import Thread
class ClusterSimulation(Simulation):
def __init__(self, modelpath, htcfilename, hawc2exe="HAWC2MB.exe"):
print ("start")
Simulation.__init__(self, modelpath, htcfilename, hawc2exe=hawc2exe)
self.simulation_id = [f for f in os.listdir('.') if f.endswith('.in')][0][:-3]
self.simulationThread = SimulationThread(self, False)
self.resource.simulationThread.low_priority = False
self.thread = Thread(target=self.simulate)
self.start(1)
self.wait()
print (self.simulationThread.res[1]) # print hawc2 output to stdout
sys.exit(self.simulationThread.res[0])
print (self.resource.simulationThread.res[1]) # print hawc2 output to stdout
sys.exit(self.resource.simulationThread.res[0])
def update_status(self, *args, **kwargs):
Simulation.update_status(self, *args, **kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment