Project

General

Profile

glideinFrontendLib.py.patch

Igor Sfiligoi, 12/04/2012 02:36 PM

View differences:

frontend/glideinFrontendLib.py
251 251
            cq_jobs.add(t)
252 252

  
253 253
    list_of_all_jobs=[]
254
    all_jobs_clusters={}
254 255

  
255 256
    for glidename in glidein_dict:
256 257
        glidein=glidein_dict[glidename]
......
275 276
                        cluster_arr.append(t)
276 277
                        schedd_count+=1
277 278
                    # adding a whole cluster much faster
278
                    sjobs_arr+=cluster_arr
279
                    del cluster_arr
279
                    #+sjobs_arr+=cluster_arr
280
                    first_t=(first_jid[0]*procid_mul+first_jid[1])*nr_schedds+scheddIdx
281
                    all_jobs_clusters[first_t]=cluster_arr
282
                    sjobs_arr+=[first_t]
283
                    #+del cluster_arr
280 284
                    pass
281 285
                pass
282 286
            jobs_arr+=sjobs_arr
......
289 293
        out_glidein_counts[glidename]=glidein_count
290 294
        pass
291 295

  
292
    (outvals,jrange) = uniqueSets(list_of_all_jobs)
296
    (outvals_cl,jrange_cl) = uniqueSets(list_of_all_jobs)
293 297
    del list_of_all_jobs
298

  
299
    # convert from clusters back to jobs
300
    outvals=[]
301
    for tuple in outvals_cl:
302
        jobs_arr=[]
303
        for ct in tuple[1]:
304
            cluster_arr=all_jobs_clusters[ct]
305
            jobs_arr+=cluster_arr
306
        outvals.append((tuple[0],set(jobs_arr)))        
307
    jobs_arr=[]
308
    for ct in jrange_cl:
309
        cluster_arr=all_jobs_clusters[ct]
310
        jobs_arr+=cluster_arr
311
    jrange=set(jobs_arr)
312

  
294 313
    count_unmatched=len(cq_jobs-jrange)
295 314

  
296 315
    #unique_to_site: keys are sites, elements are num of unique jobs