Skip to content

Commit 7797ef1

Browse files
authored
Merge pull request #3022 from vkarak/bugfix/slurm-lazy-eval-nodelist
[bugfix] Evaluate Slurm job nodelist lazily
2 parents 3e3f4c5 + 8f22223 commit 7797ef1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reframe/core/schedulers/slurm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def __init__(self, *args, **kwargs):
7979

8080
@property
8181
def nodelist(self):
82-
# Redefine nodelist so as to generate it from the nodespec
83-
if self._nodelist is None and self._nodespec is not None:
82+
# Generate the nodelist only after the job is finished
83+
if slurm_state_completed(self.state):
8484
completed = osext.run_command(
8585
f'scontrol show hostname {self._nodespec}', log=False
8686
)

0 commit comments

Comments
 (0)