Hi Carsten,
Was able to make something like this to work by making a custom machine resource on the EP with the following configuration:
### STARTD Configuration
# Create Custom Resource
MACHINE_RESOURCE_affinity = 1,2,3,4
NUM_SLOTS_TYPE_1 = 1
SLOT_TYPE_1 @=slot
cpus=6
âââ# Assign 75% of affinity resources to this slot (1,2,3)
affinity=75%
ram=90%
swap=100%
disk=50%
@slot
SLOT_TYPE_1_PARTITIONABLE = true
NUM_SLOTS_TYPE_2 = 1
SLOT_TYPE_2 @=slot
cpus=2
# Assign 25% of affinity resources to this slot (4)
affinity=25%
ram=10%
swap=0%
disk=50%
@slot
SLOT_TYPE_2_PARTITIONABLE = true
### End STARTD Configuration
With this configuration if you run condor_status -af TotalSlotAffinity AssignedAffinity you should see:
3 1,2,3 (Slot 1 assigned 'affinity' resources)
1 4 ( Slot 2 assigned 'affinity' resources)
Then in my simple sleep job I requested a single affinity resource and a requirement to target a specific affinity value with the following:
### Job Description
executable = /bin/sleep
arguments = 3000
log = job.log
request_disk = 10M
request_cpus = 1
# Request an affinity resource
request_affinity = 1
# Specifically request affinity 4
requirements = stringListMember("4", Target.AssignedAffinity)
queue 2
### End Job Description
Note for the requirements line you just need to change the number ("4") to whichever value you want the job to target.
I am not sure if this is exactly what you need for your use case, but hopefully this helps.
Cheers,
Cole Bollig
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Carsten Aulbert <carsten.aulbert@xxxxxxxxxx>
Sent: Tuesday, February 11, 2025 6:22 AM To: Thomas Hartmann <thomas.hartmann@xxxxxxx>; HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx> Subject: Re: [HTCondor-users] How to specify slot specific information into same machine class ad name? Hi
On 2/11/25 13:19, Thomas Hartmann wrote: > I am not sure, if I got you correctly, but maybe concurrency limits [1] > might be an option? > I.e., to define a consumable resource per your fragmented slots - > classical example might be a limited number of licenses for an > application, that can be used in parallel. If each of your slots gets a > concurrency limit assigned, that can be "used up" by the users. maybe that would be working, Kind of ugly work-around but probably doable. At the moment, we will start testing something like IDX23 = /path/to/file/with/important/information SLOT1_STARTD_ATTRS = IDX23 and then simply try requirement = (isdefined(IDX23)) arguments = --file $(IDX23) not sure, if this will fly, but let's see :) Cheers Carsten -- Dr. Carsten Aulbert, Max Planck Institute for Gravitational Physics, CallinstraÃe 38, 30167 Hannover, Germany, Phone +49 511 762 17185 |