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

Re: [HTCondor-users] More job transform questions



Hi Jeff,

it is a long time ago that I actively developed some transform expressions but I remember that the built-in debug() _expression_ did help me at times as the evaluation is the found in the condor logs (SchedLog) it works a bit similar to set-x in bash ...

CLCoreEquiv = debug(max({ MY.RequestCpus, int(MY.RequestMemory / 4096) }))

might help ...

Best
christoph


--
Christoph Beyer
DESY Hamburg
IT-Department

Notkestr. 85
Building 02b, Room 009
22607 Hamburg

phone:+49-(0)40-8998-2317
mail: christoph.beyer@xxxxxxx


Von: "Antonio Delgado Peris via HTCondor-users" <htcondor-users@xxxxxxxxxxx>
An: "HTCondor-Users Mail List" <htcondor-users@xxxxxxxxxxx>
CC: "antonio delgado peris" <Antonio.Delgado.Peris@xxxxxxx>
Gesendet: Mittwoch, 5. Februar 2025 14:21:18
Betreff: Re: [HTCondor-users] More job transform questions

Hi Jeff,

 

I think that the problem is that a list must be enclosed in curly brackets. Can be seen e.g. with:

 

$ classad_eval 's="a, b"' 'split(s)'

[ s = "a, b" ]

{ "a","b" }

 

As for the transform debugging, here is an example for your case:

 

$ cat /tmp/ad

RequestCpus = 4

RequestMemory = 5000

 

$ cat /tmp/rules

CLCoreEquiv = max({ MY.RequestCpus, int(MY.RequestMemory / 4096) })

EVALSET Arlo $(CLCoreEquiv)

 

$ condor_transform_ads -rules /tmp/rules /tmp/ad

Arlo = 4

RequestCpus = 4

RequestMemory = 5000

 

 

Hope this helps.

 

Cheers,

    Antonio

 

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Jeff Templon
Sent: Wednesday, 5 February 2025 13:32
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] More job transform questions

 

Hi,

 

Why does this not work, inside a job transform?

 

# these don't work like I'd expect

CLCoreEquiv = max([ MY.RequestCpus, int(MY.RequestMemory / 4096) ])

EVALSET Arlo $(CLCoreEquiv)

 

 

The name âArloâ has no significance, itâs a result of trying to boil the problem down to the smallest reproducible bit.  I saw elsewhere, int used as $INT, Iâve never seen âmaxâ used in the docs for the transform, however âjoinâ works fine, which would lead me to expect that âmaxâ would work and âintâ as well.  The documentation is ârather sketchyâ on these details AFAICT.

 

Iâd appreciate any pointers, as well as a concrete, working example of how to use the transform debugging tool (the docs are rather sketchy on those details as well).

 

J âWhereâs SketchUp Pro when you need itâ T

 


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe

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