Hello,
In my case (merely a variation from some older post here at
slurm-users), I'm using the following to make sure jobs go to the right
queue (either 'batch' or 'interactive'), and it seems to work just
fine:
if (job_desc.script == nil or job_desc.script == '') then
if (job_desc.partition ~= interactive_partition) then
job_desc.partition = interactive_partition
slurm.log_user("%s: normal job seems to be interactive, moved to %s partition.", log_prefix, job_desc.partition)
end
else
if (job_desc.partition == interactive_partition) then
job_desc.partition = batch_partition
slurm.log_user("%s: batch jobs cannot be run in the interactive partition, moved to %s partition.", log_prefix, job_desc.partition)
end
end