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

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



Hi John,

After carefully looking at it, I realized I had just a typo (missing parenthesis, sigh).Â
This is indeed working properly. Sorry about the noise.

Kenyi

On Fri, Jul 29, 2022 at 5:25 PM John M Knoeller <johnkn@xxxxxxxxxxx> wrote:

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

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/