Skip to content
Snippets Groups Projects
Commit 4ec29c2b authored by mads's avatar mads
Browse files

integrated changes from gorm

parent 0913151e
No related branches found
No related tags found
No related merge requests found
...@@ -4,15 +4,15 @@ import sys ...@@ -4,15 +4,15 @@ import sys
from threading import Thread from threading import Thread
class ClusterSimulation(Simulation): class ClusterSimulation(Simulation):
def __init__(self, modelpath, htcfilename, hawc2exe="HAWC2MB.exe"): def __init__(self, modelpath, htcfilename, hawc2exe="HAWC2MB.exe"):
print ("start")
Simulation.__init__(self, modelpath, htcfilename, hawc2exe=hawc2exe) Simulation.__init__(self, modelpath, htcfilename, hawc2exe=hawc2exe)
self.simulation_id = [f for f in os.listdir('.') if f.endswith('.in')][0][:-3] self.simulation_id = [f for f in os.listdir('.') if f.endswith('.in')][0][:-3]
self.resource.simulationThread.low_priority = False self.host.simulationThread.low_priority = False
self.non_blocking_simulation_thread = Thread(target=self.simulate) self.non_blocking_simulation_thread = Thread(target=self.simulate)
self.start(1) self.start(1)
self.wait() self.wait()
print (self.resource.simulationThread.res[1]) # print hawc2 output to stdout print (self.host.simulationThread.res[1]) # print hawc2 output to stdout
sys.exit(self.resource.simulationThread.res[0]) sys.exit(self.host.simulationThread.res[0])
def update_status(self, *args, **kwargs): def update_status(self, *args, **kwargs):
Simulation.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