Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Test that ptasks with 0 exec and 0 comm do work
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 21 Jun 2016 10:49:04 +0000 (12:49 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 21 Jun 2016 10:54:30 +0000 (12:54 +0200)
examples/msg/energy-ptask/energy-ptask.c
examples/msg/energy-ptask/energy-ptask.tesh

index 522ed98..01d8cce 100644 (file)
@@ -49,7 +49,14 @@ static int runner(int argc, char *argv[])
   MSG_parallel_task_execute(ptask);
   MSG_task_destroy(ptask);
 
   MSG_parallel_task_execute(ptask);
   MSG_task_destroy(ptask);
 
-  XBT_INFO("Finally, trick the ptask to do a 'remote execution', on host %s", MSG_host_get_name(hosts[1]));
+  XBT_INFO("Then, build a parallel task with no computation nor communication (synchro only)");
+  computation_amounts = xbt_new0(double, hosts_count);
+  communication_amounts = xbt_new0(double, hosts_count * hosts_count); /* memset to 0 by xbt_new0 */
+  ptask = MSG_parallel_task_create("parallel sync", hosts_count, hosts, computation_amounts, communication_amounts, NULL);
+  MSG_parallel_task_execute(ptask);
+  MSG_task_destroy(ptask);
+
+   XBT_INFO("Finally, trick the ptask to do a 'remote execution', on host %s", MSG_host_get_name(hosts[1]));
   computation_amounts = xbt_new0(double, 1);
   computation_amounts[0] = 1e9; // 1 Gflop
   msg_host_t *remote = xbt_new(msg_host_t,1);
   computation_amounts = xbt_new0(double, 1);
   computation_amounts[0] = 1e9; // 1 Gflop
   msg_host_t *remote = xbt_new(msg_host_t,1);
index 80ed175..cfd1d77 100644 (file)
@@ -4,6 +4,7 @@ $ $SG_TEST_EXENV energy-ptask/energy-ptask$EXEEXT ${srcdir:=.}/../platforms/ener
 > [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
 > [  0.000000] (1:test@MyHost1) First, build a classical parallel task, with 1 Gflop to execute on each node, and 10MB to exchange between each pair
 > [300.000000] (1:test@MyHost1) Then, build a parallel task involving only computations and no communication (1 Gflop per node)
 > [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
 > [  0.000000] (1:test@MyHost1) First, build a classical parallel task, with 1 Gflop to execute on each node, and 10MB to exchange between each pair
 > [300.000000] (1:test@MyHost1) Then, build a parallel task involving only computations and no communication (1 Gflop per node)
+> [310.000000] (1:test@MyHost1) Then, build a parallel task with no computation nor communication (synchro only)
 > [310.000000] (1:test@MyHost1) Finally, trick the ptask to do a 'remote execution', on host MyHost2
 > [320.000000] (1:test@MyHost1) Goodbye now!
 > [320.000000] (0:maestro@) Simulation done.
 > [310.000000] (1:test@MyHost1) Finally, trick the ptask to do a 'remote execution', on host MyHost2
 > [320.000000] (1:test@MyHost1) Goodbye now!
 > [320.000000] (0:maestro@) Simulation done.