Hi everyone,
I have another Ruby tricky question. I want to implement adding SLURM constraints to the job submission parameters. So, I create a constraints entry box in form.yml, and in submit.yml.erb do
script:
native:
<%- if constraint != "" -%>
- "-C"
- "<%= constraint %>"
<%- end -%>
That all works great for a single constraint, but, to combine more than one constraint, it needs to be quoted. For example, to ask for both AMD CPU kinds that we have, the SLURM option is -C "rom|mil".
I am struggling with adding those quotes OOD’s generated list of SLURM options. The above in submit.yml.erb generates the following in the job_script_options.json:
native:
0: "-C"
1: "rom|mil"
which gets passed to the sbatch without quotes, that is as sbatch -C rom|mil, which SLURM does not like.
Anyone knows how to add quotes to this? I tried things like escaping, or double quotes, but no luck so far.
Thanks,
Martin