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

Re: [HTCondor-users] Enforcing the policy of one job per user on a specific resource



Is it possible to create a similar start expression for partitionable
slots? Otherwise, is the condor solution for people taking up too much
resources pre-emption?

Thanks!

On Thu, Nov 29, 2018 at 12:26 PM Boris Sadkhin <bsadkhin.anl@xxxxxxxxx> wrote:
>
> Hi Todd,
>
> Thank you very much, that recipe works great. I appreciate your help.
>
> If you happen to have a moment could you provide a hint as to what would need to be changed in the start expression to achieve similar behavior for partionable slots?
>
> Thanks again
>
>
> ïOn 11/26/18, 5:18 PM, "Todd Tannenbaum" <tannenba@xxxxxxxxxxx> wrote:
>
>     On 11/26/2018 12:55 PM, Boris Sadkhin wrote:
>     > Hi Todd,
>     > Thanks again for the reply and the recipe.
>     > So we actually submit all jobs as the "condor_pool" user, and then set the AccountingGroup per job in lieu of actual users.
>     >
>     > Is there a way to get the formula to use the accounting group instead of the user?
>
>     Hi Boris,
>
>     So you are saying your submit files look like:
>
>       executable = foo.exe
>       +AccountingGroup = "something"
>       queue
>
>     If so, indeed we just need to tweak the formula a bit.  The startd already should be advertising the AccountingGroup of the running job in each slot, but it appends the UID_DOMAIN as well.  So I suggest trying a condor_config like so :
>
>           # Set this to be how many slots each user can have on this machine
>           MAX_SLOTS_PER_ACCTGRP = 1
>
>           # Tell the startd to cross-advertise AccountingGroup and Activity into each
>           # slot, so every slot will have slot1_AccountingGroup, slot2_AccountingGroup, etc.
>           STARTD_SLOT_ATTRS = $(STARTD_SLOT_ATTRS) AccountingGroup Activity
>
>           # You will unfortunately need to extend this expression if you have more
>           # than five slots... just follow the pattern.
>           SLOTS_SERVING_THIS_ACCTGRP = ( \
>            (TARGET.AccountingGroup =?= splitUserName(slot1_AccountingGroup)[0] && slot1_Activity == "Busy") + \
>            (TARGET.AccountingGroup =?= splitUserName(slot2_AccountingGroup)[0] && slot2_Activity == "Busy") + \
>            (TARGET.AccountingGroup =?= splitUserName(slot3_AccountingGroup)[0] && slot3_Activity == "Busy") + \
>            (TARGET.AccountingGroup =?= splitUserName(slot4_AccountingGroup)[0] && slot4_Activity == "Busy") + \
>            (TARGET.AccountingGroup =?= splitUserName(slot5_AccountingGroup)[0] && slot5_Activity == "Busy") + \
>            0 )
>
>           # Append to Start expression to only start jobs if this user is under
>           # the limit for this machine.
>           START = $(START) && ( $(SLOTS_SERVING_THIS_ACCTGRP) < $(MAX_SLOTS_PER_ACCTGRP) )
>
>
>     Hope the above helps.
>     p.s. for an explanation of the classad function splitUserName() see the Manual at http://tinyurl.com/y7tcb5ed
>
>     regards,
>     Todd
>
>     --
>     Todd Tannenbaum <tannenba@xxxxxxxxxxx> University of Wisconsin-Madison
>     Center for High Throughput Computing   Department of Computer Sciences
>     HTCondor Technical Lead                1210 W. Dayton St. Rm #4257
>     Phone: (608) 263-7132                  Madison, WI 53706-1685
>
>
>