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

Re: [HTCondor-users] Mixing up 'is' and 'isnt'?

Hi Carsten,

Re the below, ClassAds expressions can evaluate to one of four values: True, False, Error, or Undefined.   Note that "Defined" is not one of these four values.  So instead of writing clauses like "... && TotalGpus isnt defined", try "... && TotalGpus is Undefined" instead.  Some people find using the isUndefined() function more intuitive, for instance "... && isUndefined(TotalGpus)".

Hope the above helps,

On 2/15/2021 5:06 AM, Carsten Aulbert wrote:

even though I am beyond my first coffees, I do not get this output:

condor_status -af:h TotalGpus Gpus Machine -constraint "PartitionableSlot is true && TotalGPUs isnt defined"

TotalGpus Gpus Machine
2         0    a3102.atlas.local
1         1    a3104.atlas.local
1         1    a3108.atlas.local
1         1    a3112.atlas.local
1         0    a3116.atlas.local
1         1    a3120.atlas.local
1         0    a3124.atlas.local
8         2    a3128.atlas.local
1         1    a3217.atlas.local

condor_status -af:h TotalGpus Gpus Machine -constraint "PartitionableSlot is true && TotalGPUs is defined"

TotalGpus Gpus Machine
undefined undefined a3140.atlas.local
undefined undefined a3212.atlas.local
undefined undefined a3226.atlas.local
undefined undefined a3227.atlas.local

Since the two groups are correctly identified but are just inverse to my exceptions, can someone please enlighten me, what I am missing?

Thanks a lot in advance


PS: This is still on Condor 8.8.9, though release noted up to 8.8.12 does not seem to change anything in this respect.