Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add VM API from MSG (experimental, still buggy in MSG C part anyway)
[simgrid.git] / examples / async / Master.java
index dd4c313..19e840c 100644 (file)
@@ -11,6 +11,7 @@ package async;
 import java.util.ArrayList;
 
 import org.simgrid.msg.Comm;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Process;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.MsgException;
@@ -18,6 +19,9 @@ import org.simgrid.msg.Task;
 import org.simgrid.msg.Process;;
 
 public class Master extends Process {
+       public Master(Host host, String name, String[]args) {
+               super(host,name,args);
+       }
        public void main(String[] args) throws MsgException {
                if (args.length < 4) {
                        Msg.info("Master needs 4 arguments");
@@ -35,7 +39,6 @@ public class Master extends Process {
                
                for (int i = 0; i < tasksCount; i++) {
                        Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); 
-                       Process p = task.getSender();
                        Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
                        //task.send("slave_"+(i%slavesCount));
                        Comm comm = task.isend("slave_"+(i%slavesCount));