From 03f574a218fce1de5b98bff6b59b63cdd3e6ffea Mon Sep 17 00:00:00 2001 From: Marius Kurz Date: Wed, 24 Jul 2024 09:18:51 +0200 Subject: [PATCH] Fix bug when using "auto" environment detection in a "local" environment. --- src/relexi/runtime/runtime.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relexi/runtime/runtime.py b/src/relexi/runtime/runtime.py index 163220a..3e91da4 100644 --- a/src/relexi/runtime/runtime.py +++ b/src/relexi/runtime/runtime.py @@ -92,8 +92,8 @@ def __init__( do_launch_orchestrator (bool, optional): Whether to launch the `Orchestrator` immediately. Defaults to `True`. """ - # Using SmartSim utility to identify type automatically try: + # Using SmartSim utility to identify type automatically if type_ == 'auto': rlxout.info('Identifying environment...') scheduler = smartsim.wlm.detect_launcher() @@ -105,7 +105,7 @@ def __init__( rlxout.info(f'Setting up "{self.type}" runtime...') self._hosts = self._get_hostlist() # Check that actually sufficient hosts found - if type_ != 'local' and len(self._hosts) < 2: + if self.type != 'local' and len(self._hosts) < 2: raise ValueError('Less than 2 hosts found in environment!') except Exception as e: rlxout.warning(f'Failed: {e}')