From bef1a4283a53d61e6d2b614ff59c37d36ecdd54d Mon Sep 17 00:00:00 2001 From: Jonathan Karlsen Date: Thu, 15 Aug 2024 10:07:51 +0200 Subject: [PATCH] Remove unused and deprecated queue_options --- docs/reference/configuration/keywords.rst | 4 ++-- docs/reference/configuration/queue.rst | 20 ---------------- docs/reference/configuration/site_wide.rst | 1 - .../parsing/config_schema_deprecations.py | 23 ------------------- src/ert/config/queue_config.py | 13 +---------- .../test_config_schema_deprecations.py | 6 +---- tests/unit_tests/config/test_ert_config.py | 1 - .../config/test_parser_error_collection.py | 16 ------------- tests/unit_tests/config/test_queue_config.py | 1 - 9 files changed, 4 insertions(+), 81 deletions(-) diff --git a/docs/reference/configuration/keywords.rst b/docs/reference/configuration/keywords.rst index 87315a88e6e..0e89795010e 100644 --- a/docs/reference/configuration/keywords.rst +++ b/docs/reference/configuration/keywords.rst @@ -1832,9 +1832,9 @@ There are configuration options for the various queue systems, described in deta in :ref:`queue-system-chapter`. In brief, the queue systems have the following options: * :ref:`LOCAL ` — no queue options. -* :ref:`LSF ` — ``LSF_SERVER``, ``LSF_QUEUE``, ``LSF_RESOURCE``, +* :ref:`LSF ` — ``LSF_QUEUE``, ``LSF_RESOURCE``, ``BSUB_CMD``, ``BJOBS_CMD``, ``BKILL_CMD``, - ``BHIST_CMD``, ``BJOBS_TIMEOUT``, ``SUBMIT_SLEEP``, ``PROJECT_CODE``, ``EXCLUDE_HOST``, + ``BHIST_CMD``, ``SUBMIT_SLEEP``, ``PROJECT_CODE``, ``EXCLUDE_HOST``, ``MAX_RUNNING`` * :ref:`TORQUE ` — ``QSUB_CMD``, ``QSTAT_CMD``, ``QDEL_CMD``, ``QSTAT_OPTIONS``, ``QUEUE``, ``CLUSTER_LABEL``, ``MAX_RUNNING``, ``NUM_NODES``, diff --git a/docs/reference/configuration/queue.rst b/docs/reference/configuration/queue.rst index 71a137163e7..49dcba922ba 100644 --- a/docs/reference/configuration/queue.rst +++ b/docs/reference/configuration/queue.rst @@ -140,14 +140,6 @@ The following is a list of available LSF configuration options: QUEUE_OPTION LSF BHIST_CMD command -.. _bjobs_timeout: -.. topic:: BJOBS_TIMEOUT - - Determines how long-lived the job cache is. Default: ``0`` (no cache). - To change it to 60 s:: - - QUEUE_OPTION LSF BJOBS_TIMEOUT 60 - .. _submit_sleep: .. topic:: SUBMIT_SLEEP @@ -156,18 +148,6 @@ The following is a list of available LSF configuration options: QUEUE_OPTION LSF SUBMIT_SLEEP 1 -.. _lsf_server: -.. topic:: LSF_SERVER - - This options tells ERT which server should be used when submitting. - So when your configuration file has the setting:: - - QUEUE_OPTION LSF LSF_SERVER be-grid01 - - ERT will use ``ssh`` to submit your jobs using shell commands on the server - ``be-grid01``. For this to work you must have passwordless ``ssh`` to the - server. - .. _lsf_queue: .. topic:: LSF_QUEUE diff --git a/docs/reference/configuration/site_wide.rst b/docs/reference/configuration/site_wide.rst index 04b17d40e7b..f27abed2809 100644 --- a/docs/reference/configuration/site_wide.rst +++ b/docs/reference/configuration/site_wide.rst @@ -15,7 +15,6 @@ properties of the cluster. This could be an example site config file: :: -- Set some properties of the local LSF system QUEUE_OPTION LSF LSF_QUEUE hmqueue QUEUE_OPTION LSF MAX_RUNNING 100 - QUEUE_OPTION LSF LSF_SERVER lsf-front01.company.com QUEUE_OPTION LSF BSUB_CMD /path/lsf/bin/bsub QUEUE_OPTION LSF BJOBS_CMD /path/lsf/bin/bjobs QUEUE_OPTION LSF BKILL_CMD /path/lsf/bin/bkill diff --git a/src/ert/config/parsing/config_schema_deprecations.py b/src/ert/config/parsing/config_schema_deprecations.py index d3b49248ef7..015cf5d0b86 100644 --- a/src/ert/config/parsing/config_schema_deprecations.py +++ b/src/ert/config/parsing/config_schema_deprecations.py @@ -23,7 +23,6 @@ ] RSH_KEYWORDS = ["RSH_HOST", "RSH_COMMAND", "MAX_RUNNING_RSH"] USE_QUEUE_OPTION = [ - "LSF_SERVER", "LSF_QUEUE", "MAX_RUNNING_LSF", "MAX_RUNNING_LOCAL", @@ -178,22 +177,6 @@ "for the Ensemble Smoother update algorithm. " "Please use ENKF_ALPHA and STD_CUTOFF keywords instead.", ), - DeprecationInfo( - keyword="QUEUE_OPTION", - message="LSF_LOGIN_SHELL as QUEUE_OPTION to the LSF system will be removed in " - "the future, and it is not recommended to use this QUEUE_OPTION. " - "It has been used in the past to force the bsub command to use a " - "specific shell. The current ERT default is to use local shell.", - check=lambda line: "LSF_LOGIN_SHELL" in line, - ), - DeprecationInfo( - keyword="QUEUE_OPTION", - message="LSF_RSH_CMD as QUEUE_OPTION to the LSF system will be removed in " - "the future, and it is not recommended to use this QUEUE_OPTION. " - "It has been used in the past to set the remote shell command. " - "The ERT default is to use /usr/bin/ssh.", - check=lambda line: "LSF_RSH_CMD" in line, - ), DeprecationInfo( keyword="QUEUE_OPTION", message="QUEUE_QUERY_TIMEOUT as QUEUE_OPTION is ignored. " @@ -206,12 +189,6 @@ "Please remove the line.", check=lambda line: "QSTAT_OPTIONS" in line, ), - DeprecationInfo( - keyword="QUEUE_OPTION", - message="LSF_SERVER as QUEUE_OPTION is not needed and will be removed in " - "the future. Please remove the configuration line.", - check=lambda line: "LSF_SERVER" in line, - ), DeprecationInfo( keyword="QUEUE_OPTION", message="NUM_CPUS_PER_NODE as QUEUE_OPTION to Torque is deprecated and will removed in " diff --git a/src/ert/config/queue_config.py b/src/ert/config/queue_config.py index 6d7b0de3e37..5ae0e5515d6 100644 --- a/src/ert/config/queue_config.py +++ b/src/ert/config/queue_config.py @@ -21,21 +21,15 @@ LSF_DRIVER_OPTIONS = [ "BHIST_CMD", "BJOBS_CMD", - "BJOBS_TIMEOUT", "BKILL_CMD", "BSUB_CMD", - "DEBUG_OUTPUT", "EXCLUDE_HOST", - "LSF_LOGIN_SHELL", "LSF_QUEUE", "LSF_RESOURCE", - "LSF_RSH_CMD", - "LSF_SERVER", "PROJECT_CODE", ] OPENPBS_DRIVER_OPTIONS: List[str] = [ "CLUSTER_LABEL", - "DEBUG_OUTPUT", "JOB_PREFIX", "KEEP_QSUB_OUTPUT", "MEMORY_PER_JOB", @@ -73,10 +67,7 @@ queue_string_options: Mapping[str, List[str]] = { "LSF": [ "LSF_RESOURCE", - "LSF_SERVER", "LSF_QUEUE", - "LSF_LOGIN_SHELL", - "LSF_RSH_CMD", "BSUB_CMD", "BJOBS_CMD", "BKILL_CMD", @@ -102,7 +93,6 @@ "QUEUE", "CLUSTER_LABEL", "JOB_PREFIX", - "DEBUG_OUTPUT", "PROJECT_CODE", ], "LOCAL": ["PROJECT_CODE"], @@ -110,7 +100,6 @@ } queue_positive_int_options: Mapping[str, List[str]] = { "LSF": [ - "BJOBS_TIMEOUT", "MAX_RUNNING", ], "SLURM": [ @@ -132,7 +121,7 @@ "GENERIC": ["SUBMIT_SLEEP"], } queue_bool_options: Mapping[str, List[str]] = { - "LSF": ["DEBUG_OUTPUT"], + "LSF": [], "SLURM": [], "TORQUE": ["KEEP_QSUB_OUTPUT"], "LOCAL": [], diff --git a/tests/unit_tests/config/parsing/test_config_schema_deprecations.py b/tests/unit_tests/config/parsing/test_config_schema_deprecations.py index 8b40f1bcec5..9850c117bbd 100644 --- a/tests/unit_tests/config/parsing/test_config_schema_deprecations.py +++ b/tests/unit_tests/config/parsing/test_config_schema_deprecations.py @@ -230,7 +230,7 @@ def test_that_suggester_gives_schedule_prediciton_migration(tmp_path): def test_that_suggester_gives_job_prefix_migration(tmp_path): (tmp_path / "config.ert").write_text( - "NUM_REALIZATIONS 1\nQUEUE_OPTION TORQUE JOB_PREFIX foo\nQUEUE_OPTION LSF LSF_RSH_CMD foo\n" + "NUM_REALIZATIONS 1\nQUEUE_OPTION TORQUE JOB_PREFIX foo\n" ) suggestions = make_suggestion_list(str(tmp_path / "config.ert")) @@ -238,7 +238,3 @@ def test_that_suggester_gives_job_prefix_migration(tmp_path): "JOB_PREFIX as QUEUE_OPTION to the TORQUE system is deprecated" in str(s) for s in suggestions ) - assert any( - "LSF_RSH_CMD as QUEUE_OPTION to the LSF system will be removed" in str(s) - for s in suggestions - ) diff --git a/tests/unit_tests/config/test_ert_config.py b/tests/unit_tests/config/test_ert_config.py index a471fb7cc97..6c8bcce1138 100644 --- a/tests/unit_tests/config/test_ert_config.py +++ b/tests/unit_tests/config/test_ert_config.py @@ -43,7 +43,6 @@ "MAX_SUBMIT": 13, "QUEUE_SYSTEM": "LSF", "LSF_QUEUE": "mr", - "LSF_SERVER": "simulacrum", "LSF_RESOURCE": "select[x86_64Linux] same[type:model]", "MAX_RUNNING": "100", "DATA_FILE": "eclipse/model/SNAKE_OIL.DATA", diff --git a/tests/unit_tests/config/test_parser_error_collection.py b/tests/unit_tests/config/test_parser_error_collection.py index 2a0a412e318..459d9f6daaf 100644 --- a/tests/unit_tests/config/test_parser_error_collection.py +++ b/tests/unit_tests/config/test_parser_error_collection.py @@ -1024,22 +1024,6 @@ def test_that_executable_directory_errors(dirname): ["RSH_HOST", "RSH_COMMAND", "MAX_RUNNING_RSH"] ) ], - *[ - ExpectedErrorInfo( - line=20 + i, - column=1, - end_column=1 + len(kw), - match=f"The {kw} keyword has been removed", - ) - for i, kw in enumerate( - [ - "LSF_SERVER", - "LSF_QUEUE", - "MAX_RUNNING_LSF", - "MAX_RUNNING_LOCAL", - ] - ) - ], *[ ExpectedErrorInfo( line=25 + i, diff --git a/tests/unit_tests/config/test_queue_config.py b/tests/unit_tests/config/test_queue_config.py index 7978d55125f..697dea6c669 100644 --- a/tests/unit_tests/config/test_queue_config.py +++ b/tests/unit_tests/config/test_queue_config.py @@ -286,7 +286,6 @@ def test_initializing_empty_config_queue_options_resets_to_default_value( @pytest.mark.parametrize( "queue_system, queue_option, queue_value, err_msg", [ - ("LSF", "BJOBS_TIMEOUT", "-3", "is not a valid positive integer"), ("SLURM", "SQUEUE_TIMEOUT", "5a", "is not a valid integer or float"), ("TORQUE", "NUM_NODES", "3.5", "is not a valid positive integer"), ],