locked
RunUntilCanceled job uses all cores when it has no tasks RRS feed

  • Question

  • I am using RunUntilCanceled to allow me to submit tasks in batches instead of all at once. This means I must set Min & Max cores on the job. I want it to use the full cluster if it is free, so set the Min to 1 core and Max to the total # of cores I have. Once I am done adding I set to RunUntilCanceled = false and the job completes.

    If all of the tasks in the first batch finish before I submit the second batch, the job still holds all cores as "busy" and any other jobs I submit queue behind this job. Even though the job is doing nothing it blocks the entire cluster.

    How can I make a RunUntilCanceled job not block cores when it has no tasks?

    Friday, October 23, 2015 9:55 AM

Answers

  • Hi,

        Did you enabled "graceful preemption"? If yes, high priority jobs can preemption your "runUntilCancelled" job to min (That's 1 core in your case).

    Alternatively,

        You can add a long running task in your job so that it will keep your job running, and when you finished adding all task batches in the job, you can simply finish the task. Here is the command to finish a task within a job: https://technet.microsoft.com/en-us/library/dn864738.aspx


    Qiufang Shi

    Monday, October 26, 2015 1:31 AM