"run" should create a simulation

Create issue
Issue #87 closed
Erik Schnetter created an issue

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')
            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)


Comments (2)

  1. Log in to comment