Skip to content

Commit db60948

Browse files
committed
Evaluate Slurm job nodelist lazily
1 parent 113e62e commit db60948

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)