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

Re: [Condor-users] Offset $(process) or simple arithmetic in JDL file



You can get the behavior of not having the strange file names by using -disable
at the command line or putting "skip_filechecks = true" in the submit file.

Nathan Panike

On Thu, Dec 15, 2011 at 09:28:51PM -0500, Matthew Farrellee wrote:
> On 12/15/2011 08:58 PM, Emir Imamagic wrote:
> >Hello,
> >
> >I just spent some time trying to figure out is there a way to offset
> >$(Process) variable or at least do some simple arithmetic and store it
> >in another macro. We have couple of users who could benefit from queuing
> >large amount of jobs, but it is too complicated for them to tune their
> >input files and arguments to 0-N. Right now they are using scripts but
> >it would be much more elegant to have a solution based purely on JDL.
> >
> >Initially it seemed impossible according to threads:
> >- "Condor submit file and process number" (16.7.2004)
> >- "Question about $(Process)" (4.7.2005)
> >- "$(Process)" (24.6.2006)
> >- "process number to start higher than zero" (19.8.2010)
> >- "Help with ClassAd syntax: offset $(process)" (2.2.2011.)
> >
> >Finally I was lucky and spotted this thread from 2008: "$(Process) not
> >starting at 0" which indicated that the solution is implemented in 7.1
> >and should work like this:
> >$$([$(PROCESS)+100])
> >This is even listed in new features of 7.1:
> >
> >http://research.cs.wisc.edu/condor/manual/v7.1/8_3Development_Release.html#SECTION00933000000000000000
> >
> >
> >Since that is an old, development version seemed logical to me that this
> >feature is still there in the latest stable version (condor-7.6.4-1).
> >Unfortunately simple test proved me wrong, expression is not expanded
> >and I ended up with file with containing $$([0+1]) in its name.
> >
> >Does anyone know what happened with this feature or how did it get lost
> >between 7.1 and 7.6? I quickly went through Version history but couldn't
> >find anything.
> >
> >Also, if anyone has a different suggestion it will be more then welcome.
> >
> >Thanks in advance
> 
> It still works, but apparently has some cruft if you use it in a file name.
> 
> $ cat test.sub
> cmd = /bin/echo
> args = $$([$(Process)+100])
> output = test.out.$$([$(Process)+100])
> queue 10
> 
> $ cat test.out.*
> 100
> 101
> 102
> 103
> 104
> 105
> 106
> 107
> 108
> 109
> 
> However,
> 
> $ ls test.out.*
> 0 test.out.$$([0+100])  0 test.out.$$([5+100])  4 test.out.100  4
> test.out.105
> 0 test.out.$$([1+100])  0 test.out.$$([6+100])  4 test.out.101  4
> test.out.106
> 0 test.out.$$([2+100])  0 test.out.$$([7+100])  4 test.out.102  4
> test.out.107
> 0 test.out.$$([3+100])  0 test.out.$$([8+100])  4 test.out.103  4
> test.out.108
> 0 test.out.$$([4+100])  0 test.out.$$([9+100])  4 test.out.104  4
> test.out.109
> 
> condor_submit is being too helpful, checking that the output file
> can be written to upfront. In this case, condor_submit could check
> the correct file, but in general condor_submit has no hope of
> knowing what the expression will evaluate to. Seems condor_submit
> should skip this file check when $$([]) is present.
> 
> https://condor-wiki.cs.wisc.edu/index.cgi/tktview?tn=2720
> 
> Best,
> 
> 
> matt
> _______________________________________________
> Condor-users mailing list
> To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/condor-users
> 
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/condor-users/