From 13ae813e72758dd566fefa51cb852c76d800e345 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Tue, 13 Dec 2022 23:29:46 +0100 Subject: [PATCH 1/2] Remove the `--force-local` option --- reframe/frontend/cli.py | 5 ----- reframe/frontend/executors/__init__.py | 4 ---- unittests/resources/config/settings.py | 2 +- unittests/test_cli.py | 6 +++--- unittests/test_policies.py | 2 +- 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/reframe/frontend/cli.py b/reframe/frontend/cli.py index fbb384e02d..23cd28e51b 100644 --- a/reframe/frontend/cli.py +++ b/reframe/frontend/cli.py @@ -395,10 +395,6 @@ def main(): dest='flex_alloc_nodes', metavar='{all|STATE|NUM}', default=None, help='Set strategy for the flexible node allocation (default: "idle").' ) - run_options.add_argument( - '--force-local', action='store_true', - help='Force local execution of checks' - ) run_options.add_argument( '-J', '--job-option', action='append', metavar='OPT', dest='job_options', default=[], @@ -1233,7 +1229,6 @@ def module_unuse(*paths): printer.error("unknown execution policy `%s': Exiting...") sys.exit(1) - exec_policy.force_local = options.force_local exec_policy.strict_check = options.strict exec_policy.skip_sanity_check = options.skip_sanity_check exec_policy.skip_performance_check = options.skip_performance_check diff --git a/reframe/frontend/executors/__init__.py b/reframe/frontend/executors/__init__.py index dbeb54cb05..acdd687c9e 100644 --- a/reframe/frontend/executors/__init__.py +++ b/reframe/frontend/executors/__init__.py @@ -586,7 +586,6 @@ class ExecutionPolicy(abc.ABC): def __init__(self): # Options controlling the check execution - self.force_local = False self.skip_sanity_check = False self.skip_performance_check = False self.keep_stage_files = False @@ -617,6 +616,3 @@ def runcase(self, case): if self.strict_check: case.check.strict_check = True - - if self.force_local: - case.check.local = True diff --git a/unittests/resources/config/settings.py b/unittests/resources/config/settings.py index 1eadf91e9e..839c0478e8 100644 --- a/unittests/resources/config/settings.py +++ b/unittests/resources/config/settings.py @@ -237,7 +237,7 @@ 'options': [ '-c unittests/resources/checks/hellocheck.py', '-p builtin', - '--force-local' + '-S local=1' ] } ], diff --git a/unittests/test_cli.py b/unittests/test_cli.py index 031ad27d67..878b6237fc 100644 --- a/unittests/test_cli.py +++ b/unittests/test_cli.py @@ -82,7 +82,7 @@ def _run_reframe(system='generic:default', argv += itertools.chain(*(['-c', c] for c in checkpath)) argv += itertools.chain(*(['-p', e] for e in environs)) if local: - argv += ['--force-local'] + argv += ['-S', 'local=1'] if action == 'run': argv += ['-r'] @@ -196,8 +196,8 @@ def test_check_restore_session_check_search_path(run_reframe, tmp_path): def test_check_success_force_local(run_reframe, tmp_path): - # We explicitly use a system here with a non-local scheduler and pass the - # `--force-local` option + # We explicitly use a system here with a non-local scheduler and we run + # with `-S local=1` returncode, stdout, _ = run_reframe(system='testsys:gpu', local=True) assert 'PASSED' in stdout assert 'FAILED' not in stdout diff --git a/unittests/test_policies.py b/unittests/test_policies.py index f86a1a22cb..d653fafc07 100644 --- a/unittests/test_policies.py +++ b/unittests/test_policies.py @@ -410,8 +410,8 @@ def assert_reported_skipped(num_skipped): # that the execution policies behave correctly with forced local tests def test_force_local_execution(make_runner, make_cases, testsys_exec_ctx): runner = make_runner() - runner.policy.force_local = True test = HelloTest() + test.local = True test.valid_prog_environs = ['builtin'] runner.runall(make_cases([test])) From 568e55076f83a5c3f50cfa3cec00e5bc06d1b8ab Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 14 Dec 2022 00:00:21 +0100 Subject: [PATCH 2/2] Update docs --- docs/manpage.rst | 6 ------ docs/pipeline.rst | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/manpage.rst b/docs/manpage.rst index 537e6bf0bf..8cace3b57d 100644 --- a/docs/manpage.rst +++ b/docs/manpage.rst @@ -461,12 +461,6 @@ Options controlling ReFrame execution If there are tests that have finished their build or run phase, ReFrame will keep pushing tests for execution until the concurrency limit is reached again. If no execution slots are available, ReFrame will throttle job submission. -.. option:: --force-local - - Force local execution of tests. - - Execute tests as if all partitions of the currently selected system had a ``local`` scheduler. - .. option:: --max-retries=NUM The maximum number of times a failing test can be retried. diff --git a/docs/pipeline.rst b/docs/pipeline.rst index d090f88aac..b4228e5511 100644 --- a/docs/pipeline.rst +++ b/docs/pipeline.rst @@ -180,8 +180,8 @@ The following table show in which context each pipeline stage executes: Pipeline Stage Execution Context ============== ================= *Setup* ReFrame - *Compile* ReFrame if :attr:`~reframe.core.pipeline.RegressionTest.build_locally` or :attr:`~reframe.core.pipeline.RegressionTest.local` is :obj:`True` or if :option:`--force-local` is passed, partition otherwise. - *Run* ReFrame if :attr:`~reframe.core.pipeline.RegressionTest.local` is :obj:`True` or if :option:`--force-local` is passed, partition otherwise. + *Compile* ReFrame if :attr:`~reframe.core.pipeline.RegressionTest.build_locally` or :attr:`~reframe.core.pipeline.RegressionTest.local` is :obj:`True`, partition otherwise. + *Run* ReFrame if :attr:`~reframe.core.pipeline.RegressionTest.local` is :obj:`True`, partition otherwise. *Sanity* ReFrame *Performance* ReFrame *Cleanup* ReFrame