Hello, Bjørn-Helge Mevik <b.h.me...@usit.uio.no> writes:
>> A solution was suggested in >> https://serverfault.com/questions/1090689/how-can-i-set-up-interactive-job-only-or-batch-job-only-partition-on-a-slurm-clu >>> Interactive jobs have no script and job_desc.script will be empty / >> not set. >> >> So maybe something like this code snippet? >> >> if job_desc.script == NIL then 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 -- Ángel de Vicente Research Software Engineer (Supercomputing and BigData) Tel.: +34 922-605-747 Web.: http://research.iac.es/proyecto/polmag/ GPG: 0x8BDC390B69033F52
smime.p7s
Description: S/MIME cryptographic signature