A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactored smpi into multiple source files.
[simgrid.git]
/
src
/
simix
/
smx_action.c
diff --git
a/src/simix/smx_action.c
b/src/simix/smx_action.c
index
c56f305
..
681da73
100644
(file)
--- a/
src/simix/smx_action.c
+++ b/
src/simix/smx_action.c
@@
-25,7
+25,7
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_action, simix,
* \return A new SIMIX action
* */
smx_action_t SIMIX_action_communicate(smx_host_t sender,
* \return A new SIMIX action
* */
smx_action_t SIMIX_action_communicate(smx_host_t sender,
- smx_host_t receiver, char *name,
+ smx_host_t receiver, c
onst c
har *name,
double size, double rate)
{
/* check if the host is active */
double size, double rate)
{
/* check if the host is active */
@@
-261,12
+261,14
@@
double SIMIX_action_get_remains(smx_action_t action)
return action->simdata->surf_action->remains;
}
return action->simdata->surf_action->remains;
}
-smx_action_t SIMIX_action_parallel_execute(char *name, int
workstation
_nb,
-
void **workstation
_list,
+smx_action_t SIMIX_action_parallel_execute(char *name, int
host
_nb,
+
smx_host_t *host
_list,
double *computation_amount,
double *communication_amount,
double amount, double rate)
{
double *computation_amount,
double *communication_amount,
double amount, double rate)
{
+ void **workstation_list = NULL;
+ int i;
/* alloc structures */
smx_action_t act = xbt_new0(s_smx_action_t, 1);
/* alloc structures */
smx_action_t act = xbt_new0(s_smx_action_t, 1);
@@
-277,16
+279,21
@@
smx_action_t SIMIX_action_parallel_execute(char *name, int workstation_nb,
/* initialize them */
act->name = xbt_strdup(name);
/* initialize them */
act->name = xbt_strdup(name);
- /* set communication */
+ /* set action */
+
+ workstation_list = xbt_new0(void *,host_nb);
+ for (i = 0; i < host_nb; i++)
+ workstation_list[i] = host_list[i]->simdata->host;
+
simdata->surf_action =
surf_workstation_model->extension_public->
simdata->surf_action =
surf_workstation_model->extension_public->
- execute_parallel_task(
workstation
_nb, workstation_list,
+ execute_parallel_task(
host
_nb, workstation_list,
computation_amount, communication_amount,
amount, rate);
surf_workstation_model->common_public->action_set_data(simdata->
computation_amount, communication_amount,
amount, rate);
surf_workstation_model->common_public->action_set_data(simdata->
-
surf_action,
-
act);
+ surf_action,
+ act);
return act;
}
return act;
}