From 3db0cb067f77cd5d9aed80a1335e68d997e7c6af Mon Sep 17 00:00:00 2001 From: Geoffroy Vallee Date: Mon, 13 Jun 2022 17:07:56 -0400 Subject: [PATCH] Slightly better management of binary's arguments in the context of SLURM --- pkg/jm/jobmgr_slurm.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/jm/jobmgr_slurm.go b/pkg/jm/jobmgr_slurm.go index 7a30424..ed78f22 100644 --- a/pkg/jm/jobmgr_slurm.go +++ b/pkg/jm/jobmgr_slurm.go @@ -282,7 +282,11 @@ func setupMpiJob(j *job.Job, sysCfg *sys.Config) error { ppr := j.NP / j.NNodes scriptText += fmt.Sprintf("--map-by ppr:%d:node -rank-by core -bind-to core", ppr) } - scriptText += " " + strings.Join(mpirunArgs, " ") + " " + j.App.BinPath + strings.Join(j.App.BinArgs," ") + "\n" + scriptText += " " + strings.Join(mpirunArgs, " ") + " " + j.App.BinPath + if len(j.App.BinArgs) > 0 { + scriptText += " " + strings.Join(j.App.BinArgs, " ") + } + scriptText += "\n" err = ioutil.WriteFile(j.BatchScript, []byte(scriptText), 0644) if err != nil {