Skip to content

Commit 8fcc20a

Browse files
committed
Fix tests
1 parent c8d33c4 commit 8fcc20a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cloudai/systems/slurm/slurm_command_gen_strategy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,9 @@ def _append_sbatch_directives(self, batch_script_content: List[str]) -> None:
403403
def _append_nodes_related_directives(self, content: List[str]) -> Optional[Path]:
404404
num_nodes, node_list = self.get_cached_nodes_spec()
405405

406+
if self.system.distribution:
407+
content.append(f"#SBATCH --distribution={self.system.distribution}")
408+
406409
if node_list:
407410
content.append(f"#SBATCH --nodelist={','.join(node_list)}")
408411

@@ -416,8 +419,6 @@ def _append_nodes_related_directives(self, content: List[str]) -> Optional[Path]
416419
return hostfile
417420

418421
content.append(f"#SBATCH -N {num_nodes}")
419-
if self.system.distribution:
420-
content.append(f"#SBATCH --distribution={self.system.distribution}")
421422

422423
return None
423424

0 commit comments

Comments
 (0)