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

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



You are using stringListMember correct. It works for me.

 

When I configure APPEND_REQUIREMENTS like this

 

   APPEND_REQUIREMENTS = stringListMember(TARGET.Arch, "X86_64, ppc64le")

 

I Get this for requirements.

 

-- from the job classad---

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

 

Or if I donât use APPEND_REQUIREMENTS, but instead set requirements in the submit file like this

 

requirements = stringListMember(TARGET.Arch, "X86_64, ppc64le") 

 

I get this same resulting Requirements attribute in the job classad.

 

-tj

 

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Kenyi Hurtado Anampa
Sent: Friday, July 29, 2022 4:06 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [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