From 04115d7bd7e41dedd87ac1bc1b757e4961702905 Mon Sep 17 00:00:00 2001 From: Benjamin Tovar Date: Mon, 25 Nov 2024 16:26:44 -0500 Subject: [PATCH] format --- taskvine/src/manager/vine_manager.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/taskvine/src/manager/vine_manager.c b/taskvine/src/manager/vine_manager.c index 58262011c4..5615316720 100644 --- a/taskvine/src/manager/vine_manager.c +++ b/taskvine/src/manager/vine_manager.c @@ -5248,20 +5248,20 @@ int vine_hungry(struct vine_manager *q) int64_t tasks_needed = 0; if (qstats.tasks_waiting < 1) { - tasks_needed = DIV_INT_ROUND_UP(workers_total_avail_cores, avg_commited_tasks_cores); - if (avg_commited_tasks_memory > 0) { - tasks_needed = MIN(tasks_needed, DIV_INT_ROUND_UP(workers_total_avail_memory, avg_commited_tasks_memory)); - } + tasks_needed = DIV_INT_ROUND_UP(workers_total_avail_cores, avg_commited_tasks_cores); + if (avg_commited_tasks_memory > 0) { + tasks_needed = MIN(tasks_needed, DIV_INT_ROUND_UP(workers_total_avail_memory, avg_commited_tasks_memory)); + } - if (avg_commited_tasks_disk > 0) { - tasks_needed = MIN(tasks_needed, DIV_INT_ROUND_UP(workers_total_avail_disk, avg_commited_tasks_disk)); - } + if (avg_commited_tasks_disk > 0) { + tasks_needed = MIN(tasks_needed, DIV_INT_ROUND_UP(workers_total_avail_disk, avg_commited_tasks_disk)); + } - if (avg_commited_tasks_gpus > 0) { - tasks_needed = MIN(tasks_needed, DIV_INT_ROUND_UP(workers_total_avail_gpus, avg_commited_tasks_gpus)); - } + if (avg_commited_tasks_gpus > 0) { + tasks_needed = MIN(tasks_needed, DIV_INT_ROUND_UP(workers_total_avail_gpus, avg_commited_tasks_gpus)); + } - return MAX(tasks_needed, q->hungry_minimum); + return MAX(tasks_needed, q->hungry_minimum); } // from here on we can assume that qstats.tasks_waiting > 0.