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

Re: [HTCondor-users] if/endif conditionals in new/old style job transforms/routes

The new job router syntax is more like submit or config language than the classad language, so you can use if/else/endif in a route in the new syntax.

For instance, to add a NeedMultipleGPUs attribute to jobs that ask for more than a single GPU, you could use an If statement referring to the job attribute by using the My prefix.  


  if defined My.RequestGPUs
       EVALSET NeedMultipleGpus $(My.RequestGPUs) > 2


The above transform has no effect on jobs that don't have a RequestGPUs attribute, and will set a NeedMultpleGPUs attribute to either true or false
in jobs that do have a RequestGpus attribute

This only works if you use the new job router syntax. 


From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Thomas Hartmann <thomas.hartmann@xxxxxxx>
Sent: Tuesday, February 23, 2021 9:59 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] if/endif conditionals in new/old style job transforms/routes
Hi all,

can actually the if/else/endif semantic [1] be used in job
Maybe just in the '[new]' or 'old/internal' ad language?