Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the "amount" field leads to weird behaviors when dealing with parallel
authorFrederic Suter <suter@youpi.(none)>
Tue, 22 May 2012 08:38:08 +0000 (10:38 +0200)
committerFrederic Suter <suter@youpi.(none)>
Tue, 22 May 2012 08:38:08 +0000 (10:38 +0200)
tasks. At SURF level, only computation_amount and communication_amount
should be used. Get rid off amount in *execute_parallel_task functions.
Use 1 when creating the surf action.

src/include/surf/surf.h
src/simix/smx_host.c
src/surf/workstation.c
src/surf/workstation_ptask_L07.c

index 2132704..0ec928d 100644 (file)
@@ -248,7 +248,7 @@ typedef struct surf_workstation_model_extension_public {
                                           void **workstation_list,
                                           double *computation_amount,
                                           double *communication_amount,
-                                          double amount, double rate);
+                                          double rate);
   double (*get_link_bandwidth) (const void *link);                                         /**< Return the current bandwidth of a network link */
   double (*get_link_latency) (const void *link);                                           /**< Return the current latency of a network link */
   surf_action_t(*open) (void *workstation, const char* storage, const char* path, const char* mode);
index d3be3ca..3fdd5fd 100644 (file)
@@ -243,7 +243,7 @@ smx_action_t SIMIX_host_parallel_execute( const char *name,
     action->execution.surf_exec =
       surf_workstation_model->extension.workstation.
       execute_parallel_task(host_nb, workstation_list, computation_amount,
-                           communication_amount, amount, rate);
+                           communication_amount, rate);
 
     surf_workstation_model->action_data_set(action->execution.surf_exec, action);
   }
index 1ff033d..346c706 100644 (file)
@@ -239,7 +239,7 @@ static surf_action_t ws_execute_parallel_task(int workstation_nb,
                                               void **workstation_list,
                                               double *computation_amount,
                                               double *communication_amount,
-                                              double amount, double rate)
+                                              double rate)
 {
   THROW_UNIMPLEMENTED;          /* This model does not implement parallel tasks */
   return NULL;
index b8fbf90..6eb1de9 100644 (file)
@@ -447,7 +447,6 @@ static surf_action_t ptask_execute_parallel_task(int workstation_nb,
                                                  double
                                                  *computation_amount, double
                                                  *communication_amount,
-                                                 double amount,
                                                  double rate)
 {
   surf_action_workstation_L07_t action = NULL;
@@ -493,7 +492,7 @@ static surf_action_t ptask_execute_parallel_task(int workstation_nb,
       nb_host++;
 
   action =
-      surf_action_new(sizeof(s_surf_action_workstation_L07_t), amount,
+      surf_action_new(sizeof(s_surf_action_workstation_L07_t), 1,
                       surf_workstation_model, 0);
   XBT_DEBUG("Creating a parallel task (%p) with %d cpus and %d links.",
          action, workstation_nb, nb_link);
@@ -559,7 +558,7 @@ static surf_action_t ptask_execute(void *cpu, double size)
 
   return ptask_execute_parallel_task(1, workstation_list,
                                      computation_amount,
-                                     communication_amount, 1, -1);
+                                     communication_amount, -1);
 }
 
 static surf_action_t ptask_communicate(void *src, void *dst, double size,
@@ -576,7 +575,7 @@ static surf_action_t ptask_communicate(void *src, void *dst, double size,
 
   res = ptask_execute_parallel_task(2, workstation_list,
                                     computation_amount,
-                                    communication_amount, 1, rate);
+                                    communication_amount, rate);
 
   return res;
 }