-/* Copyright (c) 2009-2016. The SimGrid Team.
+/* Copyright (c) 2009-2019. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* 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 <string.h>
#include "simgrid/simdag.h"
+#include <math.h>
+#include <string.h>
#if SIMGRID_HAVE_JEDULE
#include "simgrid/jedule/jedule_sd_binding.h"
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);
if (last_scheduled_task && (SD_task_get_state(last_scheduled_task) != SD_DONE) &&
(SD_task_get_state(last_scheduled_task) != SD_FAILED) &&
!SD_task_dependency_exists(sg_host_get_last_scheduled_task(selected_host), selected_task))
- SD_task_dependency_add("resource", NULL, last_scheduled_task, selected_task);
+ SD_task_dependency_add(last_scheduled_task, selected_task);
sg_host_set_last_scheduled_task(selected_host, selected_task);
sg_host_set_available_at(selected_host, min_finish_time);