def ensembleExperiment(self, line): simulation_runner = EnkfSimulationRunner(self.ert()) now = time.time() print("Ensemble Experiment started at: %s" % datetime.now().isoformat(sep=" ")) iteration_count = 0 active_realization_mask = BoolVector(default_value = True, initial_size = self.ert().getEnsembleSize()) simulation_runner.createRunPath(active_realization_mask, iteration_count) simulation_runner.runWorkflows(HookRuntime.PRE_SIMULATION) print("Start simulations!") num_successful_realizations = simulation_runner.runEnsembleExperiment() success = self.ert().analysisConfig().haveEnoughRealisations(num_successful_realizations, self.ert().getEnsembleSize()) if not success: print("Error: Number of successful realizations is too low.\nYou can allow more failed realizations by setting / changing the MIN_REALIZATIONS configuration element!") return print("Ensemble Experiment post processing!") simulation_runner.runWorkflows(HookRuntime.POST_SIMULATION) print("Ensemble Experiment completed at: %s" % datetime.now().isoformat(sep=" ")) diff = time.time() - now print("Running time: %d seconds" % int(diff))
def ensembleExperiment(self, line): simulation_runner = EnkfSimulationRunner(self.ert()) now = time.time() print("Ensemble Experiment started at: %s" % datetime.now().isoformat(sep=" ")) if self.ert().getEnkfSimulationRunner().isHookPreSimulation(): self.ert().getEnkfSimulationRunner().runHookWorkflow() success = simulation_runner.runEnsembleExperiment() if not success: print("Error: Simulations failed!") return if self.ert().getEnkfSimulationRunner().isHookPostSimulation(): self.ert().getEnkfSimulationRunner().runHookWorkflow() print("Ensemble Experiment post processing!") simulation_runner.runPostHookWorkflow() print("Ensemble Experiment completed at: %s" % datetime.now().isoformat(sep=" ")) diff = time.time() - now print("Running time: %d seconds" % int(diff))
def ensembleExperiment(self, line): simulation_runner = EnkfSimulationRunner(self.ert()) now = time.time() print("Ensemble Experiment started at: %s" % datetime.now().isoformat(sep=" ")) num_successful_realizations = simulation_runner.runEnsembleExperiment() success = self.ert().analysisConfig().haveEnoughRealisations( num_successful_realizations, self.ert().getEnsembleSize()) if not success: print( "Error: Number of successful realizations is too low.\nYou can allow more failed realizations by setting / changing the MIN_REALIZATIONS configuration element!" ) return print("Ensemble Experiment post processing!") simulation_runner.runWorkflows(HookRuntime.POST_SIMULATION) print("Ensemble Experiment completed at: %s" % datetime.now().isoformat(sep=" ")) diff = time.time() - now print("Running time: %d seconds" % int(diff))
def do_ensemble_experiment(self, line): simulation_runner = EnkfSimulationRunner(self.ert()) now = time.time() print("Ensemble Experiment started at: %s" % datetime.now().isoformat(sep=" ")) success = simulation_runner.runEnsembleExperiment() if not success: print("Error: Simulations failed!") return print("Ensemble Experiment post processing!") simulation_runner.runPostWorkflow() print("Ensemble Experiment completed at: %s" % datetime.now().isoformat(sep=" ")) diff = time.time() - now print("Running time: %d seconds" % int(diff))
def ensembleExperiment(self, line): simulation_runner = EnkfSimulationRunner(self.ert()) now = time.time() print("Ensemble Experiment started at: %s" % datetime.now().isoformat(sep=" ")) success = simulation_runner.runEnsembleExperiment() if not success: print("Error: Simulations failed!") return print("Ensemble Experiment post processing!") simulation_runner.runWorkflows(HookRuntime.POST_SIMULATION) print("Ensemble Experiment completed at: %s" % datetime.now().isoformat(sep=" ")) diff = time.time() - now print("Running time: %d seconds" % int(diff))
def ensembleExperiment(self, line): simulation_runner = EnkfSimulationRunner(self.ert()) now = time.time() print("Ensemble Experiment started at: %s" % datetime.now().isoformat(sep=" ")) print("Create the run path!") iteration_count = self.ert().analysisConfig().getAnalysisIterConfig( ).getNumIterations() active_realization_mask = BoolVector.createActiveMask( "0-%d" % self.ert().getEnsembleSize()) # Note that 0(zero) is used and not iteration_count simulation_runner.createRunPath(active_realization_mask, 0) print("Ensemble Experiment pre processing!") simulation_runner.runWorkflows(HookRuntime.PRE_SIMULATION) print("Start simulations!") num_successful_realizations = simulation_runner.runEnsembleExperiment() success = self.ert().analysisConfig().haveEnoughRealisations( num_successful_realizations, self.ert().getEnsembleSize()) if not success: print( "Error: Number of successful realizations is too low.\nYou can allow more failed realizations by setting / changing the MIN_REALIZATIONS configuration element!" ) return print("Ensemble Experiment post processing!") simulation_runner.runWorkflows(HookRuntime.POST_SIMULATION) print("Ensemble Experiment completed at: %s" % datetime.now().isoformat(sep=" ")) diff = time.time() - now print("Running time: %d seconds" % int(diff))