Changeset 3585

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

Enforce free slots constraint in the providers for VOView.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gip/trunk/gip/lib/python/gip/providers/condor.py

    r3543 r3585  
    372372            free = min(unclaimed, assigned-myrunning, 
    373373                assigned-int(info['running'])) 
     374            free = int(free) 
     375 
     376            waiting = int(info["idle"]) + int(info["held"]) 
     377            if waiting > 0: 
     378                free_slots = 0 
    374379 
    375380            info = {"vo"      : vo, 
     
    383388                # Held jobs are included as "waiting" since the definition is: 
    384389                #    Number of jobs that are in a state different than running 
    385                 "waiting"     : info["idle"] + info["held"]
     390                "waiting"     : waiting
    386391                "total"       : info["running"] + info["idle"] + info["held"], 
    387                 "free_slots"  : int(free)
     392                "free_slots"  : free
    388393                "job_slots"   : int(total_nodes), 
    389394                "ert"         : ert, 
  • gip/trunk/gip/lib/python/gip/providers/generic_batch_system.py

    r3581 r3585  
    157157        max_running = min(max_running, my_queue_info.get('max_running', 99999)) 
    158158 
     159        waiting = info2.get("wait", 0) 
     160        free_slots = my_queue_info.get('free_slots', 0) 
     161        if waiting > 0: 
     162            free_slots = 0 
     163 
    159164        info = { 
    160165            'ceUniqueID'  : ce_unique_id, 
    161166            'job_slots'   : my_queue_info.get('job_slots', 0), 
    162             'free_slots'  : my_queue_info.get('free_slots', 0)
     167            'free_slots'  : free_slots
    163168            'ce_name'     : ce_name, 
    164169            'queue'       : queue, 
     
    169174            'max_running' : max_running, 
    170175            'priority'    : queue_info.get(queue, {}).get('priority', 0), 
    171             'waiting'     : info2.get('wait', 0)
     176            'waiting'     : waiting
    172177            'data'        : cp_get(cp, "osg_dirs", "data", "UNKNOWN_DATA"), 
    173178            'app'         : cp_get(cp, "osg_dirs", "app", "UNKNOWN_APP"), 
  • gip/trunk/gip/lib/python/gip/providers/lsf.py

    r3543 r3585  
    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(cp, 'osg_dirs', 'data', "/UNKNOWN_DATA"), 
    162167            'app'         : cp_get(cp, 'osg_dirs', 'app', "/UNKNOWN_APP"), 
  • gip/trunk/gip/lib/python/gip/providers/pbs.py

    r3389 r3585  
    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"),