Hi,
Would it be possible to add new options for building the slurm header?
I’ve identified 3 files that need to be modified to add the “exclude” and “constraint” slurm options.
Hi @fpa88 , not sure if you were already aware of this option, but the easiest is to define the SLURM headers directly in the custom_scheduler_commands
metadata option. You can define it per job instance, e.g.
results, node = run.get_node(
SomeCalcJob,
...,
metadata={
'options': {
'custom_scheduler_commands': '#SLURM --constraint=...'
}
}
)
If the values are “static” and are not going to change often between different jobs, you can also opt to configure them in the prepend_text
of the Code
. Whenever you use that Code
as an input for a job, the prepend_text
is automatically inserted into the submission script.
1 Like
Hi,
Perfect, I will do like this.
Thanks
It’s working. I need to define a string in this way :
OPTIONS = AttributeDict()
OPTIONS.custom_scheduler_commands = ‘#SBATCH --constraint=Feature1\n#SBATCH --exclude=mycomputenode01’