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

[HTCondor-users] Using stringListMember(TARGET.Arch... ?



Hello,

I'm trying to get a job requirement to match to different architectures.

The documentation Âsays:

https://htcondor.readthedocs.io/en/latest/classad-attributes/job-classad-attributes.html


A classad _expression_ evaluated by the condor_negotiator, condor_schedd, and condor_startd in the context of slot ad. If true, this job is eligible to run on that slot. If the job requirements does not mention the (startd) attribute OPSYS, the schedd will append a clause to Requirements forcing the job to match the same OPSYS as the submit machine. The schedd appends a simliar clause to match the ARCH. The schedd parameter APPEND_REQUIREMENTS, will, if set, append that value to every jobâs requirements _expression_.

We don't have APPEND_REQUIREMENTS set:

$ condor_config_val -dump | grep APPEND_REQUIREMENTS
APPEND_REQUIREMENTS =


So, I was expecting something like this to work:

Requirements = (stringListMember(TARGET.Arch, "X86_64, ppc64le") && (TARGET.OpSys == "LINUX") && (TARGET.Disk >= RequestDisk) && (TARGET.Memory >= RequestMemory) && (TARGET.Cpus >= RequestCpus) && (TARGET.HasFileTransfer)

However, the schedd still adds its own. TARGET.Arch classad

Submitting job(s)ERROR: Parse error in _expression_: Requirements = ((stringListMember(TARGET.Arch, "X86_64, ppc64le") && (TARGET.OpSys == "LINUX") && (TARGET.Disk >= RequestDisk) && (TARGET.Memory >= RequestMemory) && (TARGET.Cpus >= RequestCpus) && (TARGET.HasFileTransfer)) && (TARGET.Arch == "X86_64") && (TARGET.OpSys == "LINUX") && (TARGET.Disk >= RequestDisk) && (TARGET.Memory >= RequestMemory) && ((TARGET.FileSystemDomain == MY.FileSystemDomain) || (TARGET.HasFileTransfer))

If I use this instead:

Requirements = (TARGET.Arch == "X86_64" || TARGET.Arch == "ppc64le") && (TARGET.OpSys == "LINUX") && (TARGET.Disk >= RequestDisk) && (TARGET.Memory >= RequestMemory) && (TARGET.Cpus >= RequestCpus) && (TARGET.HasFileTransfer)

It works though. But stringListMember() is honestly simpler and cleaner.Â
Am I invoking stringListMember wrong? Is there an easy fix to that submit syntax?

Best regards,
Kenyi