Closed LourensVeen closed 2 years ago
Yes, you are right - this is a bug - but curiously does not affect the algorithm. The total_cores
is used only to check wheter requirements are less than available resources, and because min_nodes
equals 0 - total_cores
(requested number of cores) also equals 0. And yes, it's legal to define only number of cores - in that case the requested cores will be allocated on any number of nodes.
The #151 should fix the bug.
Makes sense to me, thanks!
Merged, closing!
I'm looking at the
allocate_job(self, reqs)
method of theSchedulerAlgorithm
class incomponents/core/qcg/pilotjob/scheduleralgo.py
.It starts by checking the requested resources: if nodes have been specified then it checks that either an exact number or a range has been given, and sets
min_nodes
to the number we're going to try for. If no node specification has been given, thenmin_nodes
is set to (remains, rather) zero.Next, it does the same for the number of requested cores, setting
min_cores
. However, it then computes (line 208)total_cores = min_nodes * min_cores
, which seems like it would settotal_cores
to 0 if no nodes have been given, and then always fail on the subsequent resource check.The example at https://qcg-pilotjob.readthedocs.io/en/develop/slurm_performance.html#user-parallel-applications suggests that it's legal to only specify cores, and that makes sense. Is this a bug or am I missing something?