}
public void main(String[] args) throws MsgException {
- int workersCount = Main.hostNB;
- ArrayList<VM> vms = new ArrayList<VM>();
+ int workersCount = Main.NHOSTS;
+ ArrayList<VM> vms = new ArrayList<>();
// Create one VM per host and bind a process inside each one.
for (int i = 0; i < workersCount; i++) {
Msg.info("Let's shut down the simulation and kill everyone.");
for (int i = 0; i < vms.size(); i++) {
- vms.get(i).shutdown();
- vms.get(i).finalize();
+ vms.get(i).destroy();
}
Msg.info("Master done.");
}
public void workBatch(int workersCount) throws MsgException {
for (int i = 0; i < workersCount; i++) {
- Task task = new Task("Task0" + i, Main.task_comp_size, Main.task_comm_size);
+ Task task = new Task("Task0" + i, Main.TASK_COMP_SIZE, Main.TASK_COMM_SIZE);
Msg.info("Sending to WRK0" + i);
task.send("MBOX:WRK0" + i);
}