Changeset 451 for trunk/jobmond/jobmond.py
- Timestamp:
- 02/05/08 15:07:08 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jobmond/jobmond.py
r450 r451 732 732 elif status == 'Q': 733 733 734 # 'mynodequest' can be a string in the following syntax according to the 735 # Torque Administator's manual: 736 # 737 # {<node_count> | <hostname>}[:ppn=<ppn>][:<property>[:<property>]...][+ ...] 738 # {<node_count> | <hostname>}[:ppn=<ppn>][:<property>[:<property>]...][+ ...] 739 # etc 740 # 741 742 # 743 # For now we only count the amount of nodes request and ignore properties 744 # 745 734 746 start_timestamp = '' 735 747 count_mynodes = 0 736 numeric_node = 1737 748 738 749 for node in mynoderequest.split( '+' ): 739 750 751 # Just grab the {node_count|hostname} part and ignore properties 752 # 740 753 nodepart = node.split( ':' )[0] 741 754 755 # Let's assume a node_count value 756 # 757 numeric_node = 1 758 759 # Chop the value up into characters 760 # 742 761 for letter in nodepart: 743 762 763 # If this char is not a digit (0-9), this must be a hostname 764 # 744 765 if letter not in string.digits: 745 766 746 767 numeric_node = 0 747 768 769 # If this is a hostname, just count this as one (1) node 770 # 748 771 if not numeric_node: 749 772 750 773 count_mynodes = count_mynodes + 1 751 774 else: 775 776 # If this a number, it must be the node_count 777 # and increase our count with it's value 778 # 752 779 try: 753 780 count_mynodes = count_mynodes + int( nodepart ) … … 755 782 except ValueError, detail: 756 783 784 # When we arrive here I must be bugged or very confused 785 # THIS SHOULD NOT HAPPEN! 786 # 757 787 debug_msg( 10, str( detail ) ) 758 788 debug_msg( 10, "Encountered weird node in Resources_List?!" )
Note: See TracChangeset
for help on using the changeset viewer.