ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/Splitter.py
(Generate patch)

Comparing COMP/CRAB/python/Splitter.py (file contents):
Revision 1.4 by spiga, Mon Feb 9 18:20:20 2009 UTC vs.
Revision 1.7 by spiga, Wed Feb 11 22:13:03 2009 UTC

# Line 273 | Line 273 | class JobSplitter:
273          common.logger.message(str(jobCount)+" job(s) can run on "+str(totalEventCount)+" events.\n")
274  
275          # skip check on  block with no sites  DD
276 <        if noBboundary == 0 : self.checkBlockNoSite(blocks,jobsOfBlock)
276 >        if noBboundary == 0 : self.checkBlockNoSite(blocks,jobsOfBlock,blockSites)
277  
278         # prepare dict output
279          dictOut = {}
# Line 285 | Line 285 | class JobSplitter:
285  
286          # keep trace of block with no sites to print a warning at the end
287  
288 <    def checkBlockNoSite(self,blocks,jobsOfBlock):  
288 >    def checkBlockNoSite(self,blocks,jobsOfBlock,blockSites):  
289          # screen output
290          screenOutput = "List of jobs and available destination sites:\n\n"
291          noSiteBlock = []
# Line 433 | Line 433 | class JobSplitter:
433          common.logger.debug(5,'Splitting per events')
434          self.checkUserSettings()
435          jobDestination=[]
436 <        if (self.selectNumberOfJobs == 0):
437 <            msg = 'Must specify  number_of_jobs.'
436 >        if ( (self.selectTotalNumberEvents + self.selectEventsPerJob + self.selectNumberOfJobs) != 2 ):
437 >            msg = 'Must define exactly two of total_number_of_events, events_per_job, or number_of_jobs.'
438              raise CrabException(msg)
439  
440          managedGenerators =self.args['managedGenerators']
# Line 489 | Line 489 | class JobSplitter:
489                      args.append('1')
490                  else:
491                      args.append(str(i*self.eventsPerJob))
492 +            args.append(str(self.eventsPerJob))
493              self.list_of_args.append(args)
494         # prepare dict output
495          dictOut = {}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines