Taking Advantage of Dynamic Slots – or how to claim a PC rather than a Core DynamicSlots
Introduction
The condor pool uses so-called Dynamic Slots.
What this means is that the PCs can function:
- run a job per core; or
- you can request the entire machine.
- (Something in between the two extremes is also possible.)
Whether in use or not, the top level of a partitionable, dynamic slot always appears Unclaimed. When in use, sub-slots appear as Claimed. They appear as slot1_1, slot1_2, etc., up to the number of cores on the PC. (You will also see slot1.1, slot1.2, as this nomenclature varies slightly with the version of Condor.)
Why would I want this facility?
There are two main reasons:
- your job requires access to some resource, for example the Graphics Processing Unit, and no one else must have the PC at the same time
- your job needs a lot of memory (RAM) and/or takes advantage of multicore support within your application
How do I use this facility?
First of all you identify in your Requirements line, of the submit.txt file, that you want dynamic slots:
... && (HAS_DYNAMIC =?= True)
If, further, you want to make sure you get the entire PC, you need to know how many cores it has. To this end, we have added classads: HAS_DYNAMIC4
, HAS_DYNAMIC8
and HAS_DYNAMIC16
, with the obvious meaning. Clearly, if we get PCs with more cores, more such classads will appear. So, if you want to target partitionable machines with 4 cores, you would change the above line to:
... && (HAS_DYNAMIC4 =?= True)
Further modification to your submit file
The last thing you need to do is add the following extra line to your submit file:
Request_CPUs = 4
again the 4 could be 8 if you only want our 8 core PCs (or 16 for 16 core machines, etc). The default is 1, which is why if you make no changes to your scripts dynamic slots will behave much like static ones.
You should also add:
Request_Memory = mmm
and optionally if needed
Request_Disk = kkkkkk
where mmm
is in megabytes and kkkkkk
is in kilobytes.
Special Case of Claiming all of a PC of Any Core Size
Sometimes it is desirable to be able to claim all of a PC no matter how many cores it has. Further, in such cases one normally would like the PCs with the most cores to be allocated first. The above simple HAS_DYNAMIC
classads cannot easily be used for this case. Use the following template, where the …
in the Requirements line stands for whatever other requirements you have.
Requirements = … && (Target.TotalCpus =!= UNDEFINED) && ((Target.PartitionableSlot =?= TRUE) || (Target.DynamicSlot =?= TRUE)) Rank = Target.TotalCpus Request_CPUs = Target.TotalCpus Request_Memory = 3000
Further information
Please contact us if you need any help with any of the above.