Skip to content

Commit

Permalink
Import ert.realization_state as RealizationStorageState and fix Reali…
Browse files Browse the repository at this point in the history
…zationState
  • Loading branch information
xjules committed Nov 23, 2023
1 parent f1a23a0 commit d2236c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ert/simulator/batch_simulator_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import numpy as np

from ert.realization_state import RealizationState
from ert.job_queue import RealizationState

from .simulation_context import SimulationContext

Expand Down
12 changes: 6 additions & 6 deletions src/ert/simulator/simulation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

from ert.config import HookRuntime
from ert.enkf_main import create_run_path
from ert.job_queue import JobQueue
from ert.realization_state import RealizationState
from ert.job_queue import JobQueue, RealizationState
from ert.realization_state import RealizationState as RealizationStorageState
from ert.run_context import RunContext
from ert.runpaths import Runpaths

Expand All @@ -38,10 +38,10 @@ def _run_forward_model(
run_context.sim_fs.update_realization_state(
realization_nr,
[
RealizationState.UNDEFINED,
RealizationState.LOAD_FAILURE,
RealizationStorageState.UNDEFINED,
RealizationStorageState.LOAD_FAILURE,
],
RealizationState.INITIALIZED,
RealizationStorageState.INITIALIZED,
)
run_context.sim_fs.sync()

Expand Down Expand Up @@ -112,7 +112,7 @@ def __init__(
for realization_nr in self._run_context.active_realizations:
self._run_context.sim_fs.state_map[
realization_nr
] = RealizationState.INITIALIZED
] = RealizationStorageState.INITIALIZED
create_run_path(self._run_context, global_substitutions, self._ert.ert_config)
self._ert.runWorkflows(
HookRuntime.PRE_SIMULATION, None, self._run_context.sim_fs
Expand Down

0 comments on commit d2236c7

Please sign in to comment.