Dear SLURM experts,
I was wondering, wether it is possible to schedule jobs of different sizes,
where only one of them should run at any time.
It is not too important how many nodes the job would get, thus I'd like to grab
spare nodes and run short jobs on them.
I thought, the singleton dependency might be just about right for that. But it
turns out, that there is this logic attached to it:
now = 1;
for (i=0; i<job_queue_size; i++) {
qjob_ptr = job_queue[i].job_ptr;
/* already running/suspended job or previously
* submitted pending job */
if ((qjob_ptr->job_state == JOB_RUNNING) ||
(qjob_ptr->job_state == JOB_SUSPENDED) ||
((qjob_ptr->job_state == JOB_PENDING) &&
(qjob_ptr->job_id < job_ptr->job_id))) {
now = 0;
break;
}
}
So, whenever there is a job already pending in the queue, a new job of this
name will not be considered for execution.
This rules out this strategy, as smaller jobs might be blocked by larger jobs
waiting on ressources, or the other way around,
large jobs will only execute after smaller jobs, when those were submitted
earlier. What I had hoped for was, submission of
a bunch of large jobs, such that they are preferred, followed by a bunch of
smaller jobs, to run when the larger ones do not
fit.
Is there any other means in SLURM to achieve the scenario I am aiming for? Or
could the check for pending jobs be dropped
from the logic above somehow?
Thanks!
Harald=