X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1bd1bbd35034c2e93a030a676dc244ad2cf74c70..95b7245335871cb2987b39b320e8a7b40c341e2c:/teshsuite/msg/task_progress/task_progress.cpp diff --git a/teshsuite/msg/task_progress/task_progress.cpp b/teshsuite/msg/task_progress/task_progress.cpp index 7c3ad78048..611f60e80f 100644 --- a/teshsuite/msg/task_progress/task_progress.cpp +++ b/teshsuite/msg/task_progress/task_progress.cpp @@ -15,7 +15,7 @@ static int seq_task(int /*argc*/, char* /*argv*/ []) { double task_comp_size = 5E7; double task_comm_size = 1E6; - double progress = 0; + double progress; msg_task_t task = MSG_task_create("simple", task_comp_size, task_comm_size, NULL); tasks.push_back(task); @@ -31,6 +31,7 @@ static int seq_task(int /*argc*/, char* /*argv*/ []) progress = MSG_task_get_remaining_work_ratio(task); xbt_assert(progress == 0, "Progress should be equal to 1 not %f", progress); + MSG_task_destroy(task); XBT_INFO("Goodbye now!"); return 0; } @@ -39,7 +40,7 @@ static int par_task(int /*argc*/, char* /*argv*/ []) { double * computation_amount = new double[2] {10E7, 10E7}; double * communication_amount = new double[4] {1E6, 1E6, 1E6, 1E6}; - double progress = 0; + double progress; std::vector hosts_to_use = std::vector(); hosts_to_use.push_back(MSG_get_host_by_name("Tremblay")); @@ -59,6 +60,10 @@ static int par_task(int /*argc*/, char* /*argv*/ []) progress = MSG_task_get_remaining_work_ratio(task); xbt_assert(progress == 0, "Progress should be equal to 1 not %f", progress); + MSG_task_destroy(task); + delete[] computation_amount; + delete[] communication_amount; + XBT_INFO("Goodbye now!"); return 0; }