From 12f4d48896952768d3df0d5704c4e8414027af2a Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 17 Apr 2018 21:20:37 +0200 Subject: [PATCH 1/1] Use standard function fmax() for doubles. --- examples/simdag/scheduling/sd_scheduling.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/simdag/scheduling/sd_scheduling.c b/examples/simdag/scheduling/sd_scheduling.c index 92c3e925a5..b1b06aa7cf 100644 --- a/examples/simdag/scheduling/sd_scheduling.c +++ b/examples/simdag/scheduling/sd_scheduling.c @@ -5,8 +5,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ /* simple test to schedule a DAX file with the Min-Min algorithm. */ -#include #include "simgrid/simdag.h" +#include +#include #if SIMGRID_HAVE_JEDULE #include "simgrid/jedule/jedule_sd_binding.h" @@ -101,7 +102,7 @@ static double finish_on_at(SD_task_t task, sg_host_t host) xbt_dynar_free_container(&parents); - result = MAX(sg_host_get_available_at(host), last_data_available) + SD_task_get_amount(task)/sg_host_speed(host); + result = fmax(sg_host_get_available_at(host), last_data_available) + SD_task_get_amount(task) / sg_host_speed(host); } else { xbt_dynar_free_container(&parents); -- 2.20.1