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
Bugfix.
[simgrid.git]
/
examples
/
msg
/
parallel_task
/
parallel_task.c
diff --git
a/examples/msg/parallel_task/parallel_task.c
b/examples/msg/parallel_task/parallel_task.c
index
c16de72
..
7dd8748
100644
(file)
--- a/
examples/msg/parallel_task/parallel_task.c
+++ b/
examples/msg/parallel_task/parallel_task.c
@@
-22,8
+22,8
@@
int test(int argc, char *argv[])
{
int slaves_count = 0;
m_host_t *slaves = NULL;
- double task_comp_size = 0;
- double task_comm_size = 0;
+ double task_comp_size =
10000
0;
+ double task_comm_size =
1000
0;
double *computation_amount = NULL;
double *communication_amount = NULL;
m_task_t ptask = NULL;
@@
-32,8
+32,8
@@
int test(int argc, char *argv[])
slaves_count = MSG_get_host_number();
slaves = MSG_get_host_table();
- computation_amount =
calloc(slaves_count,sizeof(double)
);
- communication_amount =
calloc(slaves_count*slaves_count,sizeof(double)
);
+ computation_amount =
xbt_new0(double,slaves_count
);
+ communication_amount =
xbt_new0(double,slaves_count*slaves_count
);
for(i=0;i<slaves_count;i++)
computation_amount[i]=task_comp_size;
@@
-49,10
+49,11
@@
int test(int argc, char *argv[])
NULL);
MSG_parallel_task_execute(ptask);
+ /* There is no need to free that! */
+/* free(communication_amount); */
+/* free(computation_amount); */
INFO0("Goodbye now!");
- free(communication_amount);
- free(computation_amount);
free(slaves);
return 0;
}
@@
-62,7
+63,7
@@
MSG_error_t test_all(const char *platform_file)
{
MSG_error_t res = MSG_OK;
- /* MSG_config("workstation_model","KCCFLN05"); */
+ MSG_config("workstation_model","ptask_L07");
MSG_set_channel_number(1);
MSG_create_environment(platform_file);