From: Frederic Suter Date: Tue, 22 May 2012 08:38:08 +0000 (+0200) Subject: the "amount" field leads to weird behaviors when dealing with parallel X-Git-Tag: v3_8~702 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2c452a3556b4a429539f3f26ff736a79d35f17ea?hp=196bcabf3c533a02f12b43f040f8fb5cb1e43235 the "amount" field leads to weird behaviors when dealing with parallel 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. --- diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 213270433b..0ec928dc03 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -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); diff --git a/src/simix/smx_host.c b/src/simix/smx_host.c index d3be3ca9d7..3fdd5fd68f 100644 --- a/src/simix/smx_host.c +++ b/src/simix/smx_host.c @@ -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); } diff --git a/src/surf/workstation.c b/src/surf/workstation.c index 1ff033d125..346c706b55 100644 --- a/src/surf/workstation.c +++ b/src/surf/workstation.c @@ -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; diff --git a/src/surf/workstation_ptask_L07.c b/src/surf/workstation_ptask_L07.c index b8fbf90f4d..6eb1de926b 100644 --- a/src/surf/workstation_ptask_L07.c +++ b/src/surf/workstation_ptask_L07.c @@ -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; }