//Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
task.send("slave_"+(i%slavesCount));
}
- simulatedSleep(1);
Msg.info("All tasks have been dispatched. Let's tell (asynchronously) everybody the computation is over, and sleep 20s so that nobody gets a message from a terminated process.");
Task task = comm.getTask();
if (task instanceof FinalizeTask) {
+ comm = null;
break;
}
Msg.info("Received \"" + task.getName() + "\". Processing it.");
try {
task.execute();
} catch (TaskCancelledException e) {
-
+
}
+ comm = null;
}
else {
simulatedSleep(1);
}
}
catch (Exception e) {
-
+ e.printStackTrace();
}
}
Msg.info("Received Finalize. I'm done. See you!");
task =
MSG_task_create(name, (double) jcomputeDuration,
(double) jmessageSize, NULL);
- XBT_INFO("Name: %s %p",name,task);
if (jname)
(*env)->ReleaseStringUTFChars(env, jname, name);