#87: "run" should create a simulation -------------------------+-------------------------------------------------- Reporter: eschnett | Owner: mthomas Type: enhancement | Status: new Priority: minor | Milestone: Component: SimFactory | Version: Keywords: | -------------------------+-------------------------------------------------- The run command should create a simulation if necessary, similar to the submit command.
#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.
trac@lists.einsteintoolkit.org