Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix an example after the recent change to hosts_as_dynar modifying its order
[simgrid.git] / examples / java / io / file / Node.java
index 8339064..ff16438 100644 (file)
@@ -31,22 +31,22 @@ public class Node extends Process {
   private static String FILENAME3 = "/doc/simgrid/examples/platforms/g5k_cabinets.xml";
   private static String FILENAME4 = "/doc/simgrid/examples/platforms/nancy.xml";
 
-  protected int number;
+  protected int rank;
 
   public Node(Host host, int number) throws HostNotFoundException {
     super(host, Integer.toString(number), null);
-    this.number = number;
+    this.rank = number;
   }
 
   public void main(String[] args) throws MsgException {
     String mount;
     String filename;
-    switch (number) {
-      case 0:
+    switch (rank) {
+      case 4:
         mount = "/home";
         filename = mount + FILENAME1;
       break;
-      case 1:
+      case 0:
         mount = "c:";
         filename = mount + FILENAME2;
       break;
@@ -54,7 +54,7 @@ public class Node extends Process {
         mount = "/home";
         filename = mount + FILENAME3;
       break;
-      case 3:
+      case 1:
         mount = "/home";
         filename = mount + FILENAME4;
       break;