Skip to content

Commit d428939

Browse files
authored
Merge pull request #10 from gvallee/topic/slurm_improved_bin_arg_mgt
Slightly better management of binary's arguments in the context of SLURM
2 parents a7107d0 + 3db0cb0 commit d428939

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/jm/jobmgr_slurm.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,11 @@ func setupMpiJob(j *job.Job, sysCfg *sys.Config) error {
282282
ppr := j.NP / j.NNodes
283283
scriptText += fmt.Sprintf("--map-by ppr:%d:node -rank-by core -bind-to core", ppr)
284284
}
285-
scriptText += " " + strings.Join(mpirunArgs, " ") + " " + j.App.BinPath + strings.Join(j.App.BinArgs," ") + "\n"
285+
scriptText += " " + strings.Join(mpirunArgs, " ") + " " + j.App.BinPath
286+
if len(j.App.BinArgs) > 0 {
287+
scriptText += " " + strings.Join(j.App.BinArgs, " ")
288+
}
289+
scriptText += "\n"
286290

287291
err = ioutil.WriteFile(j.BatchScript, []byte(scriptText), 0644)
288292
if err != nil {

0 commit comments

Comments
 (0)