From a0eff6fc15972af442ee9e4ef152451bba60f9f9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 19 Jun 2015 17:45:26 +0200 Subject: [PATCH] Fix machine selection --- src/hydra-queue-runner/hydra-queue-runner.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index 71b77f54..2bacf735 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -887,9 +887,9 @@ void State::dispatcher() float ta = roundf(a->currentJobs / a->speedFactor); float tb = roundf(b->currentJobs / b->speedFactor); return - ta != tb ? ta > tb : + ta != tb ? ta < tb : a->speedFactor != b->speedFactor ? a->speedFactor > b->speedFactor : - a->maxJobs > b->maxJobs; + a->currentJobs > b->currentJobs; }); /* Find a machine with a free slot and find a step to run