Is there a way to reserve a job’s position in a queue when changing its resources?
For example, if I have a job running on 80 cores and also several jobs waiting in queue (not entering because insufficient resources are available). Then I want to change the number of cores for this job to 96 (hence, need to stop it and re-submit it). Is there a way to preserve its location in the queue, so it will enter before other jobs, with the new core amount?
The short answer is No if you do not have admin/root privileges.
Even, if you have the root privileges, the solution is not straight forward.
- qhold all other queued jobs ( qselect -s Q | xargs qhold )
- qdel your job
- qsub new job with 96 cores
- using job sort formula with ncpus as a factor ( by_queue (prime/non-prime) set to false in the sched_config)
- set scheduling to false
- qdel the job
- submit the job with 96 cores
- set scheduling to true
There are other similar solutions, but there is no feature or configuration to suffice your requirement.