[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Limiting n. of jobs per user via matchmaking



Hello all, I have managed to solve the problem by submitting the following:

Universe = vanilla
Executable = /bin/sleep 
Arguments = 600
Log = myjob.log
Output  myjob.out
Error = myjob.err
# Max 2 running jobs per user
Requirements = ( isUndefined(SubmitterUserResourcesInUse) || (SubmitterUserResourcesInUse <= 1.0) )
Queue 5

where the Requirements _expression_ takes into account the fact that SubmitterUserResourcesInUse is defined on the negotiator but undefined on the remote slots.

I have also noticed that HTCondor does some matchmaking optimization by caching the match list. Caching should be however disabled in my case, as the SubmitterUserResourcesInUse value changes whenever a single job submission succeeds.

To do so:

  NEGOTIATOR_MATCHLIST_CACHING = False

Hope this will help someone!

Cheers
--
Dario Berzano
about.me/dario.berzano


On Fri, Apr 4, 2014 at 4:30 PM, Dario Berzano <dario.berzano@xxxxxxx> wrote:
Hello all,

  I am attempting to limit the number of jobs running per user via a Requirements _expression_, i.e. something like:

Universe = vanilla
Executable = /bin/sleep 
Arguments = 600
Log = myjob.log
Output  myjob.out
Error = myjob.err
Requirements = ( TARGET.SubmitterUserResourcesInUse <= 1 )
Queue 3

where the SubmitterUserResourcesInUse attribute is something that I have found thanks to the help of some HTCondor experts and the documentation:


However no job ever starts. I have tried:

  condor_q -better-analyze

which gives me:

         Slots
Step    Matched  Condition
-----  --------  ---------
[0]           0  TARGET.SubmitterUserResourcesInUse <= 1

[...]

    Condition                         Machines Matched    Suggestion
    ---------                         ----------------    ----------
1   ( ( .RIGHT.SubmitterUserResourcesInUse <= 1 ) )
                                      0                   REMOVE

suggesting me that my requirement never matches.

I am no HTCondor expert and I am a bit lost... what I am doing wrong here?

For the record I am using HTCondor v8.0.6.

Thanks for your help!

Cheers
--
Dario Berzano