Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] job transform: change requirement condition?
- Date: Thu, 18 Oct 2018 15:46:57 +0000
- From: John M Knoeller <johnkn@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] job transform: change requirement condition?
we currently use the htcondor wiki for examples like this.
specifically this page https://htcondor-wiki.cs.wisc.edu/index.cgi/wiki?p=HowToAdminRecipes
A few notes about your (very helpful) writeup.
regexps() does not replace all occurrences of a match, only the first one. There is currently no
way in the classad language to replace all occurrences of a match.
In your examples, this
EVALMACRO tmp.ErrOld = unparse(Err)
SET ErrOld $(tmp.ErrOld)
Could have been written as this
COPY Err ErrOld
Since we intend to set a new value for Err, we can use RENAME rather than copy.
And since Err is a string, there is no need to unparse it.
But regexp cannot be used directly in an If statement, you need a temporary variable for that test
So the rules for modifying Err would be something like this:
EVALMACRO tmp.ErrDev regexp("^/dev/",Err?:"")
if $(tmp.ErrDev)
RENAME Err ErrOld
EVALSET Err = regexps("^/dev/(.*)",ErrOld,"/var/log/\\1")
endif
-tj
-----Original Message-----
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Thomas Hartmann
Sent: Thursday, October 18, 2018 9:37 AM
To: htcondor-users@xxxxxxxxxxx
Subject: Re: [HTCondor-users] job transform: change requirement condition?
btw: do you have maybe an example repo or so, where one could check in
configuration examples? E.g., for adding a MyTransformExample.md
On 2018-10-18 16:25, Thomas Hartmann wrote:
> Hi TJ et. al.,
>
> many thanks for all your help! I got it now to work as intended! :)
>
> Sorry for the late reply (I had to find some time to go back into the
> details) - to make amends I compiled the thread in a short guide [1].
>
> Cheers and thanks,
> Thomas
>
> [1]
> https://confluence.desy.de/display/~hartmath/HTCondor+job+transforms
> Please let me know, if you find any errors or have suggestions.
>
>