X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8c416e92254512408c1d0ce729e8d3cf82ec9938..9c283d83692207a80314734801a47739cc2b5bc8:/examples/s4u/exec-ptask/s4u-exec-ptask.cpp diff --git a/examples/s4u/exec-ptask/s4u-exec-ptask.cpp b/examples/s4u/exec-ptask/s4u-exec-ptask.cpp index 37fe2e2df0..ef3bac115e 100644 --- a/examples/s4u/exec-ptask/s4u-exec-ptask.cpp +++ b/examples/s4u/exec-ptask/s4u-exec-ptask.cpp @@ -28,7 +28,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_energyptask, "Messages specific for this s4u ex static void runner() { /* Retrieve the list of all hosts as an array of hosts */ - std::vector hosts = simgrid::s4u::Engine::getInstance()->get_all_hosts(); + std::vector hosts = simgrid::s4u::Engine::get_instance()->get_all_hosts(); int hosts_count = hosts.size(); XBT_INFO("First, build a classical parallel task, with 1 Gflop to execute on each node, " @@ -71,6 +71,12 @@ static void runner() computation_amounts[i] = 1e9; // 1 Gflop simgrid::s4u::this_actor::parallel_execute(hosts_count, hosts.data(), computation_amounts, nullptr /* no comm */); + XBT_INFO("Then, build a parallel task involving only heterogeneous computations and no communication"); + computation_amounts = new double[hosts_count](); + for (int i = 0; i < hosts_count; i++) + computation_amounts[i] = 5 * (i + 1) * 1e8; // 500Mflop, 1Gflop, 1.5Gflop + simgrid::s4u::this_actor::parallel_execute(hosts_count, hosts.data(), computation_amounts, nullptr /* no comm */); + XBT_INFO("Then, build a parallel task with no computation nor communication (synchro only)"); computation_amounts = new double[hosts_count](); communication_amounts = new double[hosts_count * hosts_count]();