/* Sleep a while before starting the example */
simgrid::s4u::this_actor::sleep_for(10);
-
if (flow_amount == 1) {
/* - Send the task to the @ref worker */
char* payload = bprintf("%f", comm_size);
void* res = mailbox->get();
xbt_free(res);
} else {
- void* data[flow_amount];
+ void** data= new void*[flow_amount];
// Start all comms in parallel, and wait for their completion in one shot
std::vector<simgrid::s4u::CommPtr> comms;
simgrid::s4u::Comm::wait_all(&comms);
for (int i = 0; i < flow_amount; i++)
xbt_free(data[i]);
+ delete[] data;
}
XBT_INFO("receiver done.");
}
int main(int argc, char* argv[])
{
-
simgrid::s4u::Engine e(&argc, argv);
XBT_INFO("Activating the SimGrid link energy plugin");
argSender.push_back("1"); // Default value
argReceiver.push_back("1");
}
+
if (argc > 3) {
if (strcmp(argv[3], "random") == 0) { // We're asked to get a random size
/* Initialize the random number generator */