Charlie Parker
Charlie Parker

Reputation: 5266

What is the AND statement for HTCondor HPC?

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))

Upvotes: 1

Views: 26

Answers (2)

Greg
Greg

Reputation: 733

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

Upvotes: 0

Charlie Parker
Charlie Parker

Reputation: 5266

For an AND/conjuction this seems to work:

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

Upvotes: 0

Related Questions