static void runner()
{
XBT_INFO(
"First, build a classical parallel task, with 1 Gflop to execute on each node, " "and 10MB to exchange between each pair");
double* computation_amounts = new double[hosts_count]();
double* communication_amounts = new double[hosts_count * hosts_count]();
for (int i = 0; i < hosts_count; i++)
computation_amounts[i] = 1e9;
for (int i = 0; i < hosts_count; i++)
for (int j = i + 1; j < hosts_count; j++)
communication_amounts[i * hosts_count + j] = 1e7;
XBT_INFO(
"We can do the same with a timeout of one second enabled.");
computation_amounts = new double[hosts_count]();
communication_amounts = new double[hosts_count * hosts_count]();
for (int i = 0; i < hosts_count; i++)
computation_amounts[i] = 1e9;
for (int i = 0; i < hosts_count; i++)
for (int j = i + 1; j < hosts_count; j++)
communication_amounts[i * hosts_count + j] = 1e7;
try {
1.0 );
XBT_WARN(
"Woops, this did not timeout as expected... Please report that bug.");
XBT_DEBUG(
"Caught expected exception: %s", e.what());
}
XBT_INFO(
"Then, build a parallel task involving only computations and no communication (1 Gflop per node)");
computation_amounts = new double[hosts_count]();
for (int i = 0; i < hosts_count; i++)
computation_amounts[i] = 1e9;
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]();
XBT_INFO(
"Finally, trick the ptask to do a 'remote execution', on host %s", hosts[1]->
getCname());
computation_amounts = new double[1]{1e9};
std::free(hosts);
}
{
xbt_assert(argc <= 3,
"1Usage: %s <platform file> [--energy]", argv[0]);
xbt_assert(argc >= 2,
"2Usage: %s <platform file> [--energy]", argv[0]);
if (argc == 3 && argv[2][2] == 'e')
e.loadPlatform(argv[1]);
e.run();
return 0;
}