Changeset 3586

Show
Ignore:
Timestamp:
10/30/2009 08:34:12 AM (3 weeks ago)
Author:
brian
Message:

Fix for VOView providers in release branch; set free_slots=0 if waiting jobs.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gip/branches/1_1_x_release/gip/lib/python/gip/providers/condor.py

    r3381 r3586  
    314314            free = min(unclaimed, assigned-myrunning, 
    315315                assigned-int(info['running'])) 
     316            free = int(free) 
     317 
     318            waiting = int(info["idle"]) + int(info["held"]) 
     319            if waiting > 0: 
     320                free = 0 
    316321 
    317322            info = {"vo"      : vo, 
     
    325330                # Held jobs are included as "waiting" since the definition is: 
    326331                #    Number of jobs that are in a state different than running 
    327                 "waiting"     : info["idle"] + info["held"]
     332                "waiting"     : waiting
    328333                "total"       : info["running"] + info["idle"] + info["held"], 
    329                 "free_slots"  : int(free)
     334                "free_slots"  : free
    330335                "job_slots"   : int(total_nodes), 
    331336                "ert"         : ert, 
  • gip/branches/1_1_x_release/gip/lib/python/gip/providers/lsf.py

    r3381 r3586  
    146146            max_job_time=my_queue_info.get("max_wall", 0)) 
    147147 
     148        free_slots = my_queue_info.get('free_slots', 0) 
     149        waiting = info2.get('waiting', 0) 
     150        if waiting > 0: 
     151            free_slots = 0 
     152 
    148153        info = { 
    149154            'ceUniqueID'  : ce_unique_id, 
    150155            'job_slots'   : my_queue_info.get('job_slots', 0), 
    151             'free_slots'  : my_queue_info.get('free_slots', 0)
     156            'free_slots'  : free_slots
    152157            'ce_name'     : ce_name, 
    153158            'queue'       : queue, 
     
    158163            'max_running' : info2.get('max_running', 0), 
    159164            'priority'    : queue_info.get(queue, {}).get('priority', 0), 
    160             'waiting'     : info2.get('waiting', 0)
     165            'waiting'     : waiting
    161166            'data'        : cp.get("osg_dirs", "data"), 
    162167            'app'         : cp.get("osg_dirs", "app"), 
  • gip/branches/1_1_x_release/gip/lib/python/gip/providers/pbs.py

    r3390 r3586  
    130130            max_job_time=my_queue_info.get("max_wall", 0)) 
    131131 
     132        free_slots = my_queue_info.get('free_slots', 0) 
     133        waiting = info2.get('wait', 0) 
     134        if waiting > 0: 
     135            free_slots = 0 
     136 
    132137        info = { 
    133138            'ceUniqueID'  : ce_unique_id, 
    134139            'job_slots'   : my_queue_info.get('job_slots', 0), 
    135             'free_slots'  : my_queue_info.get('free_slots', 0)
     140            'free_slots'  : free_slots
    136141            'ce_name'     : ce_name, 
    137142            'queue'       : queue, 
     
    142147            'max_running' : info2.get('max_running', 0), 
    143148            'priority'    : queue_info.get(queue, {}).get('priority', 0), 
    144             'waiting'     : info2.get('wait', 0)
     149            'waiting'     : waiting
    145150            'data'        : cp_get(cp, "osg_dirs", "data", "UNKNOWN_DATA"), 
    146151            'app'         : cp_get(cp, "osg_dirs", "app", "UNKNOWN_APP"),