[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Regular Expressions in -constraint
- Date: Wed, 06 Nov 2019 12:56:48 +0000
- From: "O'NEAL Mark" <mark.oneal@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] Regular Expressions in -constraint
Thanks for your comments.
I thought something similar at first, but the regexp example in the manual:
shows passing the attribute Name rather than '$Name'.
I did test it anyway:
condor_q -nobatch -const " regexp(""([0-9]+)(_)([A-Za-z]+)"", '$JobBatchName', ""\3"") "
and no jobs are returned.
From: Beyer, Christoph <christoph.beyer@xxxxxxx>
Sent: Wednesday, November 6, 2019 1:46 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Cc: O'NEAL Mark <mark.oneal@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Regular Expressions in -constraint
This email is not from Hexagonâs Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email.
interesting need to try that myself but out of the too of my head: you surely need to put '$JobBatchName' otherwise you try to match the string and not the variable ?
Building 02b, Room 009
----- UrsprÃngliche Mail -----
Von: O'NEAL Mark via HTCondor-users <htcondor-users@xxxxxxxxxxx>
CC: O'NEAL Mark <mark.oneal@xxxxxxxxxxx>
Gesendet: Wed, 06 Nov 2019 07:01:03 +0100 (CET)
Betreff: [HTCondor-users] Regular Expressions in -constraint
I'm trying out the regular expression functionality of HTCondor's ClassAd mechanism, and have a question for some behavior I don't yet understand.
As background, I would eventually like to utilize a portion of the JobBatchName attribute as a Requirement for matching jobs with machines.
To test how this might work, I'm using condor_q to learn. HTCondor 8.8.4 running on Windows.
To identify the JobBatchName:
condor_q -nobatch -format %s\n JobBatchName
The string 'lidarMatching' in the JobBatchName is the portion of interest.
I have constructed a regular expression which I think is successfully matching on JobBatchName:
condor_q -nobatch -constraint " regexp(""([0-9]+)(_)([A-Za-z]+)"", JobBatchName) "
as it will return all queued jobs with a JobBatchName formatted like above.
I try to confirm that I am capturing 'lidarMatching' in the way I expect the regexp should be working:
condor_q -nobatch -constraint " regexp(""([0-9]+)(_)([A-Za-z]+)"", JobBatchName, ""\3"") == ""lidarMatching"" "
but this command doesn't return any jobs.
Could someone point to a way with condor_q or other command line to simply 'print' what is matched by the different regexp capture groups?
Thanks and Regards,