Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This time, hopefully, the files are in valid version 2 of the DTD
[simgrid.git] / examples / java / basic / Master.java
index d3d354b..e25fb35 100644 (file)
@@ -31,8 +31,6 @@ public class Master extends simgrid.msg.Process {
       double taskCommunicateSize = Double.valueOf(args[2]).doubleValue();
       BasicTask[] todo = new BasicTask[numberOfTasks];
       
-      String taskName = null;
-      
       for (int i = 0; i < numberOfTasks; i++) {
         todo[i] = new BasicTask("Task_" + i, taskComputeSize, taskCommunicateSize); 
       }
@@ -74,9 +72,7 @@ public class Master extends simgrid.msg.Process {
       Msg.info("All tasks have been dispatched. Let's tell everybody the computation is over.");
       
       for (int i = 0; i < slaveCount; i++) {
-        BasicTask task = new BasicTask("finalize", 0, 0);
-        task.setData(221297);   
-        channel.put(task,slaves[i]);
+        channel.put(new FinalizeTask(),slaves[i]);
       }
       
       Msg.info("Goodbye now!");