Skip to content

Commit

Permalink
Fix bug when using "auto" environment detection in a "local" environm…
Browse files Browse the repository at this point in the history
…ent.
  • Loading branch information
m-kurz committed Jul 24, 2024
1 parent 6304690 commit 03f574a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/relexi/runtime/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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}')
Expand Down

0 comments on commit 03f574a

Please sign in to comment.