Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "killing time"
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 27 Sep 2016 20:17:18 +0000 (22:17 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 27 Sep 2016 20:17:23 +0000 (22:17 +0200)
Old gcc versions do not allow adding std::string fields to plain old
structures. We could fix the commit, but our time is sparse these days.

This reverts commit 23141ea49d9f51ecda69abe8cd02736b92254726.

src/simdag/sd_daxloader.cpp
src/simdag/sd_dotloader.cpp
src/simdag/sd_task.cpp
src/simdag/simdag_private.hpp

index aeb28a4..4a83abd 100644 (file)
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_daxparse, sd, "Parsing DAX files");
 
 extern "C" {
-#undef CLEANUP
-#include "dax_dtd.h"
-#define register /* g++ don't like register, so don't say it */
-#include "dax_dtd.c"
-#undef register
+  #undef CLEANUP
+  #include "dax_dtd.h"
+  #define register /* g++ don't like register, so don't say it */
+  #include "dax_dtd.c"
+  #undef register
+}
+
+/* Ensure that transfer tasks have unique names even though a file is used several times */
+
+void uniq_transfer_task_name(SD_task_t task)
+{
+  SD_task_t child = *(task->successors->begin());
+  SD_task_t parent = *(task->predecessors->begin());
+
+  char *new_name = bprintf("%s_%s_%s", SD_task_get_name(parent), SD_task_get_name(task), SD_task_get_name(child));
+
+  SD_task_set_name(task, new_name);
+
+  free(new_name);
 }
 
 static bool children_are_marked(SD_task_t task){
@@ -78,7 +92,7 @@ bool acyclic_graph_detail(xbt_dynar_t dag){
   //test if all tasks are marked
   xbt_dynar_foreach(dag,count,task){
     if(task->kind != SD_TASK_COMM_E2E && task->marked == 0){
-      XBT_WARN("the task %s is not marked",task->name.c_str());
+      XBT_WARN("the task %s is not marked",task->name);
       all_marked = false;
       break;
     }
@@ -117,7 +131,7 @@ bool acyclic_graph_detail(xbt_dynar_t dag){
     all_marked = true;
     xbt_dynar_foreach(dag,count,task){
       if(task->kind != SD_TASK_COMM_E2E && task->marked == 0){
-        XBT_WARN("the task %s is in a cycle",task->name.c_str());
+        XBT_WARN("the task %s is in a cycle",task->name);
         all_marked = false;
       }
     }
@@ -128,9 +142,11 @@ bool acyclic_graph_detail(xbt_dynar_t dag){
 static YY_BUFFER_STATE input_buffer;
 
 static xbt_dynar_t result;
-static xbt_dict_t files;
 static xbt_dict_t jobs;
+static xbt_dict_t files;
 static SD_task_t current_job;
+static SD_task_t root_task;
+static SD_task_t end_task;
 
 static void dax_task_free(void *task)
 {
@@ -155,12 +171,12 @@ xbt_dynar_t SD_daxload(const char *filename)
   result = xbt_dynar_new(sizeof(SD_task_t), dax_task_free);
   files = xbt_dict_new_homogeneous(&dax_task_free);
   jobs = xbt_dict_new_homogeneous(nullptr);
-  SD_task_t root_task = SD_task_create_comp_seq("root", nullptr, 0);
+  root_task = SD_task_create_comp_seq("root", nullptr, 0);
   /* by design the root task is always SCHEDULABLE */
   SD_task_set_state(root_task, SD_SCHEDULABLE);
 
   xbt_dynar_push(result, &root_task);
-  SD_task_t end_task = SD_task_create_comp_seq("end", nullptr, 0);
+  end_task = SD_task_create_comp_seq("end", nullptr, 0);
 
   int res = dax_lex();
   if (res != 0)
@@ -180,14 +196,14 @@ xbt_dynar_t SD_daxload(const char *filename)
     SD_task_t newfile;
     if (file->predecessors->empty()) {
       for (SD_task_t it : *file->successors) {
-        newfile = SD_task_create_comm_e2e(file->name.c_str(), nullptr, file->amount);
+        newfile = SD_task_create_comm_e2e(file->name, nullptr, file->amount);
         SD_task_dependency_add(nullptr, nullptr, root_task, newfile);
         SD_task_dependency_add(nullptr, nullptr, newfile, it);
         xbt_dynar_push(result, &newfile);
       }
     } else if (file->successors->empty()) {
       for (SD_task_t it : *file->predecessors){
-        newfile = SD_task_create_comm_e2e(file->name.c_str(), nullptr, file->amount);
+        newfile = SD_task_create_comm_e2e(file->name, nullptr, file->amount);
         SD_task_dependency_add(nullptr, nullptr, it, newfile);
         SD_task_dependency_add(nullptr, nullptr, newfile, end_task);
         xbt_dynar_push(result, &newfile);
@@ -197,10 +213,9 @@ xbt_dynar_t SD_daxload(const char *filename)
         for (SD_task_t it2 : *file->successors) {
           if (it == it2) {
             XBT_WARN ("File %s is produced and consumed by task %s."
-                      "This loop dependency will prevent the execution of the task.",
-                      file->name.c_str(), it->name.c_str());
+                      "This loop dependency will prevent the execution of the task.", file->name, it->name);
           }
-          newfile = SD_task_create_comm_e2e(file->name.c_str(), nullptr, file->amount);
+          newfile = SD_task_create_comm_e2e(file->name, nullptr, file->amount);
           SD_task_dependency_add(nullptr, nullptr, it, newfile);
           SD_task_dependency_add(nullptr, nullptr, newfile, it2);
           xbt_dynar_push(result, &newfile);
@@ -217,9 +232,7 @@ xbt_dynar_t SD_daxload(const char *filename)
   unsigned int cpt;
   xbt_dynar_foreach(result, cpt, file) {
     if (SD_task_get_kind(file) == SD_TASK_COMM_E2E) {
-      /* Ensure that transfer tasks have unique names even though a file is used several times */
-      file->name = std::string((*file->predecessors->begin())->name+ "_" + file->name + "_" +
-                               (*file->successors->begin())->name);
+      uniq_transfer_task_name(file);
     } else if (SD_task_get_kind(file) == SD_TASK_COMP_SEQ){
       /* If some tasks do not take files as input, connect them to the root
        * if they don't produce files, connect them to the end node.
@@ -248,7 +261,8 @@ xbt_dynar_t SD_daxload(const char *filename)
 
 void STag_dax__adag()
 {
-  double version = xbt_str_parse_double(A_dax__adag_version, "Parse error: %s is not a double");
+  XBT_ATTRIB_UNUSED double version;
+  version = xbt_str_parse_double(A_dax__adag_version, "Parse error: %s is not a double");
 
   xbt_assert(version == 2.1, "Expected version 2.1 in <adag> tag, got %f. Fix the parser or your file", version);
 }
@@ -256,11 +270,12 @@ void STag_dax__adag()
 void STag_dax__job()
 {
   double runtime = xbt_str_parse_double(A_dax__job_runtime, "Parse error: %s is not a double");
-  std::string name = std::string(A_dax__job_id) +"@"+ std::string(A_dax__job_name);
+  char *name = bprintf("%s@%s", A_dax__job_id, A_dax__job_name);
   runtime *= 4200000000.;       /* Assume that timings were done on a 4.2GFlops machine. I mean, why not? */
   XBT_DEBUG("See <job id=%s runtime=%s %.0f>",A_dax__job_id,A_dax__job_runtime,runtime);
-  current_job = SD_task_create_comp_seq(name.c_str(), nullptr, runtime);
+  current_job = SD_task_create_comp_seq(name, nullptr, runtime);
   xbt_dict_set(jobs, A_dax__job_id, current_job, nullptr);
+  free(name);
   xbt_dynar_push(result, &current_job);
 }
 
@@ -285,7 +300,7 @@ void STag_dax__uses()
   } else {
     SD_task_dependency_add(nullptr, nullptr, current_job, file);
     if ((file->predecessors->size() + file->inputs->size()) > 1) {
-      XBT_WARN("File %s created at more than one location...", file->name.c_str());
+      XBT_WARN("File %s created at more than one location...", file->name);
     }
   }
 }
@@ -307,9 +322,9 @@ void STag_dax__parent()
 {
   SD_task_t parent = static_cast<SD_task_t>(xbt_dict_get_or_null(jobs, A_dax__parent_ref));
   xbt_assert(parent != nullptr, "Parse error on line %d: Asked to add a dependency from %s to %s, but %s does not exist",
-             dax_lineno, current_child->name.c_str(), A_dax__parent_ref, A_dax__parent_ref);
+             dax_lineno, current_child->name, A_dax__parent_ref, A_dax__parent_ref);
   SD_task_dependency_add(nullptr, nullptr, parent, current_child);
-  XBT_DEBUG("Control-flow dependency from %s to %s", current_child->name.c_str(), parent->name.c_str());
+  XBT_DEBUG("Control-flow dependency from %s to %s", current_child->name, parent->name);
 }
 
 void ETag_dax__adag()
index ecc7927..a3359d4 100644 (file)
@@ -108,7 +108,7 @@ xbt_dynar_t SD_dotload_generic(const char * filename, seq_par_t seq_or_par, bool
 
         if((performer != -1 && order != -1) && performer < (int) sg_host_count()){
           /* required parameters are given and less performers than hosts are required */
-          XBT_DEBUG ("Task '%s' is scheduled on workstation '%d' in position '%d'", task->name.c_str(), performer, order);
+          XBT_DEBUG ("Task '%s' is scheduled on workstation '%d' in position '%d'", task->name, performer, order);
           computer = static_cast<xbt_dynar_t> (xbt_dict_get_or_null(computers, char_performer));
           if(computer == nullptr){
             computer = xbt_dynar_new(sizeof(SD_task_t), nullptr);
@@ -121,7 +121,7 @@ xbt_dynar_t SD_dotload_generic(const char * filename, seq_par_t seq_or_par, bool
               /* the user gave the same order to several tasks */
               schedule_success = false;
               XBT_VERB("Task '%s' wants to start on performer '%s' at the same position '%s' as task '%s'",
-                       (*task_test)->name.c_str(), char_performer, char_order, task->name.c_str());
+                       (*task_test)->name, char_performer, char_order, task->name);
               continue;
             }
           }
@@ -130,7 +130,7 @@ xbt_dynar_t SD_dotload_generic(const char * filename, seq_par_t seq_or_par, bool
         } else {
           /* one of required parameters is not given */
           schedule_success = false;
-          XBT_VERB("The schedule is ignored, task '%s' can not be scheduled on %d hosts", task->name.c_str(), performer);
+          XBT_VERB("The schedule is ignored, task '%s' can not be scheduled on %d hosts", task->name, performer);
         }
       }
     } else {
@@ -195,18 +195,18 @@ xbt_dynar_t SD_dotload_generic(const char * filename, seq_par_t seq_or_par, bool
   }
   xbt_dynar_free(&edges);
 
-  XBT_DEBUG("All tasks have been created, put %s at the end of the dynar", end->name.c_str());
+  XBT_DEBUG("All tasks have been created, put %s at the end of the dynar", end->name);
   xbt_dynar_push(result, &end);
 
   /* Connect entry tasks to 'root', and exit tasks to 'end'*/
   xbt_dynar_foreach (result, i, task){
     if (task->predecessors->empty() && task->inputs->empty() && task != root) {
-      XBT_DEBUG("Task '%s' has no source. Add dependency from 'root'", task->name.c_str());
+      XBT_DEBUG("Task '%s' has no source. Add dependency from 'root'", task->name);
       SD_task_dependency_add(nullptr, nullptr, root, task);
     }
 
     if (task->successors->empty() && task->outputs->empty() && task != end) {
-      XBT_DEBUG("Task '%s' has no destination. Add dependency to 'end'", task->name.c_str());
+      XBT_DEBUG("Task '%s' has no destination. Add dependency to 'end'", task->name);
       SD_task_dependency_add(nullptr, nullptr, task, end);
     }
   }
index 0669387..0006c32 100644 (file)
@@ -50,7 +50,7 @@ SD_task_t SD_task_create(const char *name, void *data, double amount)
   task->successors = new std::set<SD_task_t>();
 
   task->data = data;
-  task->name = std::string(name);
+  task->name = xbt_strdup(name);
   task->amount = amount;
   task->allocation = new std::vector<sg_host_t>();
   task->rate = -1;
@@ -178,6 +178,8 @@ void SD_task_destroy(SD_task_t task)
   if (task->state == SD_SCHEDULED || task->state == SD_RUNNABLE)
     __SD_task_destroy_scheduling_data(task);
 
+  xbt_free(task->name);
+
   if (task->surf_action != nullptr)
     task->surf_action->unref();
 
@@ -260,7 +262,7 @@ e_SD_task_state_t SD_task_get_state(SD_task_t task)
 void SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state)
 {
   std::set<SD_task_t>::iterator idx;
-  XBT_DEBUG("Set state of '%s' to %d", task->name.c_str(), new_state);
+  XBT_DEBUG("Set state of '%s' to %d", task->name, new_state);
   if ((new_state == SD_NOT_SCHEDULED || new_state == SD_SCHEDULABLE) && task->state == SD_FAILED){
     sd_global->completed_tasks->erase(task);
     sd_global->initial_tasks->insert(task);
@@ -300,7 +302,7 @@ void SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state)
   task->state = new_state;
 
   if (task->watch_points & new_state) {
-    XBT_VERB("Watch point reached with task '%s'!", task->name.c_str());
+    XBT_VERB("Watch point reached with task '%s'!", task->name);
     sd_global->watch_point_reached = true;
     SD_task_unwatch(task, new_state);   /* remove the watch point */
   }
@@ -314,13 +316,14 @@ void SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state)
  */
 const char *SD_task_get_name(SD_task_t task)
 {
-  return task->name.c_str();
+  return task->name;
 }
 
 /** @brief Allows to change the name of a task */
 void SD_task_set_name(SD_task_t task, const char *name)
 {
-  task->name = std::string(name);
+  xbt_free(task->name);
+  task->name = xbt_strdup(name);
 }
 
 /** @brief Returns the dynar of the parents of a task
@@ -478,18 +481,18 @@ void SD_task_dump(SD_task_t task)
   if ((task->inputs->size()+ task->predecessors->size()) > 0) {
     XBT_INFO("  - pre-dependencies:");
     for (auto it : *task->predecessors)
-      XBT_INFO("    %s", it->name.c_str());
+      XBT_INFO("    %s", it->name);
 
     for (auto it: *task->inputs)
-      XBT_INFO("    %s", it->name.c_str());
+      XBT_INFO("    %s", it->name);
   }
   if ((task->outputs->size() + task->successors->size()) > 0) {
     XBT_INFO("  - post-dependencies:");
 
     for (auto it : *task->successors)
-      XBT_INFO("    %s", it->name.c_str());
+      XBT_INFO("    %s", it->name);
     for (auto it : *task->outputs)
-      XBT_INFO("    %s", it->name.c_str());
+      XBT_INFO("    %s", it->name);
   }
 }
 
@@ -497,7 +500,7 @@ void SD_task_dump(SD_task_t task)
 void SD_task_dotty(SD_task_t task, void *out)
 {
   FILE *fout = static_cast<FILE*>(out);
-  fprintf(fout, "  T%p [label=\"%.20s\"", task, task->name.c_str());
+  fprintf(fout, "  T%p [label=\"%.20s\"", task, task->name);
   switch (task->kind) {
   case SD_TASK_COMM_E2E:
   case SD_TASK_COMM_PAR_MXN_1D_BLOCK:
@@ -536,17 +539,17 @@ void SD_task_dependency_add(const char *name, void *data, SD_task_t src, SD_task
 
   if (src->state == SD_DONE || src->state == SD_FAILED)
     THROWF(arg_error, 0, "Task '%s' must be SD_NOT_SCHEDULED, SD_SCHEDULABLE, SD_SCHEDULED, SD_RUNNABLE, or SD_RUNNING",
-           src->name.c_str());
+           src->name);
 
   if (dst->state == SD_DONE || dst->state == SD_FAILED || dst->state == SD_RUNNING)
     THROWF(arg_error, 0, "Task '%s' must be SD_NOT_SCHEDULED, SD_SCHEDULABLE, SD_SCHEDULED, or SD_RUNNABLE",
-           dst->name.c_str());
+           dst->name);
 
   if (dst->inputs->find(src) != dst->inputs->end() || src->outputs->find(dst) != src->outputs->end() ||
       src->successors->find(dst) != src->successors->end() || dst->predecessors->find(src) != dst->predecessors->end())
-    THROWF(arg_error, 0, "A dependency already exists between task '%s' and task '%s'", src->name.c_str(), dst->name.c_str());
+    THROWF(arg_error, 0, "A dependency already exists between task '%s' and task '%s'", src->name, dst->name);
 
-  XBT_DEBUG("SD_task_dependency_add: src = %s, dst = %s", src->name.c_str(), dst->name.c_str());
+  XBT_DEBUG("SD_task_dependency_add: src = %s, dst = %s", src->name, dst->name);
 
   if (src->kind == SD_TASK_COMM_E2E || src->kind == SD_TASK_COMM_PAR_MXN_1D_BLOCK){
     if (dst->kind == SD_TASK_COMP_SEQ || dst->kind == SD_TASK_COMP_PAR_AMDAHL)
@@ -564,7 +567,7 @@ void SD_task_dependency_add(const char *name, void *data, SD_task_t src, SD_task
 
   /* if the task was runnable, the task goes back to SD_SCHEDULED because of the new dependency*/
   if (dst->state == SD_RUNNABLE) {
-    XBT_DEBUG("SD_task_dependency_add: %s was runnable and becomes scheduled!", dst->name.c_str());
+    XBT_DEBUG("SD_task_dependency_add: %s was runnable and becomes scheduled!", dst->name);
     SD_task_set_state(dst, SD_SCHEDULED);
   }
 }
@@ -607,7 +610,7 @@ void SD_task_dependency_remove(SD_task_t src, SD_task_t dst)
 
   if (src->successors->find(dst) == src->successors->end() && src->outputs->find(dst) == src->outputs->end())
     THROWF(arg_error, 0, "No dependency found between task '%s' and '%s': task '%s' is not a successor of task '%s'",
-           src->name.c_str(), dst->name.c_str(), dst->name.c_str(), src->name.c_str());
+           src->name, dst->name, dst->name, src->name);
 
   if (src->kind == SD_TASK_COMM_E2E || src->kind == SD_TASK_COMM_PAR_MXN_1D_BLOCK){
     if (dst->kind == SD_TASK_COMP_SEQ || dst->kind == SD_TASK_COMP_PAR_AMDAHL)
@@ -764,7 +767,7 @@ void SD_task_schedule(SD_task_t task, int host_count, const sg_host_t * host_lis
 void SD_task_unschedule(SD_task_t task)
 {
   if (task->state == SD_NOT_SCHEDULED || task->state == SD_SCHEDULABLE)
-    THROWF(arg_error, 0, "Task %s: the state must be SD_SCHEDULED, SD_RUNNABLE, SD_RUNNING or SD_FAILED", task->name.c_str());
+    THROWF(arg_error, 0, "Task %s: the state must be SD_SCHEDULED, SD_RUNNABLE, SD_RUNNING or SD_FAILED", task->name);
 
   if ((task->state == SD_SCHEDULED || task->state == SD_RUNNABLE) /* if the task is scheduled or runnable */
       && ((task->kind == SD_TASK_COMP_PAR_AMDAHL) || (task->kind == SD_TASK_COMM_PAR_MXN_1D_BLOCK))) {
@@ -788,10 +791,10 @@ void SD_task_unschedule(SD_task_t task)
 /* Runs a task. */
 void SD_task_run(SD_task_t task)
 {
-  xbt_assert(task->state == SD_RUNNABLE, "Task '%s' is not runnable! Task state: %d", task->name.c_str(), (int) task->state);
-  xbt_assert(task->allocation != nullptr, "Task '%s': host_list is nullptr!", task->name.c_str());
+  xbt_assert(task->state == SD_RUNNABLE, "Task '%s' is not runnable! Task state: %d", task->name, (int) task->state);
+  xbt_assert(task->allocation != nullptr, "Task '%s': host_list is nullptr!", task->name);
 
-  XBT_VERB("Executing task '%s'", task->name.c_str());
+  XBT_VERB("Executing task '%s'", task->name);
 
   /* Copy the elements of the task into the action */
   int host_nb = task->allocation->size();
@@ -858,7 +861,7 @@ double SD_task_get_finish_time(SD_task_t task)
 void SD_task_distribute_comp_amdahl(SD_task_t task, int count)
 {
   xbt_assert(task->kind == SD_TASK_COMP_PAR_AMDAHL, "Task %s is not a SD_TASK_COMP_PAR_AMDAHL typed task."
-              "Cannot use this function.", task->name.c_str());
+              "Cannot use this function.", task->name);
   task->flops_amount = xbt_new0(double, count);
   task->bytes_amount = xbt_new0(double, count * count);
 
@@ -869,7 +872,7 @@ void SD_task_distribute_comp_amdahl(SD_task_t task, int count)
 
 void SD_task_build_MxN_1D_block_matrix(SD_task_t task, int src_nb, int dst_nb){
   xbt_assert(task->kind == SD_TASK_COMM_PAR_MXN_1D_BLOCK, "Task %s is not a SD_TASK_COMM_PAR_MXN_1D_BLOCK typed task."
-              "Cannot use this function.", task->name.c_str());
+              "Cannot use this function.", task->name);
   xbt_free(task->bytes_amount);
   task->bytes_amount = xbt_new0(double,task->allocation->size() * task->allocation->size());
 
@@ -905,7 +908,7 @@ void SD_task_schedulev(SD_task_t task, int count, const sg_host_t * list)
   for(int i =0; i<count; i++)
     task->allocation->push_back(list[i]);
 
-  XBT_VERB("Schedule computation task %s on %zu host(s)", task->name.c_str(), task->allocation->size());
+  XBT_VERB("Schedule computation task %s on %zu host(s)", task->name, task->allocation->size());
 
   if (task->kind == SD_TASK_COMP_SEQ) {
     if (!task->flops_amount){ /*This task has failed and is rescheduled. Reset the flops_amount*/
@@ -927,7 +930,7 @@ void SD_task_schedulev(SD_task_t task, int count, const sg_host_t * list)
     int src_nb = input->allocation->size();
     int dst_nb = count;
     if (input->allocation->empty())
-      XBT_VERB("Sender side of '%s' not scheduled. Set receiver side to '%s''s allocation", input->name.c_str(), task->name.c_str());
+      XBT_VERB("Sender side of '%s' not scheduled. Set receiver side to '%s''s allocation", input->name, task->name);
 
     for (int i=0; i<count;i++)
       input->allocation->push_back(task->allocation->at(i));
@@ -938,7 +941,7 @@ void SD_task_schedulev(SD_task_t task, int count, const sg_host_t * list)
 
       SD_task_do_schedule(input);
       XBT_VERB ("Auto-Schedule Communication task '%s'. Send %.f bytes from %d hosts to %d hosts.",
-          input->name.c_str(),input->amount, src_nb, dst_nb);
+          input->name,input->amount, src_nb, dst_nb);
     }
   }
 
@@ -946,7 +949,7 @@ void SD_task_schedulev(SD_task_t task, int count, const sg_host_t * list)
     int src_nb = count;
     int dst_nb = output->allocation->size();
     if (output->allocation->empty())
-      XBT_VERB("Receiver side of '%s' not scheduled. Set sender side to '%s''s allocation", output->name.c_str(), task->name.c_str());
+      XBT_VERB("Receiver side of '%s' not scheduled. Set sender side to '%s''s allocation", output->name, task->name);
 
     for (int i=0; i<count;i++)
       output->allocation->insert(output->allocation->begin()+i, task->allocation->at(i));
@@ -957,7 +960,7 @@ void SD_task_schedulev(SD_task_t task, int count, const sg_host_t * list)
 
       SD_task_do_schedule(output);
       XBT_VERB ("Auto-Schedule Communication task %s. Send %.f bytes from %d hosts to %d hosts.",
-                output->name.c_str(), output->amount, src_nb, dst_nb);
+                output->name, output->amount, src_nb, dst_nb);
     }
   }
 }
index 0795a55..9cd87ba 100644 (file)
@@ -40,7 +40,7 @@ extern XBT_PRIVATE simgrid::sd::Global *sd_global;
 typedef struct SD_task {
   e_SD_task_state_t state;
   void *data;                   /* user data */
-  std::string name;
+  char *name;
   e_SD_task_kind_t kind;
   double amount;
   double alpha;          /* used by typed parallel tasks */
@@ -68,6 +68,7 @@ typedef struct SD_task {
 XBT_PRIVATE void SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state);
 XBT_PRIVATE void SD_task_run(SD_task_t task);
 XBT_PRIVATE bool acyclic_graph_detail(xbt_dynar_t dag);
+XBT_PRIVATE void uniq_transfer_task_name(SD_task_t task);
 XBT_PRIVATE const char *__get_state_name(e_SD_task_state_t state);
 SG_END_DECL()
 #endif