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

Re: [HTCondor-users] Regular Expressions in -constraint



hups,

truly ignored the real problem here, sorry for that, should read less e-mail on the train it results in fuzzy responses :( 

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

----- UrsprÃngliche Mail -----
Von: "Christoph Beyer" <christoph.beyer@xxxxxxx>
An: "O'NEAL Mark" <mark.oneal@xxxxxxxxxxx>
CC: "htcondor-users" <htcondor-users@xxxxxxxxxxx>
Gesendet: Mittwoch, 6. November 2019 15:07:05
Betreff: Re: [HTCondor-users] Regular Expressions in -constraint

hi,

jep, you are right, sorry this is not my speciality at all :( 

Though this works for me: 

[root@bird-htc-sched13 spool]# condor_q -const 'regexp("dl_4j3b_blr_transformed_IN_H2_tag_bin1",jobbatchname,"i")'

-- Schedd: bird-htc-sched13.desy.de : <131.169.223.41:26735> @ 11/06/19 15:03:08
OWNER    BATCH_NAME                                SUBMITTED   DONE   RUN    IDLE  TOTAL JOB_IDS
<userid> dl_4j3b_blr_transformed_IN_H2_tag_bin1  11/6  14:53      _      _      2      2 21929468.0 ... 21929556.0

Total for query: 2 jobs; 0 completed, 0 removed, 2 idle, 0 running, 0 held, 0 suspended 
Total for all users: 47099 jobs; 0 completed, 1600 removed, 41630 idle, 3607 running, 262 held, 0 suspended

Maybe you can try it with the exact string first to see if you got the regex overall syntax right and then work your way through the regexpart itself ? 

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

----- UrsprÃngliche Mail -----
Von: "O'NEAL Mark" <mark.oneal@xxxxxxxxxxx>
An: "Christoph Beyer" <christoph.beyer@xxxxxxx>, "htcondor-users" <htcondor-users@xxxxxxxxxxx>
Gesendet: Mittwoch, 6. November 2019 13:56:48
Betreff: RE: [HTCondor-users] Regular Expressions in -constraint

Hi Christoph,

Thanks for your comments.

I thought something similar at first, but the regexp example in the manual:
https://htcondor.readthedocs.io/en/v8_8_4/misc-concepts/classad-mechanism.html#querying-with-classad-expressions

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.

Regards,
Mark

-----Original Message-----
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.


Hi,

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 ?

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


----- UrsprÃngliche Mail -----
Von: O'NEAL Mark via HTCondor-users <htcondor-users@xxxxxxxxxxx>
An: 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

Hello,

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

returns:
191105105207_lidarMatching_DAG.dag+1243

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,
Mark

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

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