@@ -192,11 +192,14 @@ def determine_timestamp(sor, eor, splitinfo, cycle, ntf):
192192
193193 # ntimeframes is the total number of timeframes possible
194194 # if we have totaljobs number of jobs
195- timeframesperjob = ntimeframes // totaljobs
195+ maxtimeframesperjob = ntimeframes // totaljobs
196196 orbitsperjob = norbits // totaljobs
197- print (f"Each job can do { timeframesperjob } maximally at a prod split of { totaljobs } " )
198- print (f"With each job doing { ntf } timeframes, this corresponds to a filling rate of " , ntf / timeframesperjob )
199- maxcycles = timeframesperjob // ntf
197+ print (f"Each job can do { maxtimeframesperjob } maximally at a prod split of { totaljobs } " )
198+ print (f"With each job doing { ntf } timeframes, this corresponds to a filling rate of " , ntf / maxtimeframesperjob )
199+ # filling rate should be smaller than 100%
200+ assert (ntf <= maxtimeframesperjob )
201+
202+ maxcycles = maxtimeframesperjob // ntf
200203 print (f"We can do this amount of cycle iterations to achieve 100%: " , maxcycles )
201204
202205 return sor , int (thisjobID * maxcycles ) + cycle
@@ -213,6 +216,9 @@ def main():
213216 parser .add_argument ('forward' , nargs = argparse .REMAINDER ) # forward args passed to actual workflow creation
214217 args = parser .parse_args ()
215218
219+ # split id should not be larger than production id
220+ assert (args .split_id < args .prod_split )
221+
216222 # make a CCDB accessor object
217223 ccdbreader = CCDBAccessor (args .ccdb_url )
218224 # fetch the EOR/SOR
0 commit comments