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

Re: [HTCondor-users] Run each job of a batch on different worker node

the split classad function converts a stringlist into a classad list. That is, it takes a string value that is comma separated, and turns it into a list of strings.

ChildList = "bob, alice"

Then split produces this

split(ChildLIst) ->  { "bob", "alice" }

But the StrlistIMember function expects its second argument to be a string list, not a list of strings.  

If ChildRemoteUser is a string list, then you want to use it directly. 

condor_status -compact -p testmaster1.com -const 'StringListIMember( "testuser1@xxxxxxxx", ChildRemoteUser )'

On the other hand, if ChildRemoteUser is a list of strings (which is what I would expect), then you can use the join function to convert it to a string list.

condor_status -compact -p testmaster1.com -const 'StringListIMember( "testuser1@xxxxxxxx", Join(",", ChildRemoteUser) )'


From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of ervikrant06@xxxxxxxxx <ervikrant06@xxxxxxxxx>
Sent: Friday, February 18, 2022 10:37 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] Run each job of a batch on different worker node
Hello Experts,

I was trying to make this _expression_ work but it doesn't give me the node where the job is running with testuser1. 

condor_status -compact -p testmaster1.com -const 'StringListIMember( "\"testuser1@xxxxxxxx\"", SPLIT(ChildRemoteUser,",") )'

If the above constraint works I assume that I can use the same in job requirements like below. 

Requirements = !StringListIMember( "\"testuser1@xxxxxxxx\"", SPLIT(ChildRemoteUser,",") ) 

I wanted to run each job of the batch on a different worker node. 

Any inputs why _expression_ doesn't work?

Thanks & Regards,
Vikrant Aggarwal