From ec65c17cdffd33219865a7660a4ec8341dff5a6d Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 19 Oct 2021 15:10:50 +0200 Subject: [PATCH 1/2] Fix uncontrolled job submission for remote autodetection --- reframe/frontend/autodetect.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reframe/frontend/autodetect.py b/reframe/frontend/autodetect.py index 50b85a8fc1..7a23be2005 100644 --- a/reframe/frontend/autodetect.py +++ b/reframe/frontend/autodetect.py @@ -242,6 +242,9 @@ def detect_topology(): _save_info(topo_file, part.processor.info) elif detect_remote_systems: + # We disable remote detection on the submitted job to avoid + # uncontrolled creation of jobs; see GH bug #2226 + vars['RFM_REMOTE_DETECT'] = 'False' with runtime.temp_environment(modules=modules, variables=vars): part._processor = ProcessorInfo(_remote_detect(part)) From 51e010694e391d2b38dfde1d984d1852c0329ae9 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 20 Oct 2021 12:00:21 +0200 Subject: [PATCH 2/2] Apply fix proposed on PR review --- reframe/frontend/autodetect.py | 3 --- reframe/frontend/cli.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/reframe/frontend/autodetect.py b/reframe/frontend/autodetect.py index 7a23be2005..50b85a8fc1 100644 --- a/reframe/frontend/autodetect.py +++ b/reframe/frontend/autodetect.py @@ -242,9 +242,6 @@ def detect_topology(): _save_info(topo_file, part.processor.info) elif detect_remote_systems: - # We disable remote detection on the submitted job to avoid - # uncontrolled creation of jobs; see GH bug #2226 - vars['RFM_REMOTE_DETECT'] = 'False' with runtime.temp_environment(modules=modules, variables=vars): part._processor = ProcessorInfo(_remote_detect(part)) diff --git a/reframe/frontend/cli.py b/reframe/frontend/cli.py index 4ea291c630..0ed0edde5b 100644 --- a/reframe/frontend/cli.py +++ b/reframe/frontend/cli.py @@ -615,7 +615,6 @@ def main(): ) rt = runtime.runtime() - autodetect.detect_topology() try: if site_config.get('general/0/module_map_file'): rt.modules_system.load_mapping_from_file( @@ -674,6 +673,7 @@ def main(): sys.exit(0) + autodetect.detect_topology() printer.debug(format_env(options.env_vars)) # Setup the check loader