[ET Trac] [Einstein Toolkit] #87: "run" should create a simulation
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Sat Jan 29 18:58:03 CST 2011
#87: "run" should create a simulation
--------------------------+-------------------------------------------------
Reporter: eschnett | Owner: mthomas
Type: enhancement | Status: closed
Priority: minor | Milestone:
Component: SimFactory | Version:
Resolution: fixed | Keywords:
--------------------------+-------------------------------------------------
Changes (by mthomas):
* status: new => closed
* resolution: => fixed
Old description:
> The run command should create a simulation if necessary, similar to the
> submit command.
New description:
The run command should create a simulation if necessary, similar to the
submit command.
Code that accomplishes this is below:
def run(self, simulationName=None, debug=False):
DefineDatabase = simsubs.DefineDatabase()
alwaysprint("simulation name is: %s" % simulationName)
if simulationName is not None:
if simenv.OptionsManager.HasOption('restart-id'):
restart_id = simenv.OptionsManager.GetOption('restart-id')
self.loadFromRestartId(restart_id)
else:
ret = self.load(simulationName)
if ret < 0:
parfile = simlib.GetParFile()
if parfile == None:
fatal("could not create simulation %s, no
parameter file specified" % simulationName)
info("Parameter file: %s" % parfile)
self.create(simulationName, parfile)
self.load(simulationName)
--
Comment:
This is already done.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/87#comment:1>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list