File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/nemo_run/core/execution Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -826,6 +826,12 @@ def materialize(self) -> str:
826826 sbatch_flags = []
827827 if self .slurm_config .heterogeneous :
828828 assert len (self .jobs ) == len (self .slurm_config .resource_group )
829+ final_group_index = len (self .slurm_config .resource_group ) - 1
830+ if self .slurm_config .het_group_indices :
831+ final_group_index = self .slurm_config .het_group_indices .index (
832+ max (self .slurm_config .het_group_indices )
833+ )
834+
829835 for i in range (len (self .slurm_config .resource_group )):
830836 resource_req = self .slurm_config .resource_group [i ]
831837 if resource_req .het_group_index :
@@ -858,7 +864,7 @@ def materialize(self) -> str:
858864 )
859865 for k in sorted (parameters ):
860866 sbatch_flags .append (_as_sbatch_flag (k , het_parameters [k ]))
861- if i != len ( self . slurm_config . resource_group ) - 1 :
867+ if i != final_group_index :
862868 sbatch_flags .append ("#SBATCH hetjob" )
863869 else :
864870 for k in sorted (parameters ):
You can’t perform that action at this time.
0 commit comments