source: issm/trunk/src/py3/consistency/QueueRequirements.py@ 20500

Last change on this file since 20500 was 20500, checked in by Mathieu Morlighem, 9 years ago

merged trunk-jpl and trunk for revision 20497

File size: 747 bytes
Line 
1def QueueRequirements(queudict,queue,np,time):
2 #QUEUEREQUIREMENTS - queue requirements in time, number of cpus, by name of queue.
3 #
4 # Usage:
5 # QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,np,time)
6
7 #Ok, go through requirements for current queue:
8 try:
9 rtime=queudict[queue][0]
10 except KeyError:
11 raise Exception('QueueRequirements error message: availables queues are '+ queuedict.keys)
12
13 if time<=0:
14 raise Exception('QueueRequirements: time should be a positive number')
15 if time>rtime:
16 raise Exception('QueueRequirements: time should be < '+ str(rtime)+ ' for queue: '+ queue)
17
18 #check on np requirements
19 if np<=0:
20 raise Exception('QueueRequirements: np should be a positive number')
Note: See TracBrowser for help on using the repository browser.