Changeset 3581
- Timestamp:
- 10/26/2009 08:22:42 PM (1 month ago)
- Files:
-
- gip/trunk/gip/lib/python/gip/batch_systems/pbs.py (modified) (1 diff)
- gip/trunk/gip/lib/python/gip/batch_systems/sge.py (modified) (2 diffs)
- gip/trunk/gip/lib/python/gip/providers/generic_batch_system.py (modified) (1 diff)
- gip/trunk/test/pbs_test.py (modified) (2 diffs)
- gip/trunk/test/test_cluster.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gip/trunk/gip/lib/python/gip/batch_systems/pbs.py
r3579 r3581 10 10 11 11 from gip_common import HMSToMin, getLogger, VoMapper, voList, parseRvf, \ 12 addToPath 12 addToPath, cp_get 13 13 from gip_testing import runCommand 14 14 from gip.batch_systems.batch_system import BatchSystem gip/trunk/gip/lib/python/gip/batch_systems/sge.py
r3579 r3581 9 9 import gip_sets as sets 10 10 11 from gip_common import getLogger, VoMapper, voList, parseRvf 11 from gip_common import getLogger, VoMapper, voList, parseRvf, cp_get 12 12 from xml_common import parseXmlSax 13 13 from gip.batch_systems.sge_sax_handler import QueueInfoParser, JobInfoParser, \ … … 435 435 $SGE_ROOT/$SGE_CELL/common/settings.sh 436 436 """ 437 sge_root = cp_get( cp, "sge", "sge_root", "")437 sge_root = cp_get(self.cp, "sge", "sge_root", "") 438 438 if not sge_root: 439 439 log.warning("Could not locate sge_root in config file! Not " \ 440 440 "bootstrapping SGE environment.") 441 441 return 442 sge_cell = cp_get( cp, "sge", "sge_cell", "")442 sge_cell = cp_get(self.cp, "sge", "sge_cell", "") 443 443 if not sge_cell: 444 444 log.warning("Could not locate sge_cell in config file! Not " \ gip/trunk/gip/lib/python/gip/providers/generic_batch_system.py
r3580 r3581 85 85 info['free_slots'] = min(info['free_slots'], info['max_queuable']) 86 86 else: 87 info['max_total'] = info['max_waiting'] + info['max_running'] 87 if info['max_waiting'] == 999999 or info['max_running'] == 999999: 88 info['max_total'] = 999999 89 else: 90 info['max_total'] = info['max_waiting'] + info['max_running'] 88 91 # free_slots <= max_total 89 92 info['free_slots'] = min(info['free_slots'], info['max_total']) gip/trunk/test/pbs_test.py
r3543 r3581 172 172 '-pbs-dzero': 173 173 self.failUnless(entry.glue['CEPolicyMaxRunningJobs'] == '158') 174 self.failUnless(entry.glue['CEPolicyMaxTotalJobs'] == '158') 174 # I don't think MaxTotalJobs should be limited; this is the 175 # total number in the system; this isn't necessarily equal to 176 # max running. 177 #self.failUnless(entry.glue['CEPolicyMaxTotalJobs'] == '158') 175 178 self.failUnless(entry.glue['CEStateFreeJobSlots'] == '158') 179 self.failUnless(entry.glue['CEPolicyAssignedJobSlots'] == \ 180 '158') 181 self.failUnless(entry.glue['CEInfoTotalCPUs'] == '158') 176 182 has_dzero_ce = True 177 183 self.failUnless(has_dzero_ce, msg="dzero queue's CE was not found!") … … 217 223 '-pbs-lcgadmin': 218 224 self.failUnless(entry.glue['CEPolicyMaxWaitingJobs'] == '183') 219 self.failUnless(entry.glue['CEStateFreeCPUs'] == ' 183')220 self.failUnless(entry.glue['CEStateFreeJobSlots'] == ' 183')225 self.failUnless(entry.glue['CEStateFreeCPUs'] == '4') 226 self.failUnless(entry.glue['CEStateFreeJobSlots'] == '4') 221 227 has_lcgadmin_ce = True 222 228 self.failUnless(has_lcgadmin_ce, msg="lcgadmin queue's CE was not found!") gip/trunk/test/test_cluster.py
r3542 r3581 10 10 from gip_common import config 11 11 from gip_ldap import read_ldap 12 from batch_systems.pbs import PbsBatchSystem12 from gip.batch_systems.pbs import PbsBatchSystem 13 13 14 14 class TestCluster(unittest.TestCase):
