What is the AND statement for HTCondor HPC?

23 Views Asked by At

It seems this HPC is hard to google docs. How does one write an AND statement for it? e.g. for OR one does:

requirements = (CUDADeviceName == "Quadro RTX 6000") || (CUDADeviceName == "NVIDIA A40")

would:

requirements = (CUDADeviceName != "Tesla K40m") /\ (CUDADeviceName == "NVIDIA A40")

work? What I want is NOT tesla k40m and NOT A40. Anything else is fine.

Gives error:

(metalearning_gpu) miranda9~/diversity-for-predictive-success-of-meta-learning $ condor_submit job.sub
Submitting job(s)ERROR: Parse error in expression: 
        Requirements = ((CUDADeviceName != "Tesla K40m") /\ (CUDADeviceName != "NVIDIA A40")) && (TARGET.Arch == "X86_64") && (TARGET.OpSys == "LINUX") && (TARGET.Disk >= RequestDisk) && (TARGET.Memory >= RequestMemory) && (TARGET.Cpus >= RequestCpus) && (TARGET.gpus >= Requestgpus) && ((TARGET.FileSystemDomain == MY.FileSystemDomain) || (TARGET.HasFileTransfer))
2

There are 2 best solutions below

0
Charlie Parker On

For an AND/conjuction this seems to work:

requirements = (CUDADeviceName != "Tesla K40m") && (CUDADeviceName != "NVIDIA A40")
0
Greg On

Yes, you want && for conjunction.

For a complete tutorial of the classad expression language, see the manual section at https://htcondor.readthedocs.io/en/latest/classads/index.html

Or, there's a YouTube tutorial about the expression language at

https://www.youtube.com/watch?v=Y8aHj8q56ik