@@ -160,7 +160,7 @@ def filter_nodes_by_state(nodelist, state):
160160 :arg state: The state of the nodes.
161161 If ``all``, the initial list is returned untouched.
162162 If ``avail``, only the available nodes will be returned.
163- All other values are interpretes as a state string.
163+ All other values are interpreted as a state string.
164164 State match is exclusive unless the ``*`` is added at the end of the
165165 state string.
166166 :returns: the filtered node list
@@ -169,7 +169,7 @@ def filter_nodes_by_state(nodelist, state):
169169 nodelist = {n for n in nodelist if n .is_avail ()}
170170 elif state != 'all' :
171171 if state .endswith ('*' ):
172- # non-exclusive stat match
172+ # non-exclusive state match
173173 state = state [:- 1 ]
174174 nodelist = {
175175 n for n in nodelist if n .in_state (state )
@@ -180,8 +180,6 @@ def filter_nodes_by_state(nodelist, state):
180180 }
181181
182182 return nodelist
183- nodes [part .fullname ] = [n .name for n in nodelist ]
184-
185183
186184
187185class Job (jsonext .JSONSerializable , metaclass = JobMeta ):
@@ -603,7 +601,13 @@ def guess_num_tasks(self):
603601 available_nodes = filter_nodes_by_state (
604602 available_nodes , self .sched_flex_alloc_nodes .lower ()
605603 )
604+ getlogger ().debug (
605+ f'[F] Total available in state={ self .sched_flex_alloc_nodes .lower ()} : { len (available_nodes )} '
606+ )
606607 available_nodes = self .scheduler .filternodes (self , available_nodes )
608+ getlogger ().debug (
609+ f'[F] Total available after scheduler filter: { len (available_nodes )} '
610+ )
607611 return len (available_nodes ) * num_tasks_per_node
608612
609613 def submit (self ):
0 commit comments