Skip to content

Commit

Permalink
Redo queue
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Nov 15, 2024
1 parent 0301505 commit 84b8551
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 114 deletions.
2 changes: 0 additions & 2 deletions src/ert/resources/site-config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
WORKFLOW_JOB_DIRECTORY workflows/jobs/shell
WORKFLOW_JOB_DIRECTORY workflows/jobs/internal-gui/config

JOB_SCRIPT job_dispatch.py

QUEUE_SYSTEM LOCAL
QUEUE_OPTION LOCAL MAX_RUNNING 1
11 changes: 0 additions & 11 deletions src/everest/config/simulator_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@


class SimulatorConfig(BaseModel, extra="forbid"): # type: ignore
cores: Optional[PositiveInt] = Field(
default=None,
description="""Defines the number of simultaneously running forward models.
When using queue system lsf, this corresponds to number of nodes used at one
time, whereas when using the local queue system, cores refers to the number of
cores you want to use on your system.
This number is specified in Ert as MAX_RUNNING.
""",
)
cores_per_node: Optional[PositiveInt] = Field(
default=None,
description="""defines the number of CPUs when running
Expand Down
Empty file.
86 changes: 0 additions & 86 deletions src/everest/queue_driver/queue_driver.py

This file was deleted.

27 changes: 12 additions & 15 deletions tests/everest/test_res_initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ruamel.yaml import YAML

import everest
from ert.config import ErtConfig
from ert.config import ErtConfig, ExtParamConfig
from ert.config.parsing import ConfigKeys as ErtConfigKeys
from everest import ConfigKeys
from everest import ConfigKeys as CK
Expand All @@ -20,7 +20,6 @@
everest_to_ert_config,
)
from tests.everest.utils import (
everest_default_jobs,
hide_opm,
relpath,
skipif_no_everest_models,
Expand Down Expand Up @@ -90,7 +89,6 @@ def install_jobs():
os.path.abspath(SNAKE_CONFIG_DIR), "../../jobs/SNAKE_OIL_NPV"
),
),
*everest_default_jobs(output_dir),
]

return jobs
Expand Down Expand Up @@ -195,7 +193,6 @@ def build_tutorial_dict(config_dir, output_dir):
("well_order", os.path.join(config_dir, "jobs/WELL_ORDER_MOCK")),
("res_mock", os.path.join(config_dir, "jobs/RES_MOCK")),
("npv_function", os.path.join(config_dir, "jobs/NPV_FUNCTION_MOCK")),
*everest_default_jobs(output_dir),
],
ErtConfigKeys.SIMULATION_JOB: [
(
Expand Down Expand Up @@ -232,21 +229,21 @@ def build_tutorial_dict(config_dir, output_dir):

def test_snake_everest_to_ert(copy_test_data_to_tmp):
# Load config file
ever_config_dict = EverestConfig.load_file(SNAKE_CONFIG_PATH)
ever_config = EverestConfig.load_file(SNAKE_CONFIG_PATH)
output_dir = ever_config.output_dir

output_dir = ever_config_dict.output_dir
snake_dict = build_snake_dict(output_dir, ConfigKeys.LOCAL)
snake_config = ErtConfig.with_plugins().from_dict(
config_dict=build_snake_dict(output_dir, ConfigKeys.LOCAL)
)

# Transform to res dict and verify equality
ert_config_dict = _everest_to_ert_config_dict(ever_config_dict)
assert snake_dict == ert_config_dict

# Instantiate res
ErtConfig.with_plugins().from_dict(
config_dict=_everest_to_ert_config_dict(
ever_config_dict, site_config=ErtConfig.read_site_config()
)
ert_config = everest_to_ert_config(ever_config)
assert any(
isinstance(v, ExtParamConfig)
for v in ert_config.ensemble_config.parameter_configs.values()
)
del ert_config.ensemble_config.parameter_configs["group"]
assert snake_config == ert_config


def test_snake_everest_to_ert_slurm(copy_test_data_to_tmp):
Expand Down

0 comments on commit 84b8551

Please sign in to comment.