Skip to content

Commit

Permalink
Replace selected usage of SIMULATION_JOB with FORWARD_MODEL
Browse files Browse the repository at this point in the history
Wherever there are no arguments passed directly from the config
line, FORWARD_MODEL is used instead of SIMULATION_JOB.
  • Loading branch information
berland committed Sep 13, 2024
1 parent d347cb4 commit abf1dfd
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/reference/queue/local_queue.ert
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ NUM_REALIZATIONS 100
MIN_REALIZATIONS 1

INSTALL_JOB QUEUE_TEST QUEUE_TEST
SIMULATION_JOB QUEUE_TEST
FORWARD_MODEL QUEUE_TEST
2 changes: 1 addition & 1 deletion docs/reference/queue/lsf_queue.ert
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ NUM_REALIZATIONS 1
MIN_REALIZATIONS 1

INSTALL_JOB QUEUE_TEST QUEUE_TEST
SIMULATION_JOB QUEUE_TEST
FORWARD_MODEL QUEUE_TEST
2 changes: 1 addition & 1 deletion test-data/poly_template/poly.ert.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ GEN_KW COEFFS_{{n}} coeff.tmpl coeffs_{{n}}.json coeff_priors
{% endfor %}

INSTALL_JOB poly_eval POLY_EVAL
SIMULATION_JOB poly_eval
FORWARD_MODEL poly_eval
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _evaluate(coeffs, x):
GEN_DATA POLY_RES2 RESULT_FILE:poly.out2
INSTALL_JOB poly_eval POLY_EVAL
SIMULATION_JOB poly_eval
FORWARD_MODEL poly_eval
ANALYSIS_SET_VAR STD_ENKF LOCALIZATION True
ANALYSIS_SET_VAR STD_ENKF LOCALIZATION_CORRELATION_THRESHOLD 0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def test_tracking(
storage,
):
config_lines = [
"INSTALL_JOB poly_eval2 POLY_EVAL\nSIMULATION_JOB poly_eval2\n",
"INSTALL_JOB poly_eval2 POLY_EVAL\nFORWARD_MODEL poly_eval2\n",
extra_config,
]

Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/storage/test_field_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_field_param_update(tmpdir):
GEN_DATA MY_RESPONSE RESULT_FILE:gen_data_%d.out REPORT_STEPS:0 INPUT_FORMAT:ASCII
INSTALL_JOB poly_eval POLY_EVAL
SIMULATION_JOB poly_eval
FORWARD_MODEL poly_eval
"""
)
with open("config.ert", "w", encoding="utf-8") as fh:
Expand Down Expand Up @@ -151,7 +151,7 @@ def test_parameter_update_with_inactive_cells_xtgeo_grdecl(tmpdir):
GRID MY_EGRID.EGRID
GEN_DATA MY_RESPONSE RESULT_FILE:gen_data_%d.out REPORT_STEPS:0 INPUT_FORMAT:ASCII
INSTALL_JOB poly_eval POLY_EVAL
SIMULATION_JOB poly_eval
FORWARD_MODEL poly_eval
"""
)
with open("config.ert", "w", encoding="utf-8") as fh:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_surface_param_update(tmpdir):
SURFACE MY_PARAM OUTPUT_FILE:surf.irap INIT_FILES:surf.irap BASE_SURFACE:surf.irap FORWARD_INIT:True
GEN_DATA MY_RESPONSE RESULT_FILE:gen_data_%d.out REPORT_STEPS:0 INPUT_FORMAT:ASCII
INSTALL_JOB poly_eval POLY_EVAL
SIMULATION_JOB poly_eval
FORWARD_MODEL poly_eval
"""
base_surface = xtgeo.RegularSurface(
ncol=2,
Expand Down Expand Up @@ -201,7 +201,7 @@ def create_poly_with_field(field_dim: Tuple[int, int, int], realisations: int):
GEN_DATA MY_RESPONSE RESULT_FILE:gen_data_%d.out REPORT_STEPS:0 INPUT_FORMAT:ASCII
INSTALL_JOB poly_eval POLY_EVAL
SIMULATION_JOB poly_eval
FORWARD_MODEL poly_eval
"""
)
with open("config.ert", "w", encoding="utf-8") as fh:
Expand Down
7 changes: 4 additions & 3 deletions tests/unit_tests/config/test_ert_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,12 +884,13 @@ def run(self, *args):


@pytest.mark.usefixtures("use_tmpdir")
def test_that_unknown_job_gives_config_validation_error():
@pytest.mark.parametrize("fm_keyword", ["FORWARD_MODEL", "SIMULATION_JOB"])
def test_that_unknown_job_gives_config_validation_error(fm_keyword):
test_config_file_name = "test.ert"
test_config_contents = dedent(
"""
f"""
NUM_REALIZATIONS 1
SIMULATION_JOB NO_SUCH_FORWARD_MODEL_STEP
{fm_keyword} NO_SUCH_FORWARD_MODEL_STEP
"""
)
with open(test_config_file_name, "w", encoding="utf-8") as fh:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _open_main_window(
NUM_REALIZATIONS 10
MIN_REALIZATIONS 1
INSTALL_JOB forward_model FORWARD_MODEL
SIMULATION_JOB forward_model
FORWARD_MODEL forward_model
""")
with open("config.ert", "w", encoding="utf-8") as fh:
fh.writelines(config)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/gui/tools/test_manage_experiments_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def _evaluate(coeffs, x):
GEN_DATA POLY_RES2 RESULT_FILE:poly.out2
INSTALL_JOB poly_eval POLY_EVAL
SIMULATION_JOB poly_eval
FORWARD_MODEL poly_eval
ANALYSIS_SET_VAR STD_ENKF LOCALIZATION True
ANALYSIS_SET_VAR STD_ENKF LOCALIZATION_CORRELATION_THRESHOLD 0.0
Expand Down

0 comments on commit abf1dfd

Please sign in to comment.