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

[HTCondor-users] Python and Requirements in a ClassAd



Hi,

I'd like to use the Python binding to submit a job. I've successfully submitted jobs while altering the class ad before submitting, and that works. works.

Now I'm trying to add Requirements to the class ad and ran into a problem.

A line like this in code:

            ad["Requirements"] = 'TARGET.Machine == "%s"' % machine

The Requirements expression for your job is:

    "TARGET.Machine == \"somemachine.ncsa.uiuc.edu\"" && TARGET.OPSYS == "LINUX" &&
    TARGET.ARCH == "X86_64" &&
    TARGET.FileSystemDomain == MY.FileSystemDomain &&
    TARGET.Disk >= RequestDisk && TARGET.Memory >= RequestMemory

Note the extra set of quotes around the machine expression.

What's the right syntax for adding this?  I'd also like to add the slot number, but I simplified the problem for this email.  I think I'm missing something pretty basic here.

Any help would be appreciated.

Steve