Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 17 Feb 2016 18:00:28 +0000 (19:00 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 17 Feb 2016 18:00:28 +0000 (19:00 +0100)
160 files changed:
doc/HelloWorld/CMakeLists.txt [deleted file]
doc/HelloWorld/HelloWorld.c [deleted file]
doc/HelloWorld/README [deleted file]
examples/java/async/AsyncTest.java
examples/java/async/CMakeLists.txt
examples/java/async/FinalizeTask.java
examples/java/async/Forwarder.java
examples/java/async/Master.java
examples/java/async/Slave.java
examples/java/async/asyncDeployment.xml
examples/java/bittorrent/Bittorrent.java
examples/java/bittorrent/CMakeLists.txt
examples/java/bittorrent/Common.java
examples/java/bittorrent/Connection.java
examples/java/bittorrent/MessageTask.java
examples/java/bittorrent/Peer.java
examples/java/bittorrent/Tracker.java
examples/java/bittorrent/TrackerTask.java
examples/java/bittorrent/bittorrent.xml
examples/java/chord/Chord.java
examples/java/chord/ChordTask.java
examples/java/chord/Common.java
examples/java/chord/FindSuccessorAnswerTask.java
examples/java/chord/FindSuccessorTask.java
examples/java/chord/GetPredecessorAnswerTask.java
examples/java/chord/GetPredecessorTask.java
examples/java/chord/Node.java
examples/java/chord/NotifyTask.java
examples/java/chord/chord.xml
examples/java/cloud/CMakeLists.txt
examples/java/cloud/Cloud.java
examples/java/cloud/FinalizeTask.java
examples/java/cloud/Master.java
examples/java/cloud/Slave.java
examples/java/cloud/energy/CMakeLists.txt
examples/java/cloud/energy/EnergyVMRunner.java
examples/java/cloud/energy/Main.java
examples/java/cloud/migration/CMakeLists.txt
examples/java/cloud/migration/Main.java
examples/java/cloud/migration/Test.java
examples/java/cloud/migration/TestHostOnOff.java
examples/java/cloud/migration/XVM.java
examples/java/cloud/migration/deploy_simple.xml
examples/java/cloud/migration/migration.tesh
examples/java/commTime/CMakeLists.txt
examples/java/commTime/CommTimeTest.java
examples/java/commTime/FinalizeTask.java
examples/java/commTime/Master.java
examples/java/commTime/README [deleted file]
examples/java/commTime/Slave.java
examples/java/commTime/commTimeDeployment.xml
examples/java/energy/CMakeLists.txt
examples/java/energy/Energy.java
examples/java/energy/EnergyConsumer.java
examples/java/io/CMakeLists.txt
examples/java/io/Client.java
examples/java/io/IO.java
examples/java/io/Node.java
examples/java/io/Storage.java
examples/java/io/storage.tesh [new file with mode: 0644]
examples/java/kademlia/Answer.java
examples/java/kademlia/Bucket.java
examples/java/kademlia/CMakeLists.txt
examples/java/kademlia/Common.java
examples/java/kademlia/Contact.java
examples/java/kademlia/FindNodeAnswerTask.java
examples/java/kademlia/FindNodeTask.java
examples/java/kademlia/Kademlia.java
examples/java/kademlia/KademliaTask.java
examples/java/kademlia/Node.java
examples/java/kademlia/PingAnswerTask.java
examples/java/kademlia/PingTask.java
examples/java/kademlia/RoutingTable.java
examples/java/kademlia/kademlia.xml
examples/java/migration/CMakeLists.txt
examples/java/migration/Emigrant.java
examples/java/migration/Migration.java
examples/java/migration/Policeman.java
examples/java/mutualExclusion/CMakeLists.txt
examples/java/mutualExclusion/Coordinator.java
examples/java/mutualExclusion/GrantTask.java
examples/java/mutualExclusion/MutexCentral.java
examples/java/mutualExclusion/Node.java
examples/java/mutualExclusion/ReleaseTask.java
examples/java/mutualExclusion/RequestTask.java
examples/java/mutualExclusion/mutex_centralized_deployment.xml
examples/java/pingPong/CMakeLists.txt
examples/java/pingPong/PingPongTask.java
examples/java/pingPong/PingPongTest.java
examples/java/pingPong/README [deleted file]
examples/java/pingPong/Receiver.java
examples/java/pingPong/Sender.java
examples/java/pingPong/pingPongDeployment.xml
examples/java/priority/CMakeLists.txt
examples/java/priority/Priority.java
examples/java/priority/Test.java
examples/java/startKillTime/CMakeLists.txt
examples/java/startKillTime/Master.java
examples/java/startKillTime/Slave.java
examples/java/startKillTime/StartKillTime.java
examples/java/startKillTime/deployment.xml [deleted file]
examples/java/startKillTime/deployment_kill.xml [deleted file]
examples/java/startKillTime/deployment_start.xml [deleted file]
examples/java/startKillTime/deployment_start_kill.xml
examples/java/suspend/CMakeLists.txt
examples/java/suspend/DreamMaster.java
examples/java/suspend/LazyGuy.java
examples/java/suspend/Suspend.java
examples/java/tracing/CMakeLists.txt
examples/java/tracing/PingPongTask.java
examples/java/tracing/README [deleted file]
examples/java/tracing/Receiver.java
examples/java/tracing/Sender.java
examples/java/tracing/TracingTest.java
examples/java/tracing/tracingPingPongDeployment.xml
examples/msg/chord/chord.xml
examples/msg/parallel_task/parallel_task.tesh
examples/platforms/bypassASroute.xml
examples/platforms/bypassRoute.xml
examples/platforms/cloud.xml
examples/platforms/cluster.xml
examples/platforms/cluster_and_one_host.xml
examples/platforms/cluster_no_backbone.xml
examples/platforms/clusters_routing_full.xml
examples/platforms/config.xml
examples/platforms/config_tracing.xml
examples/platforms/crosstraffic.xml
examples/platforms/data_center.xml
examples/platforms/energy_platform.xml
examples/platforms/fat_tree_cluster.xml
examples/platforms/g5k.xml
examples/platforms/griffon.xml
examples/platforms/meta_cluster.xml
examples/platforms/multicore_machine.xml
examples/platforms/prop.xml
examples/platforms/routing_cluster.xml
examples/platforms/routing_none.xml
examples/platforms/simulacrum_7_hosts.xml
examples/platforms/small_platform.xml
examples/platforms/small_platform_fatpipe.xml
examples/platforms/small_platform_one_link_routes.xml
examples/platforms/small_platform_with_failures.xml
examples/platforms/small_platform_with_routers.xml
examples/platforms/torus_cluster.xml
examples/platforms/two_hosts_platform.xml
examples/platforms/two_hosts_platform_shared.xml
examples/platforms/two_hosts_platform_with_availability.xml
examples/platforms/two_hosts_platform_with_availability_included.xml
examples/platforms/two_peers.xml
examples/platforms/vivaldi.xml
examples/simdag/io/io.tesh
src/bindings/java/jmsg_host.cpp
src/bindings/java/jmsg_storage.cpp
tools/cmake/DefinePackages.cmake
tools/cmake/Distrib.cmake
tools/cmake/Tests.cmake
tools/cmake/scripts/Makefile.default [deleted file]
tools/cmake/scripts/SimGrid.packproj [deleted file]
tools/cmake/scripts/postinstall.sh [deleted file]
tools/cmake/scripts/preinstall.sh [deleted file]

diff --git a/doc/HelloWorld/CMakeLists.txt b/doc/HelloWorld/CMakeLists.txt
deleted file mode 100644 (file)
index 02d42f5..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-### This is a template for building targets with simgrid
-cmake_minimum_required(VERSION 2.8)
-
-### Need to set rc ccompiler before enable language
-if(WIN32)
-  SET(CMAKE_RC_COMPILER "windres")
-  set(LIBRARIES_DEP simgrid ws2_32 pthread)
-else()
-  set(LIBRARIES_DEP simgrid pthread)
-endif()
-
-project(MY_SIMGRID_PROJECT C)
-
-set(CMAKE_C_FLAGS "" CACHE TYPE INTERNAL FORCE)
-set(CMAKE_EXE_LINKER_FLAGS "" CACHE TYPE INTERNAL FORCE)
-
-###############################
-# Test the build dependencies #
-###############################
-message(STATUS "Looking for lib Simgrid")
-if("$ENV{SIMGRID_ROOT}" STREQUAL "")
-  message(STATUS "Looking for lib Simgrid - Not found")
-  message(FATAL_ERROR "Simgrid not found, reinstall it or set SIMGRID_ROOT")
-else()
-  link_directories($ENV{SIMGRID_ROOT}/lib)
-  include_directories($ENV{SIMGRID_ROOT}/include)
-  include_directories($ENV{SIMGRID_ROOT}/src)
-  include_directories($ENV{SIMGRID_ROOT}/src/include)
-  message(STATUS "Looking for lib Simgrid - found")
-endif()
-
-################
-# FIND TARGETS #
-################
-file(GLOB SOURCE_FILE
-  RELATIVE ${CMAKE_HOME_DIRECTORY}/
-  "*.c"
-  )
-string(REPLACE ".c" "" TARGET_NAME ${SOURCE_FILE})
-
-foreach(target "${TARGET_NAME}")
-  add_executable(${target} "${target}.c")
-  message(STATUS "source_file: ${target}.c")
-  message(STATUS "target name: ${target}.exe")
-  # Any targets need to be linked with libraries
-  target_link_libraries(${target} ${LIBRARIES_DEP})
-endforeach(target ${SOURCE_FILE})
diff --git a/doc/HelloWorld/HelloWorld.c b/doc/HelloWorld/HelloWorld.c
deleted file mode 100644 (file)
index 72c6d04..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Copyright (c) 2011-2012, 2014. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include <stdio.h>
-#include "xbt/log.h"
-XBT_LOG_NEW_DEFAULT_CATEGORY(HelloWorld,
-                             "Messages specific for this Hello World example");
-void main()
-{
-  XBT_INFO("Hello World !!!");
-}
diff --git a/doc/HelloWorld/README b/doc/HelloWorld/README
deleted file mode 100644 (file)
index 67b0585..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-This is a very simple example to explain how to compile with simgrid.
-
-1) How to compile an example: (HelloWorld)
-
-- Run windows shell "cmd".
-- Open HelloWorld Directory ('cd' command line).
-- Create a build directory and change directory. (optional)
-- Type 'cmake -G"MinGW Makefiles" <path_to_HelloWorld_project>'
-- Run mingw32-make
-- You should obtain a runnable example ("HelloWorld.exe").
-
-2) Content of this directory
-
-- HelloWorld.c 
-       The example source file.
-- CMakeLists.txt
-       It allows to configure the project.
-- README
-       This explaination.
-       
-3) How to add and compile a new example
-
-- Put your source file into the helloWord directory.
-- Edit CMakeLists.txt :
-       * In the Targets section add those two lines:
-               add_executable(TARGET_NAME SOURCES)
-               target_link_libraries(TARGET_NAME simgrid) 
-       * It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES'.
-- To initialize your project, you'll need to run 'cmake -G"Unix Makefiles" <path_to_HelloWorld_project>.'
-- To build you project, run "cmake ." 
-- Run "gmake"
-- You should obtain "TARGET_NAME.exe".
\ No newline at end of file
index 983fecd..0c6d1fe 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -10,28 +10,20 @@ import org.simgrid.msg.Msg;
 import org.simgrid.msg.NativeException;
 
 public class AsyncTest {
-
-       /* This only contains the launcher. If you do nothing more than than you can run 
-        *   java simgrid.msg.Msg
-        * which also contains such a launcher
-        */
-
-       public static void main(String[] args) throws NativeException {
-
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-
-           if (args.length < 2) {              
-                       Msg.info("Usage   : Async platform_file deployment_file");
-                       Msg.info("example : Async basic_platform.xml basic_deployment.xml");
-                       System.exit(1); 
-               }
-
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
-
-               /*  execute the simulation. */
-               Msg.run();
-       }
+  public static void main(String[] args) throws NativeException {
+    Msg.init(args);
+
+    if (args.length < 2) {
+    Msg.info("Usage   : AsyncTest platform_file deployment_file");
+    Msg.info("example : AsyncTest ../platforms/platform.xml asyncDeployment.xml");
+    System.exit(1);
+  }
+
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
+
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
index 25d266c..6aa09fe 100644 (file)
@@ -32,9 +32,6 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
 set(txt_files
   ${txt_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/README
index 1e7b439..39b1a4f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,9 +7,8 @@
 package async;
 import org.simgrid.msg.Task;
 
-public class FinalizeTask extends Task {       
-   public FinalizeTask() {
-      super("finalize",0,0);
-   }
+public class FinalizeTask extends Task {
+  public FinalizeTask() {
+    super("finalize",0,0);
+  }
 }
-    
\ No newline at end of file
index fbf394f..965bb8c 100644 (file)
@@ -1,57 +1,57 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
+ * All rights reserved.                                    */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package async;
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Task;
 import org.simgrid.msg.Process;
-
+import org.simgrid.msg.MsgException;
 
 public class Forwarder extends Process {
-       public Forwarder(Host host, String name, String[]args) {
-               super(host,name,args);
-       }
-       public void main(String[] args) throws MsgException {
-               if (args.length < 3) {   
-                       Msg.info("Forwarder needs 3 arguments (input mailbox, first output mailbox, last one)");
-                       Msg.info("Got "+args.length+" instead");
-                       System.exit(1);
-               }
-               int input = Integer.valueOf(args[0]).intValue();                
-               int firstOutput = Integer.valueOf(args[1]).intValue();          
-               int lastOutput = Integer.valueOf(args[2]).intValue();           
-
-               int taskCount = 0;
-               int slavesCount = lastOutput - firstOutput + 1;
-               Msg.info("Receiving on 'slave_"+input+"'");
-               while(true) {
-                       Task task = Task.receive("slave_"+input);       
-
-                       if (task instanceof FinalizeTask) {
-                               Msg.info("Got a finalize task. Let's forward (asynchronously) that we're done, and then sleep 20 seconds so that nobody gets a message from a terminated process.");
-
-                               for (int cpt = firstOutput; cpt<=lastOutput; cpt++) {
-                                       Task tf = new FinalizeTask();
-                                       tf.dsend("slave_"+cpt);
-                               }
-                               waitFor(20);
-                               break;
-                       }
-                       int dest = firstOutput + (taskCount % slavesCount);
-
-                       Msg.info("Sending \"" + task.getName() + "\" to \"slave_" + dest + "\"");
-                       task.send("slave_"+dest);
-
-                       taskCount++;
-               }
-
-
-               Msg.info("I'm done. See you!");
-       }
+  public Forwarder(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws MsgException {
+    if (args.length < 3) {   
+      Msg.info("Forwarder needs 3 arguments (input mailbox, first output mailbox, last one)");
+      Msg.info("Got "+args.length+" instead");
+      System.exit(1);
+    }
+    int input = Integer.valueOf(args[0]).intValue();
+    int firstOutput = Integer.valueOf(args[1]).intValue();
+    int lastOutput = Integer.valueOf(args[2]).intValue();
+
+    int taskCount = 0;
+    int slavesCount = lastOutput - firstOutput + 1;
+    Msg.info("Receiving on 'slave_"+input+"'");
+    while(true) {
+      Task task = Task.receive("slave_"+input);
+
+      if (task instanceof FinalizeTask) {
+        Msg.info("Got a finalize task. Let's forward (asynchronously) that we're done, and then sleep 20 seconds"+
+                 " so that nobody gets a message from a terminated process.");
+
+        for (int cpt = firstOutput; cpt<=lastOutput; cpt++) {
+          Task tf = new FinalizeTask();
+          tf.dsend("slave_"+cpt);
+        }
+        waitFor(20);
+        break;
+      }
+      int dest = firstOutput + (taskCount % slavesCount);
+
+      Msg.info("Sending \"" + task.getName() + "\" to \"slave_" + dest + "\"");
+      task.send("slave_"+dest);
+
+      taskCount++;
+    }
+
+    Msg.info("I'm done. See you!");
+  }
 }
 
index 4960b75..19e66ea 100644 (file)
@@ -1,6 +1,4 @@
-/* Master of a basic master/slave example in Java */
-
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,63 +7,63 @@
 package async;
 import java.util.ArrayList;
 
+import org.simgrid.msg.Msg;
 import org.simgrid.msg.Comm;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Process;
 import org.simgrid.msg.Task;
+import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 
 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");
-                       System.exit(1);
-               }
+  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");
+      System.exit(1);
+    }
+
+    int tasksCount = Integer.valueOf(args[0]).intValue();    
+    double taskComputeSize = Double.valueOf(args[1]).doubleValue();    
+    double taskCommunicateSize = Double.valueOf(args[2]).doubleValue();
+
+    int slavesCount = Integer.valueOf(args[3]).intValue();
 
-               int tasksCount = Integer.valueOf(args[0]).intValue();           
-               double taskComputeSize = Double.valueOf(args[1]).doubleValue();         
-               double taskCommunicateSize = Double.valueOf(args[2]).doubleValue();
+    Msg.info("Hello! Got "+  slavesCount + " slaves and "+tasksCount+" tasks to process");
+    ArrayList<Comm> comms = new ArrayList<Comm>();
 
-               int slavesCount = Integer.valueOf(args[3]).intValue();
+    for (int i = 0; i < tasksCount; i++) {
+      Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); 
+      Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
+      Comm comm = task.isend("slave_"+(i%slavesCount));
+      comms.add(comm);
+    }
 
-               Msg.info("Hello! Got "+  slavesCount + " slaves and "+tasksCount+" tasks to process");
-               ArrayList<Comm> comms = new ArrayList<Comm>();
-               
-               for (int i = 0; i < tasksCount; i++) {
-                       Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); 
-                       Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
-                       //task.send("slave_"+(i%slavesCount));
-                       Comm comm = task.isend("slave_"+(i%slavesCount));
-                       comms.add(comm);
-               }
-               
-               while (comms.size() > 0) {
-                       for (int i = 0; i < comms.size(); i++) {
-                               try {
-                                       if (comms.get(i).test()) {
-                                               comms.remove(i);
-                                               i--;
-                                       }
-                               }
-                               catch (Exception e) {
-                                       e.printStackTrace();
-                               }
-                       }
-                       waitFor(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.");
+    while (comms.size() > 0) {
+      for (int i = 0; i < comms.size(); i++) {
+        try {
+          if (comms.get(i).test()) {
+            comms.remove(i);
+            i--;
+          }
+        }
+        catch (Exception e) {
+          e.printStackTrace();
+        }
+      }
+      waitFor(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.");
 
-               for (int i = 0; i < slavesCount; i++) {
-                       FinalizeTask task = new FinalizeTask();
-                       task.dsend("slave_"+(i%slavesCount));
-               }
-               waitFor(20);
+    for (int i = 0; i < slavesCount; i++) {
+      FinalizeTask task = new FinalizeTask();
+      task.dsend("slave_"+(i%slavesCount));
+    }
+    waitFor(20);
 
-               Msg.info("Goodbye now!");
-       }
+    Msg.info("Goodbye now!");
+  }
 }
index 1d4f567..3d32d2a 100644 (file)
@@ -1,67 +1,64 @@
-/* Copyright (c) 2006-2007, 2010, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2006-2007, 2010, 2013-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package async;
+import org.simgrid.msg.Msg;
 import org.simgrid.msg.Comm;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.HostFailureException;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.Process;
 import org.simgrid.msg.Task;
+import org.simgrid.msg.Process;
+import org.simgrid.msg.HostFailureException;
 import org.simgrid.msg.TaskCancelledException;
 import org.simgrid.msg.TimeoutException;
 import org.simgrid.msg.TransferFailureException;
 
 public class Slave extends Process {
-       public Slave(Host host, String name, String[]args) {
-               super(host,name,args);
-       }
-       public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
-               if (args.length < 1) {
-                       Msg.info("Slave needs 1 argument (its number)");
-                       System.exit(1);
-               }
+  public Slave(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
+    if (args.length < 1) {
+      Msg.info("Slave needs 1 argument (its number)");
+      System.exit(1);
+    }
+    int num = Integer.valueOf(args[0]).intValue();
+    Comm comm = null;
+    boolean slaveFinished = false;
+    while(!slaveFinished) {  
+      try {
+        if (comm == null) {
+          Msg.info("Receiving on 'slave_" + num + "'");
+          comm = Task.irecv("slave_" + num);
+        } else {
+          if (comm.test()) {
+            Task task = comm.getTask();
 
-               int num = Integer.valueOf(args[0]).intValue();
-               Comm comm = null;
-               boolean slaveFinished = false;
-               while(!slaveFinished) {  
-                       try
-                       {
-                               if (comm == null) {
-                                       Msg.info("Receiving on 'slave_" + num + "'");
-                                       comm = Task.irecv("slave_" + num);
-                               }
-                               else {
-                                       if (comm.test()) {
-                                               Task task = comm.getTask();
-       
-                                               if (task instanceof FinalizeTask) {
-                                                       comm = null;
-                                                       break;
-                                               }
-                                               Msg.info("Received a task");
-                                               Msg.info("Received \"" + task.getName() +  "\". Processing it.");
-                                               try {
-                                                       task.execute();
-                                               } catch (TaskCancelledException e) {
-                                               
-                                               }
-                                               comm = null;                                                    
-                                       }
-                                       else {
-                                               waitFor(1);
-                                       }
-                               }
-                       }
-                       catch (Exception e) {
-                               e.printStackTrace();
-                       }
-               }
-               Msg.info("Received Finalize. I'm done. See you!");
-               waitFor(20);
-       }
+            if (task instanceof FinalizeTask) {
+              comm = null;
+              break;
+            }
+            Msg.info("Received a task");
+            Msg.info("Received \"" + task.getName() +  "\". Processing it.");
+            try {
+              task.execute();
+            } catch (TaskCancelledException e) {
+            
+            }
+            comm = null;
+          } else {
+            waitFor(1);
+          }
+        }
+      }
+      catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
+    Msg.info("Received Finalize. I'm done. See you!");
+    waitFor(20);
+  }
 }
\ No newline at end of file
index 0ec92a0..7ef4d13 100644 (file)
@@ -7,7 +7,7 @@
      <argument value="10"/>    <!-- Communication size of each one -->
      <argument value="7"/>     <!-- Amount of slaves waiting for orders -->
   </process>
-  
+
   <process host="Jackson" function="async.Forwarder">
      <argument value="0"/>  <!-- Input mailbox -->
      <argument value="7"/>  <!-- First output mailbox -->
@@ -18,7 +18,7 @@
      <argument value="9"/>  <!-- First output mailbox -->
      <argument value="10"/> <!-- Last output mailbox -->
   </process>
-  
+
   <process host="iRMX" function="async.Slave">
      <argument value="2"/>  <!-- Input mailbox -->
   </process>
index b488195..7478c3c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014,2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -10,21 +10,19 @@ import org.simgrid.msg.Msg;
 import org.simgrid.msg.MsgException;
 
 public class Bittorrent {
-       public static void main(String[] args) throws MsgException {
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-       if(args.length < 2) {
-               Msg.info("Usage   : Bittorrent platform_file deployment_file");
-               Msg.info("example : Bittorrent platform.xml deployment.xml");
-               System.exit(1);
-       }
-               
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
-                       
-               /*  execute the simulation. */
-        Msg.run();             
-       }
+  public static void main(String[] args) throws MsgException {
+    Msg.init(args);
+    if(args.length < 2) {
+      Msg.info("Usage   : Bittorrent platform_file deployment_file");
+      Msg.info("example : Bittorrent ../platforms/platform.xml bittorrent.xml");
+      System.exit(1);
+    }
 
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
+
+    /*  execute the simulation. */
+        Msg.run();
+  }
 }
index 8fe864c..6d7c80e 100644 (file)
@@ -34,9 +34,6 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
 set(txt_files
   ${txt_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/generate.py
index 1fe856e..2f030f3 100644 (file)
@@ -1,63 +1,36 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package bittorrent;
-/**
- * Common constants for use in the simulation
- */
-public class Common {  
-               
-       public static String TRACKER_MAILBOX = "tracker_mailbox";
-       
-       public static int FILE_SIZE = 5120;
-       public static int FILE_PIECE_SIZE = 512;
-       public static int FILE_PIECES = 10;
-       public static int PIECES_BLOCKS = 5;
-       
-       public static int BLOCKS_REQUESTED = 2;
-       
-       public static int PIECE_COMM_SIZE = 1;
-       /**
-        * Information message size
-        */
-       public static int MESSAGE_SIZE = 1;
-       /**
-        * Max number of pairs sent by the tracker to clients
-        */
-       public static int MAXIMUM_PEERS = 50;
-       /**
-        * Interval of time where the peer should send a request to the tracker
-        */
-       public static int TRACKER_QUERY_INTERVAL = 1000;
-       /**
-        * Communication size for a task to the tracker
-        */
-       public static double TRACKER_COMM_SIZE = 0.01;
-       /**
-        * Timeout for the get peers data
-        */
-       public static int GET_PEERS_TIMEOUT = 10000;
-       /**
-        * Timeout for "standard" messages.
-        */
-       public static int TIMEOUT_MESSAGE = 10;
-       /**
-        * Timeout for tracker receive.
-        */
-       public static int TRACKER_RECEIVE_TIMEOUT = 10;
-       /**
-        * Number of peers that can be unchocked at a given time
-        */
-       public static int MAX_UNCHOKED_PEERS = 4;
-       /**
-        * Interval between each update of the choked peers
-        */
-       public static int UPDATE_CHOKED_INTERVAL = 30;
-       /**
-        * Number of pieces the peer asks for simultaneously
-        */
-       public static int MAX_PIECES = 1;
+
+/* Common constants for use in the simulation */
+public class Common {
+  public static String TRACKER_MAILBOX = "tracker_mailbox";
+  public static int FILE_SIZE = 5120;
+  public static int FILE_PIECE_SIZE = 512;
+  public static int FILE_PIECES = 10;
+  public static int PIECES_BLOCKS = 5;
+  public static int BLOCKS_REQUESTED = 2;
+  public static int PIECE_COMM_SIZE = 1;
+  /* Information message size */
+  public static int MESSAGE_SIZE = 1;
+  /* Max number of peers sent by the tracker to clients */
+  public static int MAXIMUM_PEERS = 50;
+  /* Interval of time where the peer should send a request to the tracker */
+  public static int TRACKER_QUERY_INTERVAL = 1000;
+  /* Communication size for a task to the tracker */
+  public static double TRACKER_COMM_SIZE = 0.01;
+  /* Timeout for the get peers data */
+  public static int GET_PEERS_TIMEOUT = 10000;
+  public static int TIMEOUT_MESSAGE = 10;
+  public static int TRACKER_RECEIVE_TIMEOUT = 10;
+  /* Number of peers that can be unchocked at a given time */
+  public static int MAX_UNCHOKED_PEERS = 4;
+  /* Interval between each update of the choked peers */
+  public static int UPDATE_CHOKED_INTERVAL = 30;
+  /* Number of pieces the peer asks for simultaneously */
+  public static int MAX_PIECES = 1;
 }
index 4ca20fd..ff15fd3 100644 (file)
@@ -1,77 +1,44 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package bittorrent;
-
 import java.util.Arrays;
+
 public class Connection {
-       /**
-        * Remote peer id
-        */
-       public int id;
-       /**
-        * Remote peer bitfield.
-        */
-       public char bitfield[];
-       /**
-        * Remote peer mailbox
-        */
-       public String mailbox;
-       /**
-        * Indicates if we are interested in something this peer has
-        */
-       public boolean amInterested = false;
-       /**
-        * Indicates if the peer is interested in one of our pieces
-        */
-       public boolean interested = false;
-       /**
-        * Indicates if the peer is choked for the current peer
-        */
-       public boolean chokedUpload = true;
-       /**
-        * Indicates if the peer has choked the current peer
-        */
-       public boolean chokedDownload = true;
-       /**
-        * Number of messages we have received from the peer
-        */
-       public int messagesCount = 0;
-       /**
-        * Peer speed.
-        */
-       public double peerSpeed = 0;
-       /**
-        * Last time the peer was unchoked
-        */
-       public double lastUnchoke = 0;
-       /**
-        * Constructor
-        */
-       public Connection(int id) {
-               this.id = id;
-               this.mailbox = Integer.toString(id);
-       }
-       /**
-        * Add a new value to the peer speed average
-        */
-       public void addSpeedValue(double speed) {
-               peerSpeed = peerSpeed * 0.55 + speed * 0.45;
-               //              peerSpeed = (peerSpeed * messagesCount + speed) / (++messagesCount);            
-       }
-               
-       @Override
-       public String toString() {
-               return "Connection [id=" + id + ", bitfield="
-                               + Arrays.toString(bitfield) + ", mailbox=" + mailbox
-                               + ", amInterested=" + amInterested + ", interested="
-                               + interested + ", chokedUpload=" + chokedUpload
-                               + ", chokedDownload=" + chokedDownload + "]";
-       }
-       
-       
+  public int id;
+  public char bitfield[];
+  public String mailbox;
+  // Indicates if we are interested in something this peer has
+  public boolean amInterested = false;
+  // Indicates if the peer is interested in one of our pieces
+  public boolean interested = false;
+  // Indicates if the peer is choked for the current peer
+  public boolean chokedUpload = true;
+  // Indicates if the peer has choked the current peer
+  public boolean chokedDownload = true;
+  // Number of messages we have received from the peer
+  public int messagesCount = 0;
+  public double peerSpeed = 0;
+  public double lastUnchoke = 0;
+
+  public Connection(int id) {
+    this.id = id;
+    this.mailbox = Integer.toString(id);
+  }
+
+  // Add a new value to the peer speed average
+  public void addSpeedValue(double speed) {
+    peerSpeed = peerSpeed * 0.55 + speed * 0.45;
+    // peerSpeed = (peerSpeed * messagesCount + speed) / (++messagesCount);    
+  }
+
+  @Override
+  public String toString() {
+    return "Connection [id=" + id + ", bitfield=" + Arrays.toString(bitfield) + ", mailbox=" + mailbox
+        + ", amInterested=" + amInterested + ", interested=" + interested + ", chokedUpload=" + chokedUpload
+        + ", chokedDownload=" + chokedDownload + "]";
+  }
 }
\ No newline at end of file
index 3c98d15..b204ff9 100644 (file)
@@ -1,81 +1,65 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package bittorrent;
-
 import org.simgrid.msg.Task;
-/**
- * Tasks sent between peers
- */
+
 public class MessageTask extends Task {
-       public enum Type {
-               HANDSHAKE,
-               CHOKE,
-               UNCHOKE,
-               INTERESTED,
-               NOTINTERESTED,
-               HAVE,
-               BITFIELD,
-               REQUEST,
-               PIECE
-       };
-       public Type type;
-       public String issuerHostname;
-       public String mailbox;
-       public int peerId;
-       public char bitfield[];
-       public int index;
-       public int blockIndex;
-       public int blockLength;
-       public boolean stalled;
-       /**
-        * Constructor, builds a value-less message
-        * @param type
-        * @param issuerHostname
-        * @param mailbox
-        * @param peerId
-        */
-       public MessageTask(Type type, String issuerHostname, String mailbox, int peerId) {
-               this(type,issuerHostname,mailbox,peerId,-1,false,-1,-1);
-       }
-       /**
-        * Constructor, builds a new "have/request/piece" message
-        * @param type
-        * @param issuerHostname
-        * @param mailbox
-        * @param peerId
-        * @param index
-        */
-       public MessageTask(Type type, String issuerHostname, String mailbox, int peerId, int index) {
-               this(type,issuerHostname,mailbox,peerId,index,false,-1,-1);
-       }
-       /**
-        * Constructor, builds a new bitfield message
-        */
-       public MessageTask(Type type, String issuerHostname, String mailbox, int peerId, char bitfield[]) {
-               this(type,issuerHostname,mailbox,peerId,-1,false,-1,-1);
-               this.bitfield = bitfield;
-       }
-       /**
-        * Constructor, build a new "request"  message
-        */
-       public MessageTask(Type type, String issuerHostname, String mailbox, int peerId, int index, int blockIndex, int blockLength) {
-               this(type,issuerHostname,mailbox,peerId,index,false,blockIndex,blockLength);
-       }
-       /**
-        * Constructor, build a new "piece" message
-        */
-       public MessageTask(Type type, String issuerHostname, String mailbox, int peerId, int index, boolean stalled, int blockIndex, int blockLength) {
-               this.type = type;
-               this.issuerHostname = issuerHostname;
-               this.mailbox = mailbox;
-               this.peerId = peerId;
-               this.index = index;
-               this.stalled = stalled;
-               this.blockIndex = blockIndex;
-               this.blockLength = blockLength;
-       }       
+  public enum Type {
+    HANDSHAKE,
+    CHOKE,
+    UNCHOKE,
+    INTERESTED,
+    NOTINTERESTED,
+    HAVE,
+    BITFIELD,
+    REQUEST,
+    PIECE
+  };
+
+  public Type type;
+  public String issuerHostname;
+  public String mailbox;
+  public int peerId;
+  public char bitfield[];
+  public int index;
+  public int blockIndex;
+  public int blockLength;
+  public boolean stalled;
+
+  public MessageTask(Type type, String issuerHostname, String mailbox, int peerId) {
+    this(type,issuerHostname,mailbox,peerId,-1,false,-1,-1);
+  }
+
+  public MessageTask(Type type, String issuerHostname, String mailbox, int peerId, int index) {
+    this(type,issuerHostname,mailbox,peerId,index,false,-1,-1);
+  }
+
+  // builds a new bitfield message
+  public MessageTask(Type type, String issuerHostname, String mailbox, int peerId, char bitfield[]) {
+    this(type,issuerHostname,mailbox,peerId,-1,false,-1,-1);
+    this.bitfield = bitfield;
+  }
+
+  // build a new "request"  message
+  public MessageTask(Type type, String issuerHostname, String mailbox, int peerId, int index, int blockIndex,
+                     int blockLength) {
+    this(type,issuerHostname,mailbox,peerId,index,false,blockIndex,blockLength);
+  }
+
+  // build a new "piece" message
+  public MessageTask(Type type, String issuerHostname, String mailbox, int peerId, int index, boolean stalled,
+                     int blockIndex, int blockLength) {
+    this.type = type;
+    this.issuerHostname = issuerHostname;
+    this.mailbox = mailbox;
+    this.peerId = peerId;
+    this.index = index;
+    this.stalled = stalled;
+    this.blockIndex = blockIndex;
+    this.blockLength = blockLength;
+  }
 }
index 569e8b8..53fe246 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -11,678 +11,621 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map.Entry;
 
+import org.simgrid.msg.Msg;
 import org.simgrid.msg.Comm;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Task;
 import org.simgrid.msg.Process;
 import org.simgrid.msg.RngStream;
-import org.simgrid.msg.Task;
+import org.simgrid.msg.MsgException;
 
-/**
- * Main class for peers execution
- */
 public class Peer extends Process {
-       protected int round = 0;
-       
-       protected double beginReceiveTime;
-       protected double deadline;
-       
-       protected static RngStream stream = new RngStream();
-       
-       protected int id;
-       protected String mailbox;
-       protected String mailboxTracker;
-       protected String hostname;
-       protected int pieces = 0;
-       protected char[] bitfield = new char[Common.FILE_PIECES];
-       protected char[][] bitfieldBlocks = new char[Common.FILE_PIECES][Common.PIECES_BLOCKS];
-       
-       protected short[] piecesCount = new short[Common.FILE_PIECES];
-       
-       protected int piecesRequested = 0;
-       
-       protected ArrayList<Integer> currentPieces = new ArrayList<Integer>();
-       protected int currentPiece = -1;
-
-       protected HashMap<Integer, Connection> activePeers = new HashMap<Integer, Connection>();        
-       protected HashMap<Integer, Connection> peers = new HashMap<Integer, Connection>();
-       
-       protected Comm commReceived = null;
-
-       public Peer(Host host, String name, String[]args) {
-               super(host,name,args);
-       }       
-       
-       @Override
-       public void main(String[] args) throws MsgException {
-               //Check arguments
-               if (args.length != 3 && args.length != 2) {
-                       Msg.info("Wrong number of arguments");
-               }
-               if (args.length == 3) {
-                       init(Integer.valueOf(args[0]),true);
-               }
-               else {
-                       init(Integer.valueOf(args[0]),false);
-               }
-               //Retrieve the deadline
-               deadline = Double.valueOf(args[1]);
-               if (deadline < 0) {
-                       Msg.info("Wrong deadline supplied");
-                       return;
-               }
-               Msg.info("Hi, I'm joining the network with id " + id);
-               //Getting peer data from the tracker
-               if (getPeersData()) {
-                       Msg.debug("Got " + peers.size() + " peers from the tracker");
-                       Msg.debug("Here is my current status: " + getStatus());
-                       beginReceiveTime = Msg.getClock();                      
-                       if (hasFinished()) {
-                               pieces = Common.FILE_PIECES;
-                               sendHandshakeAll();
-                               seedLoop();
-                       }
-                       else {
-                               leechLoop();
-                               seedLoop();
-                       }
-               }
-               else {
-                       Msg.info("Couldn't contact the tracker.");
-               }
-               Msg.info("Here is my current status: " + getStatus());
-       }
-       /**
-        * Peer main loop when it is leeching.
-        */
-       private void leechLoop() {
-               double nextChokedUpdate = Msg.getClock() + Common.UPDATE_CHOKED_INTERVAL;
-               Msg.debug("Start downloading.");
-               /**
-                * Send a "handshake" message to all the peers it got
-                * (it couldn't have gotten more than 50 peers anyway)
-                */
-               sendHandshakeAll();
-               //Wait for at least one "bitfield" message.
-               waitForPieces();
-               Msg.debug("Starting main leech loop");
-               while (Msg.getClock() < deadline && pieces < Common.FILE_PIECES) {
-                       if (commReceived == null) {
-                               commReceived = Task.irecv(mailbox);
-                       }
-                       try {
-                               if (commReceived.test()) {
-                                       handleMessage(commReceived.getTask());
-                                       commReceived = null;
-                               }
-                               else {
-                                       //If the user has a pending interesting
-                                       if (currentPiece != -1) {
-                                               sendInterestedToPeers();
-                                       }
-                                       else {
-                                               if (currentPieces.size() < Common.MAX_PIECES) {
-                                                       updateCurrentPiece();
-                                               }
-                                       }
-                                       //We don't execute the choke algorithm if we don't already have a piece
-                                       if (Msg.getClock() >= nextChokedUpdate && pieces > 0) {
-                                               updateChokedPeers();
-                                               nextChokedUpdate += Common.UPDATE_CHOKED_INTERVAL;
-                                       }
-                                       else {
-                                               waitFor(1);
-                                       }
-                               }
-                       }
-                       catch (MsgException e) {
-                               commReceived = null;                            
-                       }
-               }
-       }
-       
-       /**
-        * Peer main loop when it is seeding
-        */
-       private void seedLoop() {
-               double nextChokedUpdate = Msg.getClock() + Common.UPDATE_CHOKED_INTERVAL;
-               Msg.debug("Start seeding.");
-               //start the main seed loop
-               while (Msg.getClock() < deadline) {
-                       if (commReceived == null) {
-                               commReceived = Task.irecv(mailbox);
-                       }
-                       try {
-                               if (commReceived.test()) {
-                                       handleMessage(commReceived.getTask());
-                                       commReceived = null;
-                               }
-                               else {
-                                       if (Msg.getClock() >= nextChokedUpdate) {
-                                               updateChokedPeers();
-                                               //TODO: Change the choked peer algorithm when seeding
-                                               nextChokedUpdate += Common.UPDATE_CHOKED_INTERVAL;
-                                       }
-                                       else {
-                                               waitFor(1);
-                                       }
-                               }
-                       }
-                       catch (MsgException e) {
-                               commReceived = null;                            
-                       }
-
-               }
-       }
-       
-       /**
-        * Initialize the various peer data
-        * @param id id of the peer to take in the network
-        * @param seed indicates if the peer is a seed
-        */
-       private void init(int id, boolean seed) {
-               this.id = id;
-               this.mailbox = Integer.toString(id);
-               this.mailboxTracker = "tracker_" + Integer.toString(id);
-               if (seed) {
-                       for (int i = 0; i < bitfield.length; i++) {
-                               bitfield[i] = '1';
-                               for (int j = 0; j < bitfieldBlocks[i].length; j++) {
-                                       bitfieldBlocks[i][j] = '1';
-                               }
-                       }
-               }
-               else {
-                       for (int i = 0; i < bitfield.length; i++) {
-                               bitfield[i] = '0';
-                               for (int j = 0; j < bitfieldBlocks[i].length; j++) {
-                                       bitfieldBlocks[i][j] = '0'      ;
-                               }
-                       }                       
-               }
-               this.hostname = getHost().getName();
-       }
-       /**
-        * Retrieves the peer list from the tracker
-        */
-       private boolean getPeersData() {
-               
-               boolean success = false, sendSuccess = false;
-               double timeout = Msg.getClock() + Common.GET_PEERS_TIMEOUT;
-               //Build the task to send to the tracker
-               TrackerTask taskSend = new TrackerTask(hostname, mailboxTracker, id);
-                       
-               while (!sendSuccess && Msg.getClock() < timeout) {
-                       try {
-                               Msg.debug("Sending a peer request to the tracker.");
-                               taskSend.send(Common.TRACKER_MAILBOX,Common.GET_PEERS_TIMEOUT);
-                               sendSuccess = true;
-                       }
-                       catch (MsgException e) {
-                               
-                       }
-               }
-               while (!success && Msg.getClock() < timeout) {
-                       commReceived = Task.irecv(this.mailboxTracker);
-                       try {
-                               commReceived.waitCompletion(Common.GET_PEERS_TIMEOUT);
-                               if (commReceived.getTask() instanceof TrackerTask) {
-                                       TrackerTask task = (TrackerTask)commReceived.getTask();
-                                       for (Integer peerId: task.peers) {
-                                               if (peerId != this.id) {
-                                                       peers.put(peerId, new Connection(peerId));
-                                               }       
-                                       }
-                                       success = true;
-                               }
-                       }
-                       catch (MsgException e) {
-                               
-                       }
-                       commReceived = null;
-               }
-               commReceived = null;
-               return success;
-       }
-       /**
-        * Handle a received message sent by another peer
-        * @param task task received.
-        */
-       void handleMessage(Task task) {
-               MessageTask message = (MessageTask)task;
-               Connection remotePeer = peers.get(message.peerId);
-               switch (message.type) {
-                       case HANDSHAKE:
-                               Msg.debug("Received a HANDSHAKE message from " + message.mailbox);
-                               //Check if the peer is in our connection list
-                               if (remotePeer == null) {
-                                       peers.put(message.peerId, new Connection(message.peerId));
-                                       sendHandshake(message.mailbox);
-                               }
-                               //Send our bitfield to the pair
-                               sendBitfield(message.mailbox);
-                       break;
-                       case BITFIELD:
-                               Msg.debug("Received a BITFIELD message from " + message.peerId + " (" + message.issuerHostname + ")");
-                               //update the pieces list
-                               updatePiecesCountFromBitfield(message.bitfield);
-                               //Update the current piece
-                               if (currentPiece == -1 && pieces < Common.FILE_PIECES && currentPieces.size() < Common.MAX_PIECES) {
-                                       updateCurrentPiece();
-                               }                               
-                               remotePeer.bitfield  = message.bitfield.clone();
-                       break;
-                       case INTERESTED:
-                               Msg.debug("Received an INTERESTED message from " + message.peerId + " (" + message.issuerHostname + ")");
-                               assert remotePeer != null;
-                               remotePeer.interested = true;
-                       break;
-                       case NOTINTERESTED:
-                               Msg.debug("Received a NOTINTERESTED message from " + message.peerId + " (" + message.issuerHostname + ")");
-                               assert remotePeer != null;
-                               remotePeer.interested = false;
-                       break;
-                       case UNCHOKE:
-                               Msg.debug("Received an UNCHOKE message from " + message.peerId + "(" + message.issuerHostname + ")");
-                               assert remotePeer != null;
-                               remotePeer.chokedDownload = false;
-                               activePeers.put(remotePeer.id,remotePeer);
-                               sendRequestsToPeer(remotePeer);
-                       break;
-                       case CHOKE:
-                               Msg.debug("Received a CHOKE message from " + message.peerId + " (" + message.issuerHostname + ")");
-                               assert remotePeer != null;
-                               remotePeer.chokedDownload = true;
-                               activePeers.remove(remotePeer.id);
-                       break;
-                       case HAVE:
-                               if (remotePeer.bitfield == null) {
-                                       return;
-                               }
-                               Msg.debug("Received a HAVE message from " + message.peerId + " (" + message.issuerHostname + ")");
-                               assert message.index >= 0 && message.index < Common.FILE_PIECES;
-                               assert remotePeer.bitfield != null;
-                               remotePeer.bitfield[message.index] = '1';
-                               piecesCount[message.index]++; 
-                               //Send interested message to the peer if he has what we want
-                               if (!remotePeer.amInterested && currentPieces.contains(message.index) ) {
-                                       remotePeer.amInterested = true;
-                                       sendInterested(remotePeer.mailbox);
-                               }
-                               
-                               if (currentPieces.contains(message.index)) {
-                                       int blockIndex = getFirstBlock(message.index);                  
-                                       int blockLength = Common.PIECES_BLOCKS - blockIndex ;
-                                       blockLength = blockLength > Common.BLOCKS_REQUESTED ? Common.BLOCKS_REQUESTED : blockLength;            
-                                       sendRequest(message.mailbox,message.index,blockIndex,blockLength);
-                               }
-                       break;
-                       case REQUEST:
-                               assert message.index >= 0 && message.index < Common.FILE_PIECES;
-                               if (!remotePeer.chokedUpload) {
-                                       Msg.debug("Received a REQUEST from " + message.peerId + "(" + message.issuerHostname + ") for " + message.peerId);
-                                       if (bitfield[message.index] == '1') {
-                                               sendPiece(message.mailbox,message.index,false,message.blockIndex,message.blockLength);  
-                                       }
-                                       else {
-                                               Msg.debug("Received a REQUEST from " + message.peerId + " (" + message.issuerHostname + ") but he is choked" );
-                                       }
-                               }
-                       break;
-                       case PIECE:
-                               if (message.stalled) {
-                                       Msg.debug("The received piece " + message.index + " from " + message.peerId + " (" + message.issuerHostname + ") is stalled");
-                               }
-                               else {
-                                       Msg.debug("Received piece " + message.index + " from " + message.peerId + " (" + message.issuerHostname + ")");
-                                       if (bitfield[message.index] == '0') {
-                                               updateBitfieldBlocks(message.index,message.blockIndex,message.blockLength);
-                                               if (pieceComplete(message.index)) {
-                                                       piecesRequested--;
-                                                       //Removing the piece from our piece list.
-                                                       if (!currentPieces.remove((Object)Integer.valueOf(message.index))) {
-                                                       }
-                                                       //Setting the fact that we have the piece
-                                                       bitfield[message.index] = '1';
-                                                       pieces++;
-                                                       Msg.debug("My status is now " + getStatus());
-                                                       //Sending the information to all the peers we are connected to
-                                                       sendHave(message.index);
-                                                       //sending UNINTERESTED to peers that doesn't have what we want.
-                                                       updateInterestedAfterReceive();
-                                               }
-                                       }
-                                       else {
-                                               Msg.debug("However, we already have it.");
-                                       }
-                               }
-                       break;
-               }
-               if (remotePeer != null) {
-                       remotePeer.addSpeedValue(1 / (Msg.getClock() - beginReceiveTime));
-               }
-               beginReceiveTime = Msg.getClock();
-       }
-       /**
-        * Wait for the node to receive interesting bitfield messages (ie: non empty)
-        * to be received
-        */
-       void waitForPieces() {
-               boolean finished = false;
-               while (Msg.getClock() < deadline && !finished) {
-                       if (commReceived == null) {
-                               commReceived = Task.irecv(mailbox);
-                       }
-                       try {
-                               commReceived.waitCompletion(Common.TIMEOUT_MESSAGE);
-                               handleMessage(commReceived.getTask());
-                               if (currentPiece != -1) {
-                                       finished = true;
-                               }
-                               commReceived = null;
-                       }
-                       catch (MsgException e) {
-                               commReceived = null;
-                       }
-               }
-       }
-       
-       private boolean hasFinished() {
-               for (int i = 0; i < bitfield.length; i++) {
-                       if (bitfield[i] == '1') {
-                               return true;
-                       }
-               }
-               return false;
-       }
-       /**
-        * Updates the list of who has a piece from a bitfield
-        * @param bitfield bitfield
-        */
-       private void updatePiecesCountFromBitfield(char bitfield[]) {
-               for (int i = 0; i < Common.FILE_PIECES; i++) {
-                       if (bitfield[i] == '1') {
-                               piecesCount[i]++;
-                       }
-               }
-       }
-       /**
-        * Update the piece the peer is currently interested in.
-        * There is two cases (as described in "Bittorrent Architecture Protocol", Ryan Toole :
-        * If the peer has less than 3 pieces, he chooses a piece at random.
-        * If the peer has more than pieces, he downloads the pieces that are the less
-        * replicated
-        */
-       void updateCurrentPiece() {
-               if (currentPieces.size() >= (Common.FILE_PIECES - pieces)) {
-                       return;
-               }
-               if (true || pieces < 3) {
-                       int peerPiece;
-                       do {
-                               currentPiece = stream.randInt(0,Common.FILE_PIECES - 1);
-                       } while (!(bitfield[currentPiece] == '0' && !currentPieces.contains(currentPiece)));
-               }
-               else {
-                       //trivial min algorithm.
-                       //TODO
-               }
-               currentPieces.add(currentPiece);
-               Msg.debug("New interested piece: " + currentPiece);
-               assert currentPiece >= 0 && currentPiece < Common.FILE_PIECES;
-       }
-       /**
-        * Update the list of current choked and unchoked peers, using the
-        * choke algorithm
-        */
-       private void updateChokedPeers() {
-               round = (round + 1) % 3;
-               if (peers.size() == 0) {
-                       return;
-               }
-               //remove a peer from the list
-               Iterator<Entry<Integer, Connection>> it = activePeers.entrySet().iterator();
-               if (it.hasNext()) {
-                       Entry<Integer,Connection> e = it.next();
-                       Connection peerChoked = e.getValue();
-                       peerChoked.chokedUpload = true;
-                       sendChoked(peerChoked.mailbox);
-                       activePeers.remove(e.getKey());
-               }
-               Connection peerChoosed = null;
-               //Separate the case from when the peer is seeding.
-               if (pieces == Common.FILE_PIECES) {
-                       //Find the last unchoked peer.
-                       double unchokeTime = deadline + 1;
-                       for (Connection connection : peers.values()) {
-                               if (connection.lastUnchoke < unchokeTime && connection.interested) {
-                                       peerChoosed = connection;
-                                       unchokeTime = connection.lastUnchoke;
-                               }
-                       }
-               }
-               else {
-                       //Random optimistic unchoking
-                       if (round == 0) {
-                               int j = 0, i;
-                               do {
-                                       i = 0;
-                                       int idChosen = stream.randInt(0,peers.size() - 1);
-                                       for (Connection connection : peers.values()) {
-                                               if (i == idChosen) {
-                                                       peerChoosed = connection;
-                                                       break;
-                                               }
-                                               i++;
-                                       } //TODO: Not really the best way ever
-                                       if (!peerChoosed.interested) {
-                                               peerChoosed = null;
-                                       }
-                                       j++;
-                               } while (peerChoosed == null && j < Common.MAXIMUM_PEERS);
-                       }
-                       else {
-                               Connection fastest = null;
-                               double fastestSpeed = 0;
-                               for (Connection c : peers.values()) {
-                                       if (c.peerSpeed > fastestSpeed && c.interested && c.chokedUpload) {
-                                               fastest = c;
-                                               fastestSpeed = c.peerSpeed;
-                                       }
-                               }
-                               peerChoosed = fastest;
-                       }
-               }
-               if (peerChoosed != null) {
-                       activePeers.put(peerChoosed.id,peerChoosed);
-                       peerChoosed.chokedUpload = false;
-                       peerChoosed.lastUnchoke = Msg.getClock();
-                       sendUnchoked(peerChoosed.mailbox);
-               }
-       }
-       /**     
-        * Updates our "interested" state about peers: send "not interested" to peers
-        * that don't have any more pieces we want.
-        */
-       private void updateInterestedAfterReceive() {
-               boolean interested;
-               for (Connection connection : peers.values()) {
-                       interested = false;
-                       if (connection.amInterested) {
-                               for (Integer piece : currentPieces) {
-                                       if (connection.bitfield[piece] == '1') {
-                                               interested = true;
-                                               break;
-                                       }
-                               }       
-                               if (!interested) {
-                                       connection.amInterested = false;
-                                       sendNotInterested(connection.mailbox);
-                               }
-                       }
-               }
-       }
-       private void updateBitfieldBlocks(int index, int blockIndex, int blockLength) {
-               for (int i = blockIndex; i < (blockIndex + blockLength); i++) {
-                       bitfieldBlocks[index][i] = '1';
-               }
-       }
-       /**
-        * Returns if a piece is complete in the peer's bitfield.
-        * @param index the index of the piece.
-        */
-       private boolean pieceComplete(int index) {
-               for (int i = 0; i < bitfieldBlocks[index].length; i++) {
-                       if (bitfieldBlocks[index][i] == '0') {
-                               return false;
-                       }
-               }
-               return true;
-       }
-       /**
-        * Returns the first block of a piece that we don't have. 
-        */
-       private int getFirstBlock(int piece) {
-               int blockIndex = -1;
-               for (int i = 0; i < Common.PIECES_BLOCKS; i++) {
-                       if (bitfieldBlocks[piece][i] == '0') {
-                               blockIndex = i;
-                               break;
-                       }
-               }       
-               return blockIndex;
-       }
-       /**
-        * Send request messages to a peer that have unchoked us
-        * @param remotePeer peer data to the peer we want to send the request
-        */
-       private void sendRequestsToPeer(Connection remotePeer) {
-               if (remotePeer.bitfield == null) {
-                       return;
-               }
-               for (Integer piece : currentPieces) {
-                       //Getting the block to send.    
-                       int blockIndex = -1, blockLength = 0;
-                       blockIndex = getFirstBlock(piece);                      
-                       blockLength = Common.PIECES_BLOCKS - blockIndex ;
-                       blockLength = blockLength > Common.BLOCKS_REQUESTED ? Common.BLOCKS_REQUESTED : blockLength;            
-                       if (remotePeer.bitfield[piece] == '1') {
-                               sendRequest(remotePeer.mailbox, piece, blockIndex, blockLength);
-                       }                       
-               }
-       }       
-       /**
-        * Find the peers that have the current interested piece and send them
-        * the "interested" message
-        */
-       private void sendInterestedToPeers() {
-               if (currentPiece == -1) {
-                       return;
-               }
-               for (Connection connection : peers.values()) {
-                       if (connection.bitfield != null && connection.bitfield[currentPiece] == '1' && !connection.amInterested) {
-                               connection.amInterested = true;                         
-                               MessageTask task = new MessageTask(MessageTask.Type.INTERESTED, hostname, this.mailbox, this.id);
-                               task.dsend(connection.mailbox);                         
-                       }
-               }
-               currentPiece = -1;
-               piecesRequested++;
-       }
-       /**
-        * Send a "interested" message to a peer.
-        */
-       private void sendInterested(String mailbox) {
-               MessageTask task = new MessageTask(MessageTask.Type.INTERESTED, hostname, this.mailbox, this.id);
-               task.dsend(mailbox);                                            
-       }
-       /**
-        * Send a "not interested" message to a peer
-        * @param mailbox mailbox destination mailbox
-        */
-       private void sendNotInterested(String mailbox) {
-               MessageTask task = new MessageTask(MessageTask.Type.NOTINTERESTED, hostname, this.mailbox, this.id);
-               task.dsend(mailbox);                            
-       }
-       /**
-        * Send a handshake message to all the peers the peer has.
-        * @param peer peer data
-        */
-       private void sendHandshakeAll() {
-               for (Connection remotePeer : peers.values()) {
-                       MessageTask task = new MessageTask(MessageTask.Type.HANDSHAKE, hostname, mailbox,
-                       id);
-                       task.dsend(remotePeer.mailbox);
-               }
-       }
-       /**
-        * Send a "handshake" message to an user
-        * @param mailbox mailbox where to we send the message
-        */
-       private void sendHandshake(String mailbox) {
-               Msg.debug("Sending a HANDSHAKE to " + mailbox);
-               MessageTask task = new MessageTask(MessageTask.Type.HANDSHAKE, hostname, this.mailbox, this.id);
-               task.dsend(mailbox);            
-       }
-       /**
-        * Send a "choked" message to a peer
-        */
-       private void sendChoked(String mailbox) {
-               Msg.debug("Sending a CHOKE to " + mailbox);
-               MessageTask task = new MessageTask(MessageTask.Type.CHOKE, hostname, this.mailbox, this.id);
-               task.dsend(mailbox);
-       }
-       /**
-        * Send a "unchoked" message to a peer
-        */
-       private void sendUnchoked(String mailbox) {
-               Msg.debug("Sending a UNCHOKE to " + mailbox);
-               MessageTask task = new MessageTask(MessageTask.Type.UNCHOKE, hostname, this.mailbox, this.id);
-               task.dsend(mailbox);
-       }
-       /**
-        * Send a "HAVE" message to all peers we are connected to
-        */
-       private void sendHave(int piece) {
-               Msg.debug("Sending HAVE message to all my peers");
-               for (Connection remotePeer : peers.values()) {
-                       MessageTask task = new MessageTask(MessageTask.Type.HAVE, hostname, this.mailbox, this.id, piece);
-                       task.dsend(remotePeer.mailbox);
-               }
-       }
-       /**
-        * Send a bitfield message to all the peers the peer has.
-        * @param peer peer data
-        */
-       private void sendBitfield(String mailbox) {
-               Msg.debug("Sending a BITFIELD to " + mailbox);
-               MessageTask task = new MessageTask(MessageTask.Type.BITFIELD, hostname, this.mailbox, this.id, this.bitfield);
-               task.dsend(mailbox);
-       }
-       /**
-        * Send a "request" message to a pair, containing a request for a piece
-        */
-       private void sendRequest(String mailbox, int piece, int blockIndex, int blockLength) {
-               Msg.debug("Sending a REQUEST to " + mailbox + " for piece " + piece + " and blocks " + blockIndex + "," + (blockIndex + blockLength));
-               MessageTask task = new MessageTask(MessageTask.Type.REQUEST, hostname, this.mailbox, this.id, piece, blockIndex, blockLength);
-               task.dsend(mailbox);
-       }
-       /**
-        * Send a "piece" message to a pair, containing a piece of the file
-        */
-       private void sendPiece(String mailbox, int piece, boolean stalled, int blockIndex, int blockLength) {
-               Msg.debug("Sending the PIECE " + piece + " to " + mailbox);
-               MessageTask task = new MessageTask(MessageTask.Type.PIECE, hostname, this.mailbox, this.id, piece, stalled, blockIndex, blockLength);
-               task.dsend(mailbox);
-       }
-       
-       private String getStatus() {
-               String s = "";
-               for (int i = 0; i < Common.FILE_PIECES; i++) {
-                       s = s + bitfield[i];
-               }
-               return s;
-       }
+  protected int round = 0;
+  protected double beginReceiveTime;
+  protected double deadline;
+  protected static RngStream stream = new RngStream();
+  protected int id;
+  protected String mailbox;
+  protected String mailboxTracker;
+  protected String hostname;
+  protected int pieces = 0;
+  protected char[] bitfield = new char[Common.FILE_PIECES];
+  protected char[][] bitfieldBlocks = new char[Common.FILE_PIECES][Common.PIECES_BLOCKS];
+  protected short[] piecesCount = new short[Common.FILE_PIECES];
+  protected int piecesRequested = 0;
+  protected ArrayList<Integer> currentPieces = new ArrayList<Integer>();
+  protected int currentPiece = -1;
+  protected HashMap<Integer, Connection> activePeers = new HashMap<Integer, Connection>();  
+  protected HashMap<Integer, Connection> peers = new HashMap<Integer, Connection>();
+  protected Comm commReceived = null;
+
+  public Peer(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  @Override
+  public void main(String[] args) throws MsgException {
+    //Check arguments
+    if (args.length != 3 && args.length != 2) {
+      Msg.info("Wrong number of arguments");
+    }
+    if (args.length == 3) {
+      init(Integer.valueOf(args[0]),true);
+    } else {
+      init(Integer.valueOf(args[0]),false);
+    }
+    //Retrieve the deadline
+    deadline = Double.valueOf(args[1]);
+    if (deadline < 0) {
+      Msg.info("Wrong deadline supplied");
+      return;
+    }
+    Msg.info("Hi, I'm joining the network with id " + id);
+    //Getting peer data from the tracker
+    if (getPeersData()) {
+      Msg.debug("Got " + peers.size() + " peers from the tracker");
+      Msg.debug("Here is my current status: " + getStatus());
+      beginReceiveTime = Msg.getClock();      
+      if (hasFinished()) {
+        pieces = Common.FILE_PIECES;
+        sendHandshakeAll();
+        seedLoop();
+      } else {
+        leechLoop();
+        seedLoop();
+      }
+    } else {
+      Msg.info("Couldn't contact the tracker.");
+    }
+    Msg.info("Here is my current status: " + getStatus());
+  }
+
+  private void leechLoop() {
+    double nextChokedUpdate = Msg.getClock() + Common.UPDATE_CHOKED_INTERVAL;
+    Msg.debug("Start downloading.");
+    // Send a "handshake" message to all the peers it got(it couldn't have gotten more than 50 peers anyway)
+    sendHandshakeAll();
+    //Wait for at least one "bitfield" message.
+    waitForPieces();
+    Msg.debug("Starting main leech loop");
+    while (Msg.getClock() < deadline && pieces < Common.FILE_PIECES) {
+      if (commReceived == null) {
+        commReceived = Task.irecv(mailbox);
+      }
+      try {
+        if (commReceived.test()) {
+          handleMessage(commReceived.getTask());
+          commReceived = null;
+        } else {
+          //If the user has a pending interesting
+          if (currentPiece != -1) {
+            sendInterestedToPeers();
+          } else {
+            if (currentPieces.size() < Common.MAX_PIECES) {
+              updateCurrentPiece();
+            }
+          }
+          //We don't execute the choke algorithm if we don't already have a piece
+          if (Msg.getClock() >= nextChokedUpdate && pieces > 0) {
+            updateChokedPeers();
+            nextChokedUpdate += Common.UPDATE_CHOKED_INTERVAL;
+          } else {
+            waitFor(1);
+          }
+        }
+      }
+      catch (MsgException e) {
+        commReceived = null;
+      }
+    }
+  }
+
+  private void seedLoop() {
+    double nextChokedUpdate = Msg.getClock() + Common.UPDATE_CHOKED_INTERVAL;
+    Msg.debug("Start seeding.");
+    //start the main seed loop
+    while (Msg.getClock() < deadline) {
+      if (commReceived == null) {
+        commReceived = Task.irecv(mailbox);
+      }
+      try {
+        if (commReceived.test()) {
+          handleMessage(commReceived.getTask());
+          commReceived = null;
+        } else {
+          if (Msg.getClock() >= nextChokedUpdate) {
+            updateChokedPeers();
+            //TODO: Change the choked peer algorithm when seeding
+            nextChokedUpdate += Common.UPDATE_CHOKED_INTERVAL;
+          } else {
+            waitFor(1);
+          }
+        }
+      }
+      catch (MsgException e) {
+        commReceived = null;
+      }
+    }
+  }
+
+  /**
+   * @brief Initialize the various peer data
+   * @param id id of the peer to take in the network
+   * @param seed indicates if the peer is a seed
+   */
+  private void init(int id, boolean seed) {
+    this.id = id;
+    this.mailbox = Integer.toString(id);
+    this.mailboxTracker = "tracker_" + Integer.toString(id);
+    if (seed) {
+      for (int i = 0; i < bitfield.length; i++) {
+        bitfield[i] = '1';
+        for (int j = 0; j < bitfieldBlocks[i].length; j++) {
+          bitfieldBlocks[i][j] = '1';
+        }
+      }
+    } else {
+      for (int i = 0; i < bitfield.length; i++) {
+        bitfield[i] = '0';
+        for (int j = 0; j < bitfieldBlocks[i].length; j++) {
+          bitfieldBlocks[i][j] = '0'  ;
+        }
+      }
+    }
+    this.hostname = getHost().getName();
+  }
+
+  private boolean getPeersData() {
+    boolean success = false, sendSuccess = false;
+    double timeout = Msg.getClock() + Common.GET_PEERS_TIMEOUT;
+    //Build the task to send to the tracker
+    TrackerTask taskSend = new TrackerTask(hostname, mailboxTracker, id);
+
+    while (!sendSuccess && Msg.getClock() < timeout) {
+      try {
+        Msg.debug("Sending a peer request to the tracker.");
+        taskSend.send(Common.TRACKER_MAILBOX,Common.GET_PEERS_TIMEOUT);
+        sendSuccess = true;
+      }
+      catch (MsgException e) {
+      }
+    }
+    while (!success && Msg.getClock() < timeout) {
+      commReceived = Task.irecv(this.mailboxTracker);
+      try {
+        commReceived.waitCompletion(Common.GET_PEERS_TIMEOUT);
+        if (commReceived.getTask() instanceof TrackerTask) {
+          TrackerTask task = (TrackerTask)commReceived.getTask();
+          for (Integer peerId: task.peers) {
+            if (peerId != this.id) {
+              peers.put(peerId, new Connection(peerId));
+            }
+          }
+          success = true;
+        }
+      }
+      catch (MsgException e) {}
+      commReceived = null;
+    }
+    commReceived = null;
+    return success;
+  }
+
+  void handleMessage(Task task) {
+    MessageTask message = (MessageTask)task;
+    Connection remotePeer = peers.get(message.peerId);
+    switch (message.type) {
+      case HANDSHAKE:
+        Msg.debug("Received a HANDSHAKE message from " + message.mailbox);
+        //Check if the peer is in our connection list
+        if (remotePeer == null) {
+          peers.put(message.peerId, new Connection(message.peerId));
+          sendHandshake(message.mailbox);
+        }
+        //Send our bitfield to the pair
+        sendBitfield(message.mailbox);
+      break;
+      case BITFIELD:
+        Msg.debug("Received a BITFIELD message from " + message.peerId + " (" + message.issuerHostname + ")");
+        //update the pieces list
+        updatePiecesCountFromBitfield(message.bitfield);
+        //Update the current piece
+        if (currentPiece == -1 && pieces < Common.FILE_PIECES && currentPieces.size() < Common.MAX_PIECES) {
+          updateCurrentPiece();
+        }
+        remotePeer.bitfield  = message.bitfield.clone();
+      break;
+      case INTERESTED:
+        Msg.debug("Received an INTERESTED message from " + message.peerId + " (" + message.issuerHostname + ")");
+        assert remotePeer != null;
+        remotePeer.interested = true;
+      break;
+      case NOTINTERESTED:
+        Msg.debug("Received a NOTINTERESTED message from " + message.peerId + " (" + message.issuerHostname + ")");
+        assert remotePeer != null;
+        remotePeer.interested = false;
+      break;
+      case UNCHOKE:
+        Msg.debug("Received an UNCHOKE message from " + message.peerId + "(" + message.issuerHostname + ")");
+        assert remotePeer != null;
+        remotePeer.chokedDownload = false;
+        activePeers.put(remotePeer.id,remotePeer);
+        sendRequestsToPeer(remotePeer);
+      break;
+      case CHOKE:
+        Msg.debug("Received a CHOKE message from " + message.peerId + " (" + message.issuerHostname + ")");
+        assert remotePeer != null;
+        remotePeer.chokedDownload = true;
+        activePeers.remove(remotePeer.id);
+      break;
+      case HAVE:
+        if (remotePeer.bitfield == null) {
+          return;
+        }
+        Msg.debug("Received a HAVE message from " + message.peerId + " (" + message.issuerHostname + ")");
+        assert message.index >= 0 && message.index < Common.FILE_PIECES;
+        assert remotePeer.bitfield != null;
+        remotePeer.bitfield[message.index] = '1';
+        piecesCount[message.index]++; 
+        //Send interested message to the peer if he has what we want
+        if (!remotePeer.amInterested && currentPieces.contains(message.index) ) {
+          remotePeer.amInterested = true;
+          sendInterested(remotePeer.mailbox);
+        }
+        
+        if (currentPieces.contains(message.index)) {
+          int blockIndex = getFirstBlock(message.index);      
+          int blockLength = Common.PIECES_BLOCKS - blockIndex ;
+          blockLength = blockLength > Common.BLOCKS_REQUESTED ? Common.BLOCKS_REQUESTED : blockLength;    
+          sendRequest(message.mailbox,message.index,blockIndex,blockLength);
+        }
+      break;
+      case REQUEST:
+        assert message.index >= 0 && message.index < Common.FILE_PIECES;
+        if (!remotePeer.chokedUpload) {
+          Msg.debug("Received a REQUEST from " + message.peerId + "(" + message.issuerHostname + ") for " 
+                    + message.peerId);
+          if (bitfield[message.index] == '1') {
+            sendPiece(message.mailbox,message.index,false,message.blockIndex,message.blockLength);  
+          } else {
+            Msg.debug("Received a REQUEST from " + message.peerId + " (" + message.issuerHostname 
+                      + ") but he is choked" );
+          }
+        }
+      break;
+      case PIECE:
+        if (message.stalled) {
+          Msg.debug("The received piece " + message.index + " from " + message.peerId + " (" + message.issuerHostname 
+                    + ") is stalled");
+        } else {
+          Msg.debug("Received piece " + message.index + " from " + message.peerId + " (" 
+                    + message.issuerHostname + ")");
+          if (bitfield[message.index] == '0') {
+            updateBitfieldBlocks(message.index,message.blockIndex,message.blockLength);
+            if (pieceComplete(message.index)) {
+              piecesRequested--;
+              //Removing the piece from our piece list.
+              currentPieces.remove((Object)Integer.valueOf(message.index));
+              //Setting the fact that we have the piece
+              bitfield[message.index] = '1';
+              pieces++;
+              Msg.debug("My status is now " + getStatus());
+              //Sending the information to all the peers we are connected to
+              sendHave(message.index);
+              //sending UNINTERESTED to peers that doesn't have what we want.
+              updateInterestedAfterReceive();
+            }
+          } else {
+            Msg.debug("However, we already have it.");
+          }
+        }
+      break;
+    }
+    if (remotePeer != null) {
+      remotePeer.addSpeedValue(1 / (Msg.getClock() - beginReceiveTime));
+    }
+    beginReceiveTime = Msg.getClock();
+  }
+
+  void waitForPieces() {
+    boolean finished = false;
+    while (Msg.getClock() < deadline && !finished) {
+      if (commReceived == null) {
+        commReceived = Task.irecv(mailbox);
+      }
+      try {
+        commReceived.waitCompletion(Common.TIMEOUT_MESSAGE);
+        handleMessage(commReceived.getTask());
+        if (currentPiece != -1) {
+          finished = true;
+        }
+        commReceived = null;
+      }
+      catch (MsgException e) {
+        commReceived = null;
+      }
+    }
+  }
+
+  private boolean hasFinished() {
+    for (int i = 0; i < bitfield.length; i++) {
+      if (bitfield[i] == '1') {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * @brief Updates the list of who has a piece from a bitfield
+   * @param bitfield bitfield
+   */
+  private void updatePiecesCountFromBitfield(char bitfield[]) {
+    for (int i = 0; i < Common.FILE_PIECES; i++) {
+      if (bitfield[i] == '1') {
+        piecesCount[i]++;
+      }
+    }
+  }
+
+  /**
+   * Update the piece the peer is currently interested in.
+   * There is two cases (as described in "Bittorrent Architecture Protocol", Ryan Toole :
+   * If the peer has less than 3 pieces, he chooses a piece at random.
+   * If the peer has more than pieces, he downloads the pieces that are the less
+   * replicated
+   */
+  void updateCurrentPiece() {
+    if (currentPieces.size() >= (Common.FILE_PIECES - pieces)) {
+      return;
+    }
+    if (true || pieces < 3) {
+      int peerPiece;
+      do {
+        currentPiece = stream.randInt(0,Common.FILE_PIECES - 1);
+      } while (!(bitfield[currentPiece] == '0' && !currentPieces.contains(currentPiece)));
+    }
+    else {
+      //trivial min algorithm.
+      //TODO
+    }
+    currentPieces.add(currentPiece);
+    Msg.debug("New interested piece: " + currentPiece);
+    assert currentPiece >= 0 && currentPiece < Common.FILE_PIECES;
+  }
+
+  // Update the list of current choked and unchoked peers, using the choke algorithm
+  private void updateChokedPeers() {
+    round = (round + 1) % 3;
+    if (peers.size() == 0) {
+      return;
+    }
+    //remove a peer from the list
+    Iterator<Entry<Integer, Connection>> it = activePeers.entrySet().iterator();
+    if (it.hasNext()) {
+      Entry<Integer,Connection> e = it.next();
+      Connection peerChoked = e.getValue();
+      peerChoked.chokedUpload = true;
+      sendChoked(peerChoked.mailbox);
+      activePeers.remove(e.getKey());
+    }
+    Connection peerChoosed = null;
+    //Separate the case from when the peer is seeding.
+    if (pieces == Common.FILE_PIECES) {
+      //Find the last unchoked peer.
+      double unchokeTime = deadline + 1;
+      for (Connection connection : peers.values()) {
+        if (connection.lastUnchoke < unchokeTime && connection.interested) {
+          peerChoosed = connection;
+          unchokeTime = connection.lastUnchoke;
+        }
+      }
+    } else {
+      //Random optimistic unchoking
+      if (round == 0) {
+        int j = 0, i;
+        do {
+          i = 0;
+          int idChosen = stream.randInt(0,peers.size() - 1);
+          for (Connection connection : peers.values()) {
+            if (i == idChosen) {
+              peerChoosed = connection;
+              break;
+            }
+            i++;
+          } //TODO: Not really the best way ever
+          if (!peerChoosed.interested) {
+            peerChoosed = null;
+          }
+          j++;
+        } while (peerChoosed == null && j < Common.MAXIMUM_PEERS);
+      } else {
+        Connection fastest = null;
+        double fastestSpeed = 0;
+        for (Connection c : peers.values()) {
+          if (c.peerSpeed > fastestSpeed && c.interested && c.chokedUpload) {
+            fastest = c;
+            fastestSpeed = c.peerSpeed;
+          }
+        }
+        peerChoosed = fastest;
+      }
+    }
+    if (peerChoosed != null) {
+      activePeers.put(peerChoosed.id,peerChoosed);
+      peerChoosed.chokedUpload = false;
+      peerChoosed.lastUnchoke = Msg.getClock();
+      sendUnchoked(peerChoosed.mailbox);
+    }
+  }
+
+  // Updates our "interested" state about peers: send "not interested" to peers that don't have any more pieces we want.
+  private void updateInterestedAfterReceive() {
+    boolean interested;
+    for (Connection connection : peers.values()) {
+      interested = false;
+      if (connection.amInterested) {
+        for (Integer piece : currentPieces) {
+          if (connection.bitfield[piece] == '1') {
+            interested = true;
+            break;
+          }
+        }
+        if (!interested) {
+          connection.amInterested = false;
+          sendNotInterested(connection.mailbox);
+        }
+      }
+    }
+  }
+
+  private void updateBitfieldBlocks(int index, int blockIndex, int blockLength) {
+    for (int i = blockIndex; i < (blockIndex + blockLength); i++) {
+      bitfieldBlocks[index][i] = '1';
+    }
+  }
+
+  // Returns if a piece is complete in the peer's bitfield.
+  private boolean pieceComplete(int index) {
+    for (int i = 0; i < bitfieldBlocks[index].length; i++) {
+      if (bitfieldBlocks[index][i] == '0') {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  // Returns the first block of a piece that we don't have. 
+  private int getFirstBlock(int piece) {
+    int blockIndex = -1;
+    for (int i = 0; i < Common.PIECES_BLOCKS; i++) {
+      if (bitfieldBlocks[piece][i] == '0') {
+        blockIndex = i;
+        break;
+      }
+    }
+    return blockIndex;
+  }
+
+  /**
+   * @brief Send request messages to a peer that have unchoked us
+   * @param remotePeer peer data to the peer we want to send the request
+   */
+  private void sendRequestsToPeer(Connection remotePeer) {
+    if (remotePeer.bitfield == null) {
+      return;
+    }
+    for (Integer piece : currentPieces) {
+      //Getting the block to send.  
+      int blockIndex = -1, blockLength = 0;
+      blockIndex = getFirstBlock(piece);      
+      blockLength = Common.PIECES_BLOCKS - blockIndex ;
+      blockLength = blockLength > Common.BLOCKS_REQUESTED ? Common.BLOCKS_REQUESTED : blockLength;    
+      if (remotePeer.bitfield[piece] == '1') {
+        sendRequest(remotePeer.mailbox, piece, blockIndex, blockLength);
+      }
+    }
+  }
+
+  // Find the peers that have the current interested piece and send them the "interested" message
+  private void sendInterestedToPeers() {
+    if (currentPiece == -1) {
+      return;
+    }
+    for (Connection connection : peers.values()) {
+      if (connection.bitfield != null && connection.bitfield[currentPiece] == '1' && !connection.amInterested) {
+        connection.amInterested = true;        
+        MessageTask task = new MessageTask(MessageTask.Type.INTERESTED, hostname, this.mailbox, this.id);
+        task.dsend(connection.mailbox);        
+      }
+    }
+    currentPiece = -1;
+    piecesRequested++;
+  }
+
+  // Send a "interested" message to a peer.
+  private void sendInterested(String mailbox) {
+    MessageTask task = new MessageTask(MessageTask.Type.INTERESTED, hostname, this.mailbox, this.id);
+    task.dsend(mailbox);
+  }
+
+  /**
+   * @brief Send a "not interested" message to a peer
+   * @param mailbox mailbox destination mailbox
+   */
+  private void sendNotInterested(String mailbox) {
+    MessageTask task = new MessageTask(MessageTask.Type.NOTINTERESTED, hostname, this.mailbox, this.id);
+    task.dsend(mailbox);
+  }
+
+  // Send a handshake message to all the peers the peer has.
+  private void sendHandshakeAll() {
+    for (Connection remotePeer : peers.values()) {
+      MessageTask task = new MessageTask(MessageTask.Type.HANDSHAKE, hostname, mailbox, id);
+      task.dsend(remotePeer.mailbox);
+    }
+  }
+
+  /**
+   * @brief Send a "handshake" message to an user
+   * @param mailbox mailbox where to we send the message
+   */
+  private void sendHandshake(String mailbox) {
+    Msg.debug("Sending a HANDSHAKE to " + mailbox);
+    MessageTask task = new MessageTask(MessageTask.Type.HANDSHAKE, hostname, this.mailbox, this.id);
+    task.dsend(mailbox);
+  }
+
+  // Send a "choked" message to a peer
+  private void sendChoked(String mailbox) {
+    Msg.debug("Sending a CHOKE to " + mailbox);
+    MessageTask task = new MessageTask(MessageTask.Type.CHOKE, hostname, this.mailbox, this.id);
+    task.dsend(mailbox);
+  }
+
+  // Send a "unchoked" message to a peer
+  private void sendUnchoked(String mailbox) {
+    Msg.debug("Sending a UNCHOKE to " + mailbox);
+    MessageTask task = new MessageTask(MessageTask.Type.UNCHOKE, hostname, this.mailbox, this.id);
+    task.dsend(mailbox);
+  }
+
+  // Send a "HAVE" message to all peers we are connected to
+  private void sendHave(int piece) {
+    Msg.debug("Sending HAVE message to all my peers");
+    for (Connection remotePeer : peers.values()) {
+      MessageTask task = new MessageTask(MessageTask.Type.HAVE, hostname, this.mailbox, this.id, piece);
+      task.dsend(remotePeer.mailbox);
+    }
+  }
+  // Send a bitfield message to all the peers the peer has.
+  private void sendBitfield(String mailbox) {
+    Msg.debug("Sending a BITFIELD to " + mailbox);
+    MessageTask task = new MessageTask(MessageTask.Type.BITFIELD, hostname, this.mailbox, this.id, this.bitfield);
+    task.dsend(mailbox);
+  }
+  // Send a "request" message to a peer, containing a request for a piece
+  private void sendRequest(String mailbox, int piece, int blockIndex, int blockLength) {
+    Msg.debug("Sending a REQUEST to " + mailbox + " for piece " + piece + " and blocks " + blockIndex + ","
+              + (blockIndex + blockLength));
+    MessageTask task = new MessageTask(MessageTask.Type.REQUEST, hostname, this.mailbox, this.id, piece, blockIndex, 
+                                       blockLength);
+    task.dsend(mailbox);
+  }
+
+  // Send a "piece" message to a peer, containing a piece of the file
+  private void sendPiece(String mailbox, int piece, boolean stalled, int blockIndex, int blockLength) {
+    Msg.debug("Sending the PIECE " + piece + " to " + mailbox);
+    MessageTask task = new MessageTask(MessageTask.Type.PIECE, hostname, this.mailbox, this.id, piece, stalled,
+                                       blockIndex, blockLength);
+    task.dsend(mailbox);
+  }
+
+  private String getStatus() {
+    String s = "";
+    for (int i = 0; i < Common.FILE_PIECES; i++) {
+      s = s + bitfield[i];
+    }
+    return s;
+  }
 }
-       
index 338b763..6af9eb2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2026. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,87 +7,74 @@
 package bittorrent;
 import java.util.ArrayList;
 
+import org.simgrid.msg.Msg;
 import org.simgrid.msg.Comm;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Task;
 import org.simgrid.msg.Process;
 import org.simgrid.msg.RngStream;
-import org.simgrid.msg.Task;
-/**
- * Tracker, handle requests from peers.
- */
+import org.simgrid.msg.MsgException;
+
 public class Tracker extends Process {
-       protected RngStream stream;
-       /**
-        * Peers list
-        */
-       protected ArrayList<Integer> peersList;
-       /**
-        * End time for the simulation
-        */
-       protected double deadline;
-       /**
-        * Current comm received
-        */
-       protected Comm commReceived = null;
-       
-       public Tracker(Host host, String name, String[]args) {
-               super(host,name,args);
-       }
-       
-       @Override
-       public void main(String[] args) throws MsgException {
-               if (args.length != 1) {
-                       Msg.info("Wrong number of arguments for the tracker.");
-                       return;
-               }
-               //Build the RngStream object for randomness
-               stream = new RngStream("tracker");
-               //Retrieve the end time
-               deadline = Double.valueOf(args[0]);
-               //Building peers array
-               peersList = new ArrayList<Integer>();
-               
-               Msg.info("Tracker launched.");          
-               while (Msg.getClock() < deadline) {
-                       if (commReceived == null) {
-                               commReceived = Task.irecv(Common.TRACKER_MAILBOX);
-                       }
-                       try {
-                               if (commReceived.test()) {
-                                       Task task = commReceived.getTask();
-                                       if (task instanceof TrackerTask) {
-                                               TrackerTask tTask = (TrackerTask)task;
-                                               //Sending peers to the peer
-                                               int nbPeers = 0;
-                                               while (nbPeers < Common.MAXIMUM_PEERS && nbPeers < peersList.size()) {
-                                                       int nextPeer;
-                                                       do {
-                                                               nextPeer = stream.randInt(0, peersList.size() - 1);
-                                                       } while (tTask.peers.contains(nextPeer));
-                                                       tTask.peers.add(peersList.get(nextPeer));
-                                                       nbPeers++;
-                                               }
-                                               //Adding the peer to our list
-                                               peersList.add(tTask.peerId);
-                                               tTask.type = TrackerTask.Type.ANSWER;
-                                               //Setting the interval
-                                               tTask.interval = Common.TRACKER_QUERY_INTERVAL;
-                                               //Sending the task back to the peer
-                                               tTask.dsend(tTask.mailbox);
-                                       }
-                                       commReceived = null;
-                               }
-                               else {
-                                       waitFor(1);
-                               }
-                       }
-                       catch (MsgException e) {
-                               commReceived = null;                            
-                       }
-               }
-               Msg.info("Tracker is leaving");
-       }
+  protected RngStream stream;
+  protected ArrayList<Integer> peersList;
+  protected double deadline;
+  protected Comm commReceived = null;
+
+  public Tracker(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  @Override
+  public void main(String[] args) throws MsgException {
+    if (args.length != 1) {
+      Msg.info("Wrong number of arguments for the tracker.");
+      return;
+    }
+    //Build the RngStream object for randomness
+    stream = new RngStream("tracker");
+    //Retrieve the end time
+    deadline = Double.valueOf(args[0]);
+    //Building peers array
+    peersList = new ArrayList<Integer>();
 
+    Msg.info("Tracker launched.");    
+    while (Msg.getClock() < deadline) {
+      if (commReceived == null) {
+        commReceived = Task.irecv(Common.TRACKER_MAILBOX);
+      }
+      try {
+        if (commReceived.test()) {
+          Task task = commReceived.getTask();
+          if (task instanceof TrackerTask) {
+            TrackerTask tTask = (TrackerTask)task;
+            //Sending peers to the peer
+            int nbPeers = 0;
+            while (nbPeers < Common.MAXIMUM_PEERS && nbPeers < peersList.size()) {
+              int nextPeer;
+              do {
+                nextPeer = stream.randInt(0, peersList.size() - 1);
+              } while (tTask.peers.contains(nextPeer));
+              tTask.peers.add(peersList.get(nextPeer));
+              nbPeers++;
+            }
+            //Adding the peer to our list
+            peersList.add(tTask.peerId);
+            tTask.type = TrackerTask.Type.ANSWER;
+            //Setting the interval
+            tTask.interval = Common.TRACKER_QUERY_INTERVAL;
+            //Sending the task back to the peer
+            tTask.dsend(tTask.mailbox);
+          }
+          commReceived = null;
+        } else {
+          waitFor(1);
+        }
+      }
+      catch (MsgException e) {
+        commReceived = null;
+      }
+    }
+    Msg.info("Tracker is leaving");
+  }
 }
index beaf7b8..8e4158d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,41 +9,36 @@ import java.util.ArrayList;
 
 import org.simgrid.msg.Task;
 
-/**
- * Task exchanged between the tracker
- * and the peers. 
- */
+/* Task exchanged between the tracker and the peers. */
 public class TrackerTask extends Task {
-       /**
-        * Type of the tasks
-        */
-       public enum Type {
-               REQUEST,
-               ANSWER
-       };
-       public Type type;
-       public String hostname;
-       public String mailbox;
-       public int peerId;
-       public int uploaded;
-       public int downloaded;
-       public int left;
-       public double interval;
-       public ArrayList<Integer> peers;
-       
-       public TrackerTask(String hostname, String mailbox, int peerId) {
-               this(hostname, mailbox, peerId, 0, 0, Common.FILE_SIZE);
-       }       
-       public TrackerTask(String hostname, String mailbox, int peerId, int uploaded, int downloaded, int left) {
-               super("", 0, Common.TRACKER_COMM_SIZE);
-               this.type = Type.REQUEST;
-               this.hostname = hostname;
-               this.mailbox = mailbox;
-               this.peerId = peerId;
-               this.uploaded = uploaded;
-               this.downloaded = downloaded;
-               this.left = left;
-               this.peers = new ArrayList<Integer>();
-       }
-       
+  public enum Type {
+    REQUEST,
+    ANSWER
+  };
+
+  public Type type;
+  public String hostname;
+  public String mailbox;
+  public int peerId;
+  public int uploaded;
+  public int downloaded;
+  public int left;
+  public double interval;
+  public ArrayList<Integer> peers;
+
+  public TrackerTask(String hostname, String mailbox, int peerId) {
+    this(hostname, mailbox, peerId, 0, 0, Common.FILE_SIZE);
+  }
+
+  public TrackerTask(String hostname, String mailbox, int peerId, int uploaded, int downloaded, int left) {
+    super("", 0, Common.TRACKER_COMM_SIZE);
+    this.type = Type.REQUEST;
+    this.hostname = hostname;
+    this.mailbox = mailbox;
+    this.peerId = peerId;
+    this.uploaded = uploaded;
+    this.downloaded = downloaded;
+    this.left = left;
+    this.peers = new ArrayList<Integer>();
+  }
 }
index c1989ea..7d0459b 100644 (file)
@@ -1,39 +1,37 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
   <process host="Jacquelin" function="bittorrent.Tracker">
-    <argument value="3000" />                  
+    <argument value="3000" />
   </process>
 
   <process host="Boivin" function="bittorrent.Peer">
-    <argument value="00000002"/>        <!-- my id -->
-    <argument value="5000" />                  <!-- end time -->       
-    <argument value="1" />                     <!-- indicates if the bittorrent.Peer is a seed at the begining of the simulation -->   
+    <argument value="00000002"/>      <!-- my id -->
+    <argument value="5000" />      <!-- end time -->
+    <argument value="1" />     <!-- indicates if the bittorrent.Peer is a seed at the begining of the simulation -->
   </process>
   <process host="Jean_Yves" function="bittorrent.Peer">
-    <argument value="00000003"/>        <!-- my id -->
-    <argument value="5000" />                  <!-- end time -->       
+    <argument value="00000003"/>         <!-- my id -->
+    <argument value="5000" />         <!-- end time -->
   </process>
   <process host="TeX" function="bittorrent.Peer">
-    <argument value="00000004"/>        <!-- my id -->
-    <argument value="5000" />                  <!-- end time -->       
+    <argument value="00000004"/>   <!-- my id -->
+    <argument value="5000" />   <!-- end time -->
   </process>
   <process host="Geoff" function="bittorrent.Peer">
-    <argument value="00000005"/>        <!-- my id -->
-    <argument value="5000" />                  <!-- end time -->       
+    <argument value="00000005"/>     <!-- my id -->
+    <argument value="5000" />     <!-- end time -->
   </process>
   <process host="Disney" function="bittorrent.Peer">
-    <argument value="00000006"/>        <!-- my id -->
-    <argument value="5000" />                  <!-- end time -->       
+    <argument value="00000006"/>      <!-- my id -->
+    <argument value="5000" />      <!-- end time -->
   </process>
   <process host="iRMX" function="bittorrent.Peer">
-    <argument value="00000007"/>        <!-- my id -->
-    <argument value="5000" />                  <!-- end time -->       
+    <argument value="00000007"/>    <!-- my id -->
+    <argument value="5000" />    <!-- end time -->
   </process>
   <process host="McGee" function="bittorrent.Peer">
-    <argument value="00000008"/>        <!-- my id -->
-    <argument value="5000" />                  <!-- end time -->       
+    <argument value="00000008"/>     <!-- my id -->
+    <argument value="5000" />     <!-- end time -->
   </process>
-
 </platform>
index 2f3d7fa..954b50f 100644 (file)
@@ -9,19 +9,18 @@ package chord;
 import org.simgrid.msg.Msg;
 
 public class Chord {
-       public static void main(String[] args) {
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-       if(args.length < 2) {
-               Msg.info("Usage   : Chord platform_file deployment_file");
-               Msg.info("example : Chord platform.xml deployment.xml");
-               System.exit(1);
-       }
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
-                       
-               /*  execute the simulation. */
-        Msg.run();             
-       }
+  public static void main(String[] args) {
+    Msg.init(args);
+    if(args.length < 2) {
+      Msg.info("Usage   : Chord platform_file deployment_file");
+      Msg.info("example : Chord ../platforms/platform.xml chord.xml");
+      System.exit(1);
+    }
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
+
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
index b10940c..b78bb8f 100644 (file)
@@ -6,21 +6,18 @@
 
 package chord;
 
+import chord.Common;
 import org.simgrid.msg.Task;
 
-import chord.Common;
-/**
- * Base class for all Tasks in Chord.
- */
 public class ChordTask extends Task {
-       public String issuerHostName;
-       public String answerTo;
-       public ChordTask() {
-               this(null,null);
-       }
-       public ChordTask(String issuerHostName, String answerTo) {
-               super(null, Common.COMP_SIZE, Common.COMM_SIZE);
-               this.issuerHostName = issuerHostName;
-               this.answerTo = answerTo;
-       }
+  public String issuerHostName;
+  public String answerTo;
+  public ChordTask() {
+    this(null,null);
+  }
+  public ChordTask(String issuerHostName, String answerTo) {
+    super(null, Common.COMP_SIZE, Common.COMM_SIZE);
+    this.issuerHostName = issuerHostName;
+    this.answerTo = answerTo;
+  }
 }
index 7031c23..2bda081 100644 (file)
@@ -5,19 +5,17 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package chord;
-/**
- * Common constants used over the simulation
- */
+
 public class Common {
-       public final static int COMM_SIZE = 10;
-       public final static int COMP_SIZE = 0;
-       
-       public final static int NB_BITS = 24;
-       public final static int NB_KEYS = 16777216;
-       public final static int TIMEOUT = 50;
-       public final static int MAX_SIMULATION_TIME = 1000;
-       public final static int PERIODIC_STABILIZE_DELAY = 20;
-       public final static int PERIODIC_FIX_FINGERS_DELAY = 120;
-       public final static int PERIODIC_CHECK_PREDECESSOR_DELAY = 120;
-       public final static int PERIODIC_LOOKUP_DELAY = 10;
+  public final static int COMM_SIZE = 10;
+  public final static int COMP_SIZE = 0;
+  
+  public final static int NB_BITS = 24;
+  public final static int NB_KEYS = 16777216;
+  public final static int TIMEOUT = 50;
+  public final static int MAX_SIMULATION_TIME = 1000;
+  public final static int PERIODIC_STABILIZE_DELAY = 20;
+  public final static int PERIODIC_FIX_FINGERS_DELAY = 120;
+  public final static int PERIODIC_CHECK_PREDECESSOR_DELAY = 120;
+  public final static int PERIODIC_LOOKUP_DELAY = 10;
 }
index a740872..5dee45f 100644 (file)
@@ -7,10 +7,10 @@
 package chord;
 
 public class FindSuccessorAnswerTask extends ChordTask {
-       public int answerId;
+  public int answerId;
 
-       public FindSuccessorAnswerTask(String issuerHostname, String answerTo, int answerId) {
-               super(issuerHostname,answerTo);
-               this.answerId = answerId;
-       }
+  public FindSuccessorAnswerTask(String issuerHostname, String answerTo, int answerId) {
+    super(issuerHostname,answerTo);
+    this.answerId = answerId;
+  }
 }
index db77027..b8f84c2 100644 (file)
@@ -7,10 +7,10 @@
 package chord;
 
 public class FindSuccessorTask extends ChordTask {
-       public int requestId;
-       
-       public FindSuccessorTask(String issuerHostname, String answerTo,  int requestId) {
-               super(issuerHostname, answerTo);
-               this.requestId = requestId;
-       }
+  public int requestId;
+  
+  public FindSuccessorTask(String issuerHostname, String answerTo,  int requestId) {
+    super(issuerHostname, answerTo);
+    this.requestId = requestId;
+  }
 }
index ac1b142..d8a9a9a 100644 (file)
@@ -7,9 +7,9 @@
 package chord;
 
 public class GetPredecessorAnswerTask extends ChordTask {
-       public int answerId;
-       public GetPredecessorAnswerTask(String issuerHostname, String answerTo, int answerId) {
-               super(issuerHostname,answerTo);
-               this.answerId = answerId;
-       }
+  public int answerId;
+  public GetPredecessorAnswerTask(String issuerHostname, String answerTo, int answerId) {
+    super(issuerHostname,answerTo);
+    this.answerId = answerId;
+  }
 }
index 38fecab..6320d7a 100644 (file)
@@ -7,7 +7,7 @@
 package chord;
 
 public class GetPredecessorTask extends ChordTask {
-       public GetPredecessorTask(String issuerHostName, String answerTo) {
-               super(issuerHostName, answerTo);
-       }
+  public GetPredecessorTask(String issuerHostName, String answerTo) {
+    super(issuerHostName, answerTo);
+  }
 }
index 9309923..6456b6b 100644 (file)
 
 package chord;
 
+import org.simgrid.msg.Msg;
 import org.simgrid.msg.Comm;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Process;
 import org.simgrid.msg.Task;
+import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 import org.simgrid.msg.TimeoutException;
-/**
- * Node data
- */
 public class Node extends Process {
-       /**
-        * Node id
-        */
-       protected int id;
-       /**
-        * Node mailbox
-        */
-       protected String mailbox;
-       /**
-        * Predecessor id
-        */
-       protected int predId;
-       /**
-        * Predecessor mailbox
-        */
-       protected String predMailbox;
-       /**
-        * Index of the next finger to fix
-        */
-       protected int nextFingerToFix;
-       /**
-        * Current communication
-        */
-       protected Comm commReceive;
-       /**
-        * Last time I changed a finger or my predecessor
-        */
-       protected double lastChangeDate;
-       /**
-        * Node fingers
-        */
-       int fingers[];
-       /**
-        * Constructor
-        */
-       public Node(Host host, String name, String[] args) {
-               super(host,name,args);
-       }
-       @Override
-       public void main(String[] args) throws MsgException {
-               if (args.length != 2 && args.length != 4) {
-                       Msg.info("You need to provide 2 or 4 arguments.");
-                       return; 
-               }
-               double initTime = Msg.getClock();
-               int i;
-               boolean joinSuccess = false;
-               double deadline;
-               
-               double nextStabilizeDate = initTime + Common.PERIODIC_STABILIZE_DELAY;
-               double nextFixFingersDate = initTime + Common.PERIODIC_FIX_FINGERS_DELAY;
-               double nextCheckPredecessorDate = initTime + Common.PERIODIC_CHECK_PREDECESSOR_DELAY;
-               double nextLookupDate = initTime + Common.PERIODIC_LOOKUP_DELAY;
-               
-               id = Integer.valueOf(args[0]);
-               mailbox = Integer.toString(id);
-
-               fingers = new int[Common.NB_BITS];
-               for (i = 0; i < Common.NB_BITS; i++) {
-                       fingers[i] = -1;
-                       setFinger(i,this.id);
-               }
-               
-               //First node
-               if (args.length == 2) {
-                       deadline = Integer.valueOf(args[1]);
-                       create();
-                       joinSuccess = true;
-               }
-               else {
-                       int knownId = Integer.valueOf(args[1]);
-                       deadline = Integer.valueOf(args[3]);
-                       //Msg.info("Hey! Let's join the system with the id " + id + ".");
-                       
-                       joinSuccess = join(knownId);
-               }
-               if (joinSuccess) {
-                       double currentClock = Msg.getClock();
-                       while (currentClock < (initTime + deadline) && currentClock < Common.MAX_SIMULATION_TIME) {
-                               if (commReceive == null) {
-                                       commReceive = Task.irecv(this.mailbox);
-                               }
-                               try {
-                                       if (!commReceive.test()) {
-                                               if (currentClock >= nextStabilizeDate) {
-                                                       stabilize();
-                                                       nextStabilizeDate = Msg.getClock() + Common.PERIODIC_STABILIZE_DELAY;
-                                               }
-                                               else if (currentClock >= nextFixFingersDate) {
-                                                       fixFingers();
-                                                       nextFixFingersDate = Msg.getClock() + Common.PERIODIC_FIX_FINGERS_DELAY;
-                                               }
-                                               else if (currentClock >= nextCheckPredecessorDate) {
-                                                       this.checkPredecessor();
-                                                       nextCheckPredecessorDate = Msg.getClock() + Common.PERIODIC_CHECK_PREDECESSOR_DELAY;
-                                               }
-                                               else if (currentClock >= nextLookupDate) {
-                                                       this.randomLookup();
-                                                       nextLookupDate = Msg.getClock() + Common.PERIODIC_LOOKUP_DELAY;
-                                               }
-                                               else {
-                                                       waitFor(5);
-                                               }
-                                               currentClock = Msg.getClock();
-                                       }
-                                       else {
-                                               handleTask(commReceive.getTask());
-                                               currentClock = Msg.getClock();
-                                               commReceive = null;
-                                               
-                                       }
-                               }
-                               catch (Exception e) {
-                                       currentClock = Msg.getClock();
-                                       commReceive = null;
-                               }
-                               
-                       }
-                       leave();
-                       if (commReceive != null) {
-                               commReceive = null;
-                       }
-               }
-               else {
-                       Msg.info("I couldn't join the ring");
-               }
-       }
-       void handleTask(Task task) {
-               if (task instanceof FindSuccessorTask) {
-                       FindSuccessorTask fTask = (FindSuccessorTask)task;
-                       Msg.debug("Receiving a 'Find Successor' request from " + fTask.issuerHostName + " for id " + fTask.requestId);
-                       // is my successor the successor?
-                       if (isInInterval(fTask.requestId, this.id + 1, fingers[0])) {
-                               //Msg.info("Send the request to " + fTask.answerTo + " with answer " + fingers[0]);
-                               FindSuccessorAnswerTask answer = new FindSuccessorAnswerTask(getHost().getName(), mailbox, fingers[0]);
-                               answer.dsend(fTask.answerTo);
-                       }
-                       else {
-                       // otherwise, forward the request to the closest preceding finger in my table
-                               int closest = closestPrecedingNode(fTask.requestId);
-                               //Msg.info("Forward the request to " + closest);
-                               fTask.dsend(Integer.toString(closest));
-                       }
-               }
-               else if (task instanceof GetPredecessorTask) {
-                       GetPredecessorTask gTask = (GetPredecessorTask)(task);
-                       Msg.debug("Receiving a 'Get Predecessor' request from " + gTask.issuerHostName);
-                       GetPredecessorAnswerTask answer = new GetPredecessorAnswerTask(getHost().getName(), mailbox, predId);
-                       answer.dsend(gTask.answerTo);
-               }
-               else if (task instanceof NotifyTask) {
-                       NotifyTask nTask = (NotifyTask)task;
-                       notify(nTask.requestId);
-               }
-               else {
-                       Msg.debug("Ignoring unexpected task of type:" + task);
-               }
-       }
-       /**
-        * @brief Makes the current node quit the system
-        */
-       void leave() {
-               Msg.debug("Well Guys! I Think it's time for me to quit ;)");
-               quitNotify(1); //Notify my successor
-               quitNotify(-1); //Notify my predecessor.
-               // TODO ...
-       }
-       /**
-        * @brief Notifies the successor or the predecessor of the current node
-        * of the departure
-        * @param to 1 to notify the successor, -1 to notify the predecessor
-        */
-       static void quitNotify( int to) {
-               //TODO
-       }
-       /**
-      * @brief Initializes the current node as the first one of the system.
-        */
-       void create() {
-               Msg.debug("Create a new Chord ring...");
-               setPredecessor(-1);
-               
-       }
-       /**
-        * Makes the current node join the ring, knowing the id of a node
-        * already in the ring 
-        */
-       boolean join(int knownId) {
-               Msg.info("Joining the ring with id " + this.id + " knowing node " + knownId);
-               setPredecessor(-1);
-               int successorId = remoteFindSuccessor(knownId, this.id);
-               if (successorId == -1) {
-                       Msg.info("Cannot join the ring.");
-               }
-               else {
-                       setFinger(0, successorId);
-               }
-               return successorId != -1;
-       }
-       
-       /**
-        * Sets the node predecessor
-        */
-       void setPredecessor(int predecessorId) {
-               if (predecessorId != predId) {
-                       predId = predecessorId;
-                       if (predecessorId != -1) {
-                               predMailbox = Integer.toString(predId);
-                       }
-                       lastChangeDate = Msg.getClock();
-               }
-       }
-       /**
-        * @brief Asks another node its predecessor.
-        * @param askTo the node to ask to
-        * @return the id of its predecessor node, or -1 if the request failed
-        * (or if the node does not know its predecessor)
-        */
-       int remoteGetPredecessor(int askTo) {
-               int predecessorId = -1;
-               boolean stop = false;
-               Msg.debug("Sending a 'Get Predecessor' request to " + askTo);
-               String mailboxTo = Integer.toString(askTo);
-               GetPredecessorTask sendTask = new GetPredecessorTask(getHost().getName(), this.mailbox);
-               try {
-                       sendTask.send(mailboxTo, Common.TIMEOUT);                       
-                       try {
-                               do {
-                                       if (commReceive == null) {
-                                               commReceive = Task.irecv(this.mailbox);
-                                       }
-                                       commReceive.waitCompletion(Common.TIMEOUT);
-                                       Task taskReceived = commReceive.getTask();
-                                       if (taskReceived instanceof GetPredecessorAnswerTask) {
-                                               predecessorId = ((GetPredecessorAnswerTask) taskReceived).answerId;
-                                               stop = true;
-                                       }
-                                       else {
-                                               handleTask(taskReceived);
-                                       }
-                                       commReceive = null;                                     
-                               } while (!stop);
-               
-                       }
-                       catch (MsgException e) {
-                               commReceive = null;     
-                               stop = true;
-                       }
-               }
-               catch (MsgException e) {
-                       Msg.debug("Failed to send the Get Predecessor request");
-               }
-               
-               
-               return predecessorId;
-       }
-       /**
-        * @brief Makes the current node find the successor node of an id.
-        * @param node the current node
-        * @param id the id to find
-        * @return the id of the successor node, or -1 if the request failed
-        */
-       int findSuccessor(int id) {
-               if (isInInterval(id, this.id + 1, fingers[0])) {
-                       return fingers[0];
-               }
-               
-               int closest = this.closestPrecedingNode(id);
-               return remoteFindSuccessor(closest, id);
-       }
-       /**
-        * @brief Asks another node the successor node of an id.
-        */
-       int remoteFindSuccessor(int askTo, int id) {
-               int successor = -1;
-               boolean stop = false;
-               String mailbox = Integer.toString(askTo);
-               Task sendTask = new FindSuccessorTask(getHost().getName(), this.mailbox, id);
-               Msg.debug("Sending a 'Find Successor' request to " + mailbox + " for id " + id);
-               try {
-                       sendTask.send(mailbox, Common.TIMEOUT);
-                       do {
-                               if (commReceive == null) {
-                                       commReceive = Task.irecv(this.mailbox);
-                               }
-                               try {
-                                       commReceive.waitCompletion(Common.TIMEOUT);
-                                       Task task = commReceive.getTask();
-                                       if (task instanceof FindSuccessorAnswerTask) {
-                                               //TODO: Check if this this our answer.
-                                               FindSuccessorAnswerTask fTask = (FindSuccessorAnswerTask) task;
-                                               stop = true;
-                                               successor = fTask.answerId;
-                                       }
-                                       else {
-                                               handleTask(task);
-                                       }
-                                       commReceive = null;
-                               }
-                               catch (TimeoutException e) {
-                                       stop = true;
-                                       commReceive = null;
-                               }
-                       } while (!stop);
-               }
-               catch (TimeoutException e) {
-                       Msg.debug("Failed to send the 'Find Successor' request");
-               }
-               catch (MsgException e) {
-                       Msg.debug("Failed to receive Find Successor");
-               }
-               
-               return successor;
-
-       }
-       /**
-        * @brief This function is called periodically. It checks the immediate
-        * successor of the current node.
-        */
-       void stabilize() {
-               Msg.debug("Stabilizing node");
-               int candidateId;
-               int successorId = fingers[0];
-               if (successorId != this.id){
-                       candidateId = remoteGetPredecessor(successorId);
-               }
-               else {
-                       candidateId = predId;
-               }
-               //This node is a candidate to become my new successor
-               if (candidateId != -1 && isInInterval(candidateId, this.id + 1, successorId - 1)) {
-                       setFinger(0, candidateId);
-               }
-               if (successorId != this.id) {
-                       remoteNotify(successorId, this.id);
-               }
-               
-       }
-       /**
-        * \brief Notifies the current node that its predecessor may have changed.
-        * \param candidate_id the possible new predecessor
-        */
-       void notify(int predecessorCandidateId) {
-               if (predId == -1 || isInInterval(predecessorCandidateId, predId + 1, this.id - 1 )) {
-                       setPredecessor(predecessorCandidateId);
-               }
-               else {
-                       //Don't have to change the predecessor.
-               }
-       }
-       /**
-        * \brief Notifies a remote node that its predecessor may have changed.
-        * \param notify_id id of the node to notify
-        * \param candidate_id the possible new predecessor
-        */     
-       void remoteNotify(int notifyId, int predecessorCandidateId) {
-               Msg.debug("Sending a 'Notify' request to " + notifyId);
-               Task sentTask = new NotifyTask(getHost().getName(), this.mailbox, predecessorCandidateId);
-               sentTask.dsend(Integer.toString(notifyId));
-       }
-       /**
-        * \brief This function is called periodically.
-        * It refreshes the finger table of the current node.
-        */
-       void fixFingers() {
-               Msg.debug("Fixing fingers");
-               int i = this.nextFingerToFix;
-               int id = this.findSuccessor(this.id + (int)Math.pow(2,i)); //FIXME: SLOW
-               if (id != -1) {
-                       if (id != fingers[i]) {
-                               setFinger(i, id);
-                       }
-                       nextFingerToFix = (i + 1) % Common.NB_BITS;
-               }
-       }
-       /**
-        * \brief This function is called periodically.
-        * It checks whether the predecessor has failed
-        */
-       void checkPredecessor() {
-               //TODO
-       }
-       /**
-        * \brief Performs a find successor request to a random id.
-        */
-       void randomLookup() {
-               int id = 1337;
-               //Msg.info("Making a lookup request for id " + id);
-               findSuccessor(id);
-       }
-       
-       
-
-       /**
-        * @brief Returns the closest preceding finger of an id
-        * with respect to the finger table of the current node.
-        * @param id the id to find
-        * \return the closest preceding finger of that id
-        */
-       int closestPrecedingNode(int id) {
-               int i;
-               for (i = Common.NB_BITS - 1; i >= 0; i--) {
-                       if (isInInterval(fingers[i], this.id + 1, id - 1)) {
-                               return fingers[i];
-                       }
-               }               
-               return this.id;
-       }
-       /**
-        * @brief Returns whether an id belongs to the interval [start, end].
-        *
-        * The parameters are noramlized to make sure they are between 0 and nb_keys - 1).
-        * 1 belongs to [62, 3]
-        * 1 does not belong to [3, 62]
-        * 63 belongs to [62, 3]
-        * 63 does not belong to [3, 62]
-        * 24 belongs to [21, 29]
-        * 24 does not belong to [29, 21]
-        *
-        * \param id id to check
-        * \param start lower bound
-        * \param end upper bound
-        * \return a non-zero value if id in in [start, end]
-        */
-       static boolean isInInterval(int id, int start, int end) {
-               id = normalize(id);
-               start = normalize(start);
-               end = normalize(end);
-               
-               // make sure end >= start and id >= start
-               if (end < start) {
-                       end += Common.NB_KEYS;
-               }
-               if (id < start) {
-                       id += Common.NB_KEYS;
-               }
-               return (id <= end);
-       
-       }
-       /**
-        * @brief Turns an id into an equivalent id in [0, nb_keys).
-        * @param id an id
-        * @return the corresponding normalized id
-        */
-       static int normalize(int id) {
-               return id & (Common.NB_KEYS - 1);
-       }
-       /**
-        * \brief Sets a finger of the current node.
-        * \param finger_index index of the finger to set (0 to nb_bits - 1)
-        * \param id the id to set for this finger
-        */
-       void setFinger(int fingerIndex, int id) {
-               if (id != fingers[fingerIndex]) {
-                       fingers[fingerIndex] = id;
-                       lastChangeDate = Msg.getClock();
-               }
-       }
+  protected int id;
+  protected String mailbox;
+  protected int predId;
+  protected String predMailbox;
+  protected int nextFingerToFix;
+  protected Comm commReceive;
+  ///Last time I changed a finger or my predecessor
+  protected double lastChangeDate;
+  int fingers[];
+
+  public Node(Host host, String name, String[] args) {
+    super(host,name,args);
+  }
+
+  @Override
+  public void main(String[] args) throws MsgException {
+    if (args.length != 2 && args.length != 4) {
+      Msg.info("You need to provide 2 or 4 arguments.");
+      return;
+    }
+    double initTime = Msg.getClock();
+    int i;
+    boolean joinSuccess = false;
+    double deadline;
+
+    double nextStabilizeDate = initTime + Common.PERIODIC_STABILIZE_DELAY;
+    double nextFixFingersDate = initTime + Common.PERIODIC_FIX_FINGERS_DELAY;
+    double nextCheckPredecessorDate = initTime + Common.PERIODIC_CHECK_PREDECESSOR_DELAY;
+    double nextLookupDate = initTime + Common.PERIODIC_LOOKUP_DELAY;
+
+    id = Integer.valueOf(args[0]);
+    mailbox = Integer.toString(id);
+
+    fingers = new int[Common.NB_BITS];
+    for (i = 0; i < Common.NB_BITS; i++) {
+      fingers[i] = -1;
+      setFinger(i,this.id);
+    }
+
+    //First node
+    if (args.length == 2) {
+      deadline = Integer.valueOf(args[1]);
+      create();
+      joinSuccess = true;
+    } else {
+      int knownId = Integer.valueOf(args[1]);
+      deadline = Integer.valueOf(args[3]);
+      //Msg.info("Hey! Let's join the system with the id " + id + ".");
+
+      joinSuccess = join(knownId);
+    }
+    if (joinSuccess) {
+      double currentClock = Msg.getClock();
+      while (currentClock < (initTime + deadline) && currentClock < Common.MAX_SIMULATION_TIME) {
+        if (commReceive == null) {
+          commReceive = Task.irecv(this.mailbox);
+        }
+        try {
+          if (!commReceive.test()) {
+            if (currentClock >= nextStabilizeDate) {
+              stabilize();
+              nextStabilizeDate = Msg.getClock() + Common.PERIODIC_STABILIZE_DELAY;
+            } else if (currentClock >= nextFixFingersDate) {
+              fixFingers();
+              nextFixFingersDate = Msg.getClock() + Common.PERIODIC_FIX_FINGERS_DELAY;
+            } else if (currentClock >= nextCheckPredecessorDate) {
+              this.checkPredecessor();
+              nextCheckPredecessorDate = Msg.getClock() + Common.PERIODIC_CHECK_PREDECESSOR_DELAY;
+            } else if (currentClock >= nextLookupDate) {
+              this.randomLookup();
+              nextLookupDate = Msg.getClock() + Common.PERIODIC_LOOKUP_DELAY;
+            } else {
+              waitFor(5);
+            }
+            currentClock = Msg.getClock();
+          } else {
+            handleTask(commReceive.getTask());
+            currentClock = Msg.getClock();
+            commReceive = null;
+          }
+        }
+        catch (Exception e) {
+          currentClock = Msg.getClock();
+          commReceive = null;
+        }
+      }
+      leave();
+      if (commReceive != null) {
+        commReceive = null;
+      }
+    } else {
+      Msg.info("I couldn't join the ring");
+    }
+  }
+
+  void handleTask(Task task) {
+    if (task instanceof FindSuccessorTask) {
+      FindSuccessorTask fTask = (FindSuccessorTask)task;
+      Msg.debug("Receiving a 'Find Successor' request from " + fTask.issuerHostName + " for id " + fTask.requestId);
+      // is my successor the successor?
+      if (isInInterval(fTask.requestId, this.id + 1, fingers[0])) {
+        //Msg.info("Send the request to " + fTask.answerTo + " with answer " + fingers[0]);
+        FindSuccessorAnswerTask answer = new FindSuccessorAnswerTask(getHost().getName(), mailbox, fingers[0]);
+        answer.dsend(fTask.answerTo);
+      } else {
+        // otherwise, forward the request to the closest preceding finger in my table
+        int closest = closestPrecedingNode(fTask.requestId);
+        //Msg.info("Forward the request to " + closest);
+        fTask.dsend(Integer.toString(closest));
+      }
+    } else if (task instanceof GetPredecessorTask) {
+      GetPredecessorTask gTask = (GetPredecessorTask)(task);
+      Msg.debug("Receiving a 'Get Predecessor' request from " + gTask.issuerHostName);
+      GetPredecessorAnswerTask answer = new GetPredecessorAnswerTask(getHost().getName(), mailbox, predId);
+      answer.dsend(gTask.answerTo);
+    } else if (task instanceof NotifyTask) {
+      NotifyTask nTask = (NotifyTask)task;
+      notify(nTask.requestId);
+    } else {
+      Msg.debug("Ignoring unexpected task of type:" + task);
+    }
+  }
+
+  void leave() {
+    Msg.debug("Well Guys! I Think it's time for me to quit ;)");
+    quitNotify(1); //Notify my successor
+    quitNotify(-1); //Notify my predecessor.
+  }
+
+  /**
+   * @brief Notifies the successor or the predecessor of the current node of the departure
+   * @param to 1 to notify the successor, -1 to notify the predecessor
+   */
+  static void quitNotify( int to) {
+    //TODO
+  }
+
+  /**
+   * @brief Initializes the current node as the first one of the system.
+   */
+  void create() {
+    Msg.debug("Create a new Chord ring...");
+    setPredecessor(-1);
+  }
+
+  // Makes the current node join the ring, knowing the id of a node already in the ring 
+  boolean join(int knownId) {
+    Msg.info("Joining the ring with id " + this.id + " knowing node " + knownId);
+    setPredecessor(-1);
+    int successorId = remoteFindSuccessor(knownId, this.id);
+    if (successorId == -1) {
+      Msg.info("Cannot join the ring.");
+    } else {
+      setFinger(0, successorId);
+    }
+    return successorId != -1;
+  }
+
+  void setPredecessor(int predecessorId) {
+    if (predecessorId != predId) {
+      predId = predecessorId;
+      if (predecessorId != -1) {
+        predMailbox = Integer.toString(predId);
+      }
+      lastChangeDate = Msg.getClock();
+    }
+  }
+
+  /**
+   * @brief Asks another node its predecessor.
+   * @param askTo the node to ask to
+   * @return the id of its predecessor node, or -1 if the request failed(or if the node does not know its predecessor)
+   */
+  int remoteGetPredecessor(int askTo) {
+    int predecessorId = -1;
+    boolean stop = false;
+    Msg.debug("Sending a 'Get Predecessor' request to " + askTo);
+    String mailboxTo = Integer.toString(askTo);
+    GetPredecessorTask sendTask = new GetPredecessorTask(getHost().getName(), this.mailbox);
+    try {
+      sendTask.send(mailboxTo, Common.TIMEOUT);
+      try {
+        do {
+          if (commReceive == null) {
+            commReceive = Task.irecv(this.mailbox);
+          }
+          commReceive.waitCompletion(Common.TIMEOUT);
+          Task taskReceived = commReceive.getTask();
+          if (taskReceived instanceof GetPredecessorAnswerTask) {
+            predecessorId = ((GetPredecessorAnswerTask) taskReceived).answerId;
+            stop = true;
+          } else {
+            handleTask(taskReceived);
+          }
+          commReceive = null;
+        } while (!stop);
+      }
+      catch (MsgException e) {
+        commReceive = null;
+        stop = true;
+      }
+    }
+    catch (MsgException e) {
+      Msg.debug("Failed to send the Get Predecessor request");
+    }
+    return predecessorId;
+  }
+
+  /**
+   * @brief Makes the current node find the successor node of an id.
+   * @param node the current node
+   * @param id the id to find
+   * @return the id of the successor node, or -1 if the request failed
+   */
+  int findSuccessor(int id) {
+    if (isInInterval(id, this.id + 1, fingers[0])) {
+      return fingers[0];
+    }
+
+    int closest = this.closestPrecedingNode(id);
+    return remoteFindSuccessor(closest, id);
+  }
+
+  // Asks another node the successor node of an id.
+  int remoteFindSuccessor(int askTo, int id) {
+    int successor = -1;
+    boolean stop = false;
+    String mailbox = Integer.toString(askTo);
+    Task sendTask = new FindSuccessorTask(getHost().getName(), this.mailbox, id);
+    Msg.debug("Sending a 'Find Successor' request to " + mailbox + " for id " + id);
+    try {
+      sendTask.send(mailbox, Common.TIMEOUT);
+      do {
+        if (commReceive == null) {
+          commReceive = Task.irecv(this.mailbox);
+        }
+        try {
+          commReceive.waitCompletion(Common.TIMEOUT);
+          Task task = commReceive.getTask();
+          if (task instanceof FindSuccessorAnswerTask) {
+            //TODO: Check if this this our answer.
+            FindSuccessorAnswerTask fTask = (FindSuccessorAnswerTask) task;
+            stop = true;
+            successor = fTask.answerId;
+          } else {
+            handleTask(task);
+          }
+          commReceive = null;
+        }
+        catch (TimeoutException e) {
+          stop = true;
+          commReceive = null;
+        }
+      } while (!stop);
+    }
+    catch (TimeoutException e) {
+      Msg.debug("Failed to send the 'Find Successor' request");
+    }
+    catch (MsgException e) {
+      Msg.debug("Failed to receive Find Successor");
+    }
+
+    return successor;
+  }
+
+  // This function is called periodically. It checks the immediate successor of the current node.
+  void stabilize() {
+    Msg.debug("Stabilizing node");
+    int candidateId;
+    int successorId = fingers[0];
+    if (successorId != this.id){
+      candidateId = remoteGetPredecessor(successorId);
+    } else {
+      candidateId = predId;
+    }
+    //This node is a candidate to become my new successor
+    if (candidateId != -1 && isInInterval(candidateId, this.id + 1, successorId - 1)) {
+      setFinger(0, candidateId);
+    }
+    if (successorId != this.id) {
+      remoteNotify(successorId, this.id);
+    }
+  }
+
+  /**
+   * @brief Notifies the current node that its predecessor may have changed.
+   * @param candidate_id the possible new predecessor
+   */
+  void notify(int predecessorCandidateId) {
+    if (predId == -1 || isInInterval(predecessorCandidateId, predId + 1, this.id - 1 )) {
+      setPredecessor(predecessorCandidateId);
+    }
+  }
+
+  /**
+   * @brief Notifies a remote node that its predecessor may have changed.
+   * @param notify_id id of the node to notify
+   * @param candidate_id the possible new predecessor
+   */
+  void remoteNotify(int notifyId, int predecessorCandidateId) {
+    Msg.debug("Sending a 'Notify' request to " + notifyId);
+    Task sentTask = new NotifyTask(getHost().getName(), this.mailbox, predecessorCandidateId);
+    sentTask.dsend(Integer.toString(notifyId));
+  }
+
+  // This function is called periodically.
+  // It refreshes the finger table of the current node.
+  void fixFingers() {
+    Msg.debug("Fixing fingers");
+    int i = this.nextFingerToFix;
+    int id = this.findSuccessor(this.id + (int)Math.pow(2,i)); //FIXME: SLOW
+    if (id != -1) {
+      if (id != fingers[i]) {
+        setFinger(i, id);
+      }
+      nextFingerToFix = (i + 1) % Common.NB_BITS;
+    }
+  }
+
+  // This function is called periodically.
+  // It checks whether the predecessor has failed
+  void checkPredecessor() {
+    //TODO
+  }
+
+  // Performs a find successor request to a random id.
+  void randomLookup() {
+    int id = 1337;
+    //Msg.info("Making a lookup request for id " + id);
+    findSuccessor(id);
+  }
+
+  /**
+   * @brief Returns the closest preceding finger of an id with respect to the finger table of the current node.
+   * @param id the id to find
+   * @return the closest preceding finger of that id
+   */
+  int closestPrecedingNode(int id) {
+    int i;
+    for (i = Common.NB_BITS - 1; i >= 0; i--) {
+      if (isInInterval(fingers[i], this.id + 1, id - 1)) {
+        return fingers[i];
+      }
+    }
+    return this.id;
+  }
+
+  /**
+   * @brief Returns whether an id belongs to the interval [start, end].
+   *
+   * The parameters are noramlized to make sure they are between 0 and nb_keys - 1).
+   * 1 belongs to [62, 3]
+   * 1 does not belong to [3, 62]
+   * 63 belongs to [62, 3]
+   * 63 does not belong to [3, 62]
+   * 24 belongs to [21, 29]
+   * 24 does not belong to [29, 21]
+   *
+   * @param id id to check
+   * @param start lower bound
+   * @param end upper bound
+   * @return a non-zero value if id in in [start, end]
+   */
+  static boolean isInInterval(int id, int start, int end) {
+    id = normalize(id);
+    start = normalize(start);
+    end = normalize(end);
+
+    // make sure end >= start and id >= start
+    if (end < start) {
+      end += Common.NB_KEYS;
+    }
+    if (id < start) {
+      id += Common.NB_KEYS;
+    }
+    return (id <= end);
+  }
+
+  /**
+   * @brief Turns an id into an equivalent id in [0, nb_keys).
+   * @param id an id
+   * @return the corresponding normalized id
+   */
+  static int normalize(int id) {
+    return id & (Common.NB_KEYS - 1);
+  }
+
+  /**
+   * @brief Sets a finger of the current node.
+   * @param finger_index index of the finger to set (0 to nb_bits - 1)
+   * @param id the id to set for this finger
+   */
+  void setFinger(int fingerIndex, int id) {
+    if (id != fingers[fingerIndex]) {
+      fingers[fingerIndex] = id;
+      lastChangeDate = Msg.getClock();
+    }
+  }
 }
index b36c4ca..b7b6919 100644 (file)
@@ -7,9 +7,9 @@
 package chord;
 
 public class NotifyTask extends ChordTask {
-       public int requestId;
-       public NotifyTask(String issuerHostname, String answerTo, int requestId) {
-               super(issuerHostname, answerTo);
-               this.requestId = requestId;
-       }
+  public int requestId;
+  public NotifyTask(String issuerHostname, String answerTo, int requestId) {
+    super(issuerHostname, answerTo);
+    this.requestId = requestId;
+  }
 }
index a96ae02..6aa3bdf 100644 (file)
@@ -1,59 +1,50 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
   <process host="Gatien" function="chord.Node">
     <argument value="48"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="400"/>        <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="McGee" function="chord.Node">
     <argument value="42"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="300"/>        <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="iRMX" function="chord.Node">
     <argument value="38"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="200"/>         <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="Geoff" function="chord.Node">
     <argument value="32"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="100"/>         <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="TeX" function="chord.Node">
     <argument value="21"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="40"/>        <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="Jean_Yves" function="chord.Node">
     <argument value="14"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="16"/>        <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-  
   <process host="Boivin" function="chord.Node">
     <argument value="8"/>         <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="1"/>         <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="Jacquelin" function="chord.Node">
     <argument value="1"/>         <!-- my id -->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
 </platform>
index ee6b4f3..9a64392 100644 (file)
@@ -30,9 +30,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index 9848bc3..f5f2cd9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,35 +6,34 @@
 
 package cloud;
 
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.MsgException;
-/**
- * Example showing the use of the new experimental Cloud API.
- */
+
 public class Cloud {
-       public static final double task_comp_size = 10;
-       public static final double task_comm_size = 10;
-       public static final int hostNB = 2 ; 
-       public static void main(String[] args) throws MsgException {       
-           Msg.init(args); 
-           
-           if (args.length < 1) {
-               Msg.info("Usage  : Cloud platform_file");
-               Msg.info("Usage  : Cloud platform.xml");
-               System.exit(1);
-           }
-           /* Construct the platform */
-               Msg.createEnvironment(args[0]);
-               Host[] hosts = Host.all();
-               if (hosts.length < hostNB+1) {
-                       Msg.info("I need at least "+ (hostNB+1) +"  hosts in the platform file, but " + args[0] + " contains only " + hosts.length + " hosts");
-                       System.exit(42);
-               }
-               Msg.info("Start"+ hostNB +"  hosts");
-               new Master(hosts[0],"Master",hosts).start();
-               /* Execute the simulation */
-               Msg.run();
-               
+  public static final double task_comp_size = 10;
+  public static final double task_comm_size = 10;
+  public static final int hostNB = 2 ; 
+  public static void main(String[] args) throws MsgException {
+    Msg.init(args); 
+
+    if (args.length < 1) {
+      Msg.info("Usage   : Cloud platform_file");
+      Msg.info("Usage  : Cloud ../platforms/platform.xml");
+      System.exit(1);
+    }
+
+    /* Construct the platform */
+    Msg.createEnvironment(args[0]);
+    Host[] hosts = Host.all();
+    if (hosts.length < hostNB+1) {
+      Msg.info("I need at least "+ (hostNB+1) +"  hosts in the platform file, but " + args[0] + " contains only "
+               + hosts.length + " hosts");
+      System.exit(42);
     }
+    Msg.info("Start"+ hostNB +"  hosts");
+    new Master(hosts[0],"Master",hosts).start();
+    /* Execute the simulation */
+    Msg.run();
+  }
 }
index b710b2f..d0cebd0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014,2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,7 +9,7 @@ package cloud;
 import org.simgrid.msg.Task;
 
 public class FinalizeTask extends Task {
-       public FinalizeTask(double compSize, double commSize) {
-               super("Finalize",compSize,commSize);
-       }
+  public FinalizeTask(double compSize, double commSize) {
+    super("Finalize",compSize,commSize);
+  }
 }
\ No newline at end of file
index d3606c9..c1e1373 100644 (file)
@@ -8,88 +8,87 @@ package cloud;
 
 import java.util.ArrayList;
 
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Process;
-import org.simgrid.msg.Task;
 import org.simgrid.msg.VM;
+import org.simgrid.msg.Host;
+import org.simgrid.msg.Task;
+import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 
 public class Master extends Process {
-       private Host[] hosts;
-       
-       public Master(Host host, String name, Host[] hosts) {
-               super(host,name,null);
-               this.hosts = hosts;
-       }
-       public void main(String[] args) throws MsgException {
-               int slavesCount = Cloud.hostNB;
-               
-               ArrayList<VM> vms = new ArrayList<VM>();
-               
-               // Create one VM per host and bind a process inside each one. 
-               for (int i = 0; i < slavesCount; i++) {
-                       Msg.info("create VM0"+i);       
-                       VM vm = new VM(hosts[i+1],"VM0"+i);
-                       vm.start();
-                       vms.add(vm);
-                       Slave slave = new Slave(vm,i);
-                       Msg.info("Put Worker "+slave.getName()+ " on "+vm.getName());
-                       slave.start();
-       
-               }
-               Msg.info("Launched " + vms.size() + " VMs");
-               
-               Msg.info("Send a first batch of work to everyone");
-               workBatch(slavesCount);
-               
-               Msg.info("Suspend all VMs");
-               for (int i = 0; i < vms.size(); i++) {
-                       Msg.info("Suspend "+vms.get(i).getName());
-                       vms.get(i).suspend();
-               }
-               
-               Msg.info("Wait a while");
-               waitFor(2);
-               
-               Msg.info("Resume all VMs.");
-               for (int i = 0; i < vms.size(); i++) {
-                       vms.get(i).resume();
-               }
-               
-               Msg.info("Sleep long enough for everyone to be done with previous batch of work");
-               waitFor(1000 - Msg.getClock());
-               
-/*             Msg.info("Add one more process per VM.");
-               for (int i = 0; i < vms.size(); i++) {
-                       VM vm = vms.get(i);
-                       Slave slave = new Slave(vm,i + vms.size());
-                       slave.start();
-               }
-       
-               workBatch(slavesCount * 2);
+  private Host[] hosts;
+
+  public Master(Host host, String name, Host[] hosts) {
+    super(host,name,null);
+    this.hosts = hosts;
+  }
+
+  public void main(String[] args) throws MsgException {
+    int slavesCount = Cloud.hostNB;
+    ArrayList<VM> vms = new ArrayList<VM>();
+
+    // Create one VM per host and bind a process inside each one. 
+    for (int i = 0; i < slavesCount; i++) {
+      Msg.info("create VM0"+i);  
+      VM vm = new VM(hosts[i+1],"VM0"+i);
+      vm.start();
+      vms.add(vm);
+      Slave slave = new Slave(vm,i);
+      Msg.info("Put Worker "+slave.getName()+ " on "+vm.getName());
+      slave.start();
+    }
+
+    Msg.info("Launched " + vms.size() + " VMs");
+
+    Msg.info("Send a first batch of work to everyone");
+    workBatch(slavesCount);
+
+    Msg.info("Suspend all VMs");
+    for (int i = 0; i < vms.size(); i++) {
+      Msg.info("Suspend "+vms.get(i).getName());
+      vms.get(i).suspend();
+    }
+
+    Msg.info("Wait a while");
+    waitFor(2);
+
+    Msg.info("Resume all VMs.");
+    for (int i = 0; i < vms.size(); i++) {
+      vms.get(i).resume();
+    }
+
+    Msg.info("Sleep long enough for everyone to be done with previous batch of work");
+    waitFor(1000 - Msg.getClock());
+
+/*    Msg.info("Add one more process per VM.");
+    for (int i = 0; i < vms.size(); i++) {
+      VM vm = vms.get(i);
+      Slave slave = new Slave(vm,i + vms.size());
+      slave.start();
+    }
+
+    workBatch(slavesCount * 2);
 */
 
-               Msg.info("Migrate everyone to "+hosts[3].getName());
-               for (int i = 0; i < vms.size(); i++) {
-                       Msg.info("Migrate "+vms.get(i).getName()+"from"+hosts[i+1].getName()+"to "+hosts[3].getName());
-                       vms.get(i).migrate(hosts[3]);
-               }
-               
-               
-               Msg.info("Let's shut down the simulation and kill everyone.");
-               
-               for (int i = 0; i < vms.size(); i++) {
-                       vms.get(i).shutdown();
-               }                               
-               Msg.info("Master done.");
-       }
-       
-       public void workBatch(int slavesCount) throws MsgException {
-               for (int i = 0; i < slavesCount; i++) {
-                       Task task = new Task("Task0" + i, Cloud.task_comp_size, Cloud.task_comm_size);
-                       Msg.info("Sending to WRK0" + i);
-                       task.send("MBOX:WRK0" + i);
-               }
-       }
+    Msg.info("Migrate everyone to "+hosts[3].getName());
+    for (int i = 0; i < vms.size(); i++) {
+      Msg.info("Migrate "+vms.get(i).getName()+"from"+hosts[i+1].getName()+"to "+hosts[3].getName());
+      vms.get(i).migrate(hosts[3]);
+    }
+
+    Msg.info("Let's shut down the simulation and kill everyone.");
+
+    for (int i = 0; i < vms.size(); i++) {
+      vms.get(i).shutdown();
+    }
+    Msg.info("Master done.");
+  }
+
+  public void workBatch(int slavesCount) throws MsgException {
+    for (int i = 0; i < slavesCount; i++) {
+      Task task = new Task("Task0" + i, Cloud.task_comp_size, Cloud.task_comm_size);
+      Msg.info("Sending to WRK0" + i);
+      task.send("MBOX:WRK0" + i);
+    }
+  }
 }
index d97b0be..b8b3728 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,41 +6,39 @@
 
 package cloud;
 
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Process;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Task;
+import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 
 public class Slave extends Process {
-       private int number;
-       public Slave(Host host, int number) {
-               super(host,"WRK0" + number,null);
-               this.number = number;
-       }
-       public void main(String[] args) throws MsgException {
-               Msg.info(this.getName() +" is listenning on MBOX:WRK0"+ number);
-               while(true) {                   
-                       Task task;
-                        try {
-                                task = Task.receive("MBOX:WRK0"+number);
-                        } catch (MsgException e) {
-                                Msg.debug("Received failed. I'm done. See you!");
-                                break;
-                        }
-                       if (task instanceof FinalizeTask) {
-                                Msg.info("Received Finalize. I'm done. See you!");
-                               break;
-                       }
-                       Msg.info("Received \"" + task.getName() +  "\". Processing it.");
-                       try {
-                               task.execute();
-                       } catch (MsgException e) {
-
-                       }
-                       Msg.info(this.getName() +" executed task (" + task.getName()+")");
-               }
+  private int number;
+  public Slave(Host host, int number) {
+    super(host,"WRK0" + number,null);
+    this.number = number;
+  }
 
-               
-       }
+  public void main(String[] args) throws MsgException {
+    Msg.info(this.getName() +" is listenning on MBOX:WRK0"+ number);
+    while(true) {
+      Task task;
+      try {
+        task = Task.receive("MBOX:WRK0"+number);
+      } catch (MsgException e) {
+        Msg.debug("Received failed. I'm done. See you!");
+        break;
+      }
+      if (task instanceof FinalizeTask) {
+        Msg.info("Received Finalize. I'm done. See you!");
+        break;
+      }
+      Msg.info("Received \"" + task.getName() +  "\". Processing it.");
+      try {
+        task.execute();
+      } catch (MsgException e) {
+      }
+      Msg.info(this.getName() +" executed task (" + task.getName()+")");
+    }
+  }
 }
index 10612d9..b02fcf6 100644 (file)
@@ -28,9 +28,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index f967fa1..17d8e09 100644 (file)
@@ -8,63 +8,64 @@ package cloud.energy;
 import org.simgrid.msg.*;
 import org.simgrid.msg.Process;
 
-/* This class is a process in charge of running the test. It creates and starts the VMs, and fork processes within the VMs */
+/* This class is a process in charge of running the test. It creates and starts the VMs, and fork processes within VMs */
 public class EnergyVMRunner extends Process {
 
-       public class DummyProcess extends Process {
-               public  DummyProcess (Host host, String name) {
-                       super(host, name); 
-               }
-
-               public void main(String[] args) {               
-                       Task  task = new Task(this.getHost().getName()+"-task", 300E6 , 0);
-                       try {
-                               task.execute();   
-                       } catch (Exception e) {
-                               e.printStackTrace();
-                       } 
-                       Msg.info("This worker is done."); 
-               }
-       }
-
-       EnergyVMRunner(Host host, String name, String[] args) throws HostNotFoundException, NativeException  {
-               super(host, name, args);
-       }
-
-       public void main(String[] strings) throws MsgException, HostNotFoundException {
-               double startTime = 0;
-               double endTime = 0;
-
-               /* get hosts */
-               Host host1 = Host.getByName("MyHost1");
-               Host host2 = Host.getByName("MyHost2");
-               Host host3 = Host.getByName("MyHost3");
-
-               Msg.info("Creating and starting two VMs");
-               VM vmHost1 = new VM(host1, "vmHost1", 4, 2048, 100, null, 1024 * 20, 10,50);
-               vmHost1.start();
-
-               VM vmHost3 = new VM(host3, "vmHost3", 4, 2048, 100, null, 1024 * 20, 10,50);
-               vmHost3.start();
-
-               Msg.info("Create two tasks on Host1: one inside a VM, the other directly on the host");
-               new DummyProcess (vmHost1, "p11"); 
-               new DummyProcess (host1, "p12"); 
-
-               Msg.info("Create two tasks on Host2: both directly on the host");
-               new DummyProcess (host2, "p21"); 
-               new DummyProcess (host2, "p22"); 
-
-               Msg.info("Create two tasks on Host3: both inside a VM");
-               new DummyProcess (vmHost3, "p31"); 
-               new DummyProcess (vmHost3, "p312"); 
-
-               Msg.info("Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, so they run for 6 seconds)"); 
-               waitFor(5); 
-               Msg.info("Wait another 5 seconds. The tasks stop at some point in between"); 
-               waitFor(5); 
-
-               vmHost1.shutdown(); 
-               vmHost3.shutdown(); 
-       }
+  public class DummyProcess extends Process {
+    public  DummyProcess (Host host, String name) {
+      super(host, name); 
+    }
+
+    public void main(String[] args) {    
+      Task  task = new Task(this.getHost().getName()+"-task", 300E6 , 0);
+      try {
+        task.execute();   
+      } catch (Exception e) {
+        e.printStackTrace();
+      } 
+      Msg.info("This worker is done."); 
+    }
+  }
+
+  EnergyVMRunner(Host host, String name, String[] args) throws HostNotFoundException, NativeException  {
+    super(host, name, args);
+  }
+
+  public void main(String[] strings) throws MsgException, HostNotFoundException {
+    double startTime = 0;
+    double endTime = 0;
+
+    /* get hosts */
+    Host host1 = Host.getByName("MyHost1");
+    Host host2 = Host.getByName("MyHost2");
+    Host host3 = Host.getByName("MyHost3");
+
+    Msg.info("Creating and starting two VMs");
+    VM vmHost1 = new VM(host1, "vmHost1", 4, 2048, 100, null, 1024 * 20, 10,50);
+    vmHost1.start();
+
+    VM vmHost3 = new VM(host3, "vmHost3", 4, 2048, 100, null, 1024 * 20, 10,50);
+    vmHost3.start();
+
+    Msg.info("Create two tasks on Host1: one inside a VM, the other directly on the host");
+    new DummyProcess (vmHost1, "p11"); 
+    new DummyProcess (host1, "p12"); 
+
+    Msg.info("Create two tasks on Host2: both directly on the host");
+    new DummyProcess (host2, "p21"); 
+    new DummyProcess (host2, "p22"); 
+
+    Msg.info("Create two tasks on Host3: both inside a VM");
+    new DummyProcess (vmHost3, "p31"); 
+    new DummyProcess (vmHost3, "p312"); 
+
+    Msg.info("Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, "
+             + "so they run for 6 seconds)"); 
+    waitFor(5); 
+    Msg.info("Wait another 5 seconds. The tasks stop at some point in between"); 
+    waitFor(5); 
+
+    vmHost1.shutdown(); 
+    vmHost3.shutdown(); 
+  }
 }
index 931d2fd..1913e4d 100644 (file)
@@ -5,29 +5,28 @@
 
 package cloud.energy;
 
+import org.simgrid.msg.Msg;
 import org.simgrid.msg.Host;
 import org.simgrid.msg.HostNotFoundException;
-import org.simgrid.msg.Msg;
 import org.simgrid.msg.NativeException;
 
 public class Main {
 
-       public static void main(String[] args) throws NativeException, HostNotFoundException {
-               /* Init. internal values */
-               Msg.energyInit();
-               Msg.init(args);
+  public static void main(String[] args) throws NativeException, HostNotFoundException {
+    Msg.energyInit();
+    Msg.init(args);
 
-               if (args.length < 1) {
-                       Msg.info("Usage: Main platform_file.xml");
-                       System.exit(1);
-               }
+    if (args.length < 1) {
+      Msg.info("Usage: Main ../platforms/energy_platform_file.xml");
+      System.exit(1);
+    }
 
-               /* construct the platform */
-               Msg.createEnvironment(args[0]);
-               
-               /* Create and start a runner for the experiment */
-               new EnergyVMRunner(Host.all()[0],"energy VM runner",null).start();
+    /* construct the platform */
+    Msg.createEnvironment(args[0]);
+    
+    /* Create and start a runner for the experiment */
+    new EnergyVMRunner(Host.all()[0],"energy VM runner",null).start();
 
-               Msg.run();
-       }
+    Msg.run();
+  }
 }
index d321f40..4cd57c4 100644 (file)
@@ -32,9 +32,6 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
 set(txt_files
   ${CMAKE_CURRENT_SOURCE_DIR}/README
   ${txt_files}
index cd0a6ae..df35b64 100644 (file)
@@ -6,37 +6,34 @@
 
 package cloud.migration;
 
+import org.simgrid.msg.Msg;
 import org.simgrid.msg.Host;
 import org.simgrid.msg.HostNotFoundException;
-import org.simgrid.msg.Msg;
 import org.simgrid.msg.NativeException;
 
 public class Main {
-    private static boolean endOfTest = false;
-
-    public static void setEndOfTest(){
-        endOfTest=true;
-    }
+  private static boolean endOfTest = false;
 
-    public static boolean isEndOfTest(){
-        return endOfTest;
-    }
-
-    public static void main(String[] args) throws NativeException {
-       /* Init. internal values */
-        Msg.init(args);
+  public static void setEndOfTest(){
+    endOfTest=true;
+  }
 
-        if (args.length < 2) {
-            Msg.info("Usage  : Main platform_file.xml dployment_file.xml");
-            System.exit(1);
-        }
+  public static boolean isEndOfTest(){
+    return endOfTest;
+  }
 
-       /* construct the platform and deploy the application */
-        Msg.createEnvironment(args[0]);
-        Msg.deployApplication(args[1]);
+  public static void main(String[] args) throws NativeException {
+    Msg.init(args);
 
-        Msg.run();
+    if (args.length < 2) {
+      Msg.info("Usage  : Main platform_file.xml dployment_file.xml");
+      System.exit(1);
+    }
 
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
 
-    }
+    Msg.run();
+  }
 }
index b697049..e67b32c 100644 (file)
-/* Copyright (c) 2014. The SimGrid Team.
+/* Copyright (c) 2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package cloud.migration;
+import java.util.ArrayList;
+import java.util.List;
+
 
 import org.simgrid.msg.*;
 import org.simgrid.msg.Process;
-import java.util.ArrayList;
-import java.util.List;
 
 public class Test extends Process{
 
-    Test(Host host, String name, String[] args) throws HostNotFoundException, NativeException  {
-        super(host, name, args);
+  Test(Host host, String name, String[] args) throws HostNotFoundException, NativeException  {
+    super(host, name, args);
+  }
+
+  public void main(String[] strings) throws MsgException {
+    double startTime = 0;
+    double endTime = 0;
+
+    /* get hosts 1 and 2*/
+    Host host0 = null;
+    Host host1 = null;
+
+    try {
+      host0 = Host.getByName("host0");
+      host1 = Host.getByName("host1");
+    }catch (HostNotFoundException e) {
+      e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
     }
 
-    public void main(String[] strings) throws MsgException {
-
-       double startTime = 0;
-       double endTime = 0;
-
-       /* get hosts 1 and 2*/
-        Host host0 = null;
-        Host host1 = null;
-
-        try {
-            host0 = Host.getByName("host0");
-            host1 = Host.getByName("host1");
-        }catch (HostNotFoundException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-
-        List<VM> vms = new ArrayList<VM>();
-
-      /* Create VM1 */
-        int dpRate = 70;
-        int load1 = 90;
-        int load2 = 80;
-
-
-                 Msg.info("This example evaluates the migration time of a VM in presence of collocated VMs on the source and the dest nodes");
-                 Msg.info("The migrated VM has a memory intensity rate of 70% of the network BW and a cpu load of 90% \"(see cloudcom 2013 paper \"Adding a Live Migration Model Into SimGrid\" for further information) ");
-
-                 Msg.info("Load of collocated VMs fluctuate between 0 and 90% in order to create a starvation issue and see whether it impacts or not the migration time");
-        XVM vm1 = null;
-        vm1 = new XVM(
-                host0,
-                "vm0",
-                1, // Nb of vcpu
-                2048, // Ramsize,
-                125, // Net Bandwidth
-                null, //VM disk image
-                -1,   //size of disk image,
-                125, // Net bandwidth,
-                dpRate // Memory intensity
+    List<VM> vms = new ArrayList<VM>();
+
+    /* Create VM1 */
+    int dpRate = 70;
+    int load1 = 90;
+    int load2 = 80;
+
+    Msg.info("This example evaluates the migration time of a VM in presence of collocated VMs on the source and "
+             + "the dest nodes");
+    Msg.info("The migrated VM has a memory intensity rate of 70% of the network BW and a cpu load of 90% \" "
+             +"(see cloudcom 2013 paper \"Adding a Live Migration Model Into SimGrid\" for further information) ");
+
+    Msg.info("Load of collocated VMs fluctuate between 0 and 90% in order to create a starvation issue and see "
+             + "whether it impacts or not the migration time");
+    XVM vm1 = null;
+    vm1 = new XVM(host0, "vm0",
+        1, // Nb of vcpu
+        2048, // Ramsize,
+        125, // Net Bandwidth
+        null, //VM disk image
+        -1,   //size of disk image,
+        125, // Net bandwidth,
+        dpRate // Memory intensity
         );
-        vms.add(vm1);
-        vm1.start();
-
-        /* Collocated VMs */
-        int collocatedSrc = 6;
-        int vmSrcLoad[] = {
-                80,
-                0,
-                90,
-                40,
-                30,
-                90,
-        };
-
-        XVM tmp = null;
-        for (int i=1 ; i<= collocatedSrc ; i++){
-            tmp = new XVM(
-                    host0,
-                    "vm"+i,
-                    1, // Nb of vcpu
-                    2048, // Ramsize,
-                    125, // Net Bandwidth
-                    null, //VM disk image
-                    -1,   //size of disk image,
-                    125, // Net bandwidth,
-                    dpRate // Memory intensity
-            );
-            vms.add(tmp);
-            tmp.start();
-            tmp.setLoad(vmSrcLoad[i-1]);
-        }
-
-        int collocatedDst = 6;
-        int vmDstLoad[] = {
-                0,
-                40,
-                90,
-                100,
-                0,
-                80,
-        };
-
-        for (int i=1 ; i <= collocatedDst ; i++){
-            tmp = new XVM(
-                    host1,
-                    "vm"+(i+collocatedSrc),
-                    1, // Nb of vcpu
-                    2048, // Ramsize,
-                    125, // Net Bandwidth
-                    null, //VM disk image
-                    -1,   //size of disk image,
-                    125, // Net bandwidth,
-                    dpRate // Memory intensity
-            );
-            vms.add(tmp);
-            tmp.start();
-            tmp.setLoad(vmDstLoad[i-1]);
-        }
-
-        Msg.info("Round trip of VM1 (load "+load1+"%)");
-        vm1.setLoad(load1);
-        Msg.info("     - Launch migration from host 0 to host 1");
-        startTime = Msg.getClock();
-        vm1.migrate(host1);
-        endTime = Msg.getClock();
-        Msg.info("     - End of Migration from host 0 to host 1 (duration:"+(endTime-startTime)+")");
-        Msg.info("     - Launch migration from host 1 to host 0");
-        startTime = Msg.getClock();
-        vm1.migrate(host0);
-        endTime = Msg.getClock();
-        Msg.info("     - End of Migration from host 1 to host 0 (duration:"+(endTime-startTime)+")");
-
-
-        Msg.info("\n \n \nRound trip of VM1 (load "+load2+"%)");
-        vm1.setLoad(load2);
-        Msg.info("     - Launch migration from host 0 to host 1");
-        startTime = Msg.getClock();
-        vm1.migrate(host1);
-        endTime = Msg.getClock();
-        Msg.info("     - End of Migration from host 0 to host 1 (duration:"+(endTime-startTime)+")");
-        Msg.info("     - Launch migration from host 1 to host 0");
-        startTime = Msg.getClock();
-        vm1.migrate(host0);
-        endTime = Msg.getClock();
-        Msg.info("     - End of Migration from host 1 to host 0 (duration:"+(endTime-startTime)+")");
-
-        Main.setEndOfTest();
-        Msg.info("Forcefully destroy VMs");
-        for (VM vm: vms)
-         vm.finalize();
-       
+    vms.add(vm1);
+    vm1.start();
+
+    /* Collocated VMs */
+    int collocatedSrc = 6;
+    int vmSrcLoad[] = {
+        80,
+        0,
+        90,
+        40,
+        30,
+        90,
+    };
+
+    XVM tmp = null;
+    for (int i=1 ; i<= collocatedSrc ; i++){
+      tmp = new XVM(host0, "vm"+i,
+          1, // Nb of vcpu
+          2048, // Ramsize,
+          125, // Net Bandwidth
+          null, //VM disk image
+          -1,   //size of disk image,
+          125, // Net bandwidth,
+          dpRate // Memory intensity
+          );
+      vms.add(tmp);
+      tmp.start();
+      tmp.setLoad(vmSrcLoad[i-1]);
     }
+
+    int collocatedDst = 6;
+    int vmDstLoad[] = {
+        0,
+        40,
+        90,
+        100,
+        0,
+        80,
+    };
+
+    for (int i=1 ; i <= collocatedDst ; i++){
+      tmp = new XVM(host1, "vm"+(i+collocatedSrc),
+          1, // Nb of vcpu
+          2048, // Ramsize,
+          125, // Net Bandwidth
+          null, //VM disk image
+          -1,   //size of disk image,
+          125, // Net bandwidth,
+          dpRate // Memory intensity
+          );
+      vms.add(tmp);
+      tmp.start();
+      tmp.setLoad(vmDstLoad[i-1]);
+    }
+
+    Msg.info("Round trip of VM1 (load "+load1+"%)");
+    vm1.setLoad(load1);
+    Msg.info("     - Launch migration from host 0 to host 1");
+    startTime = Msg.getClock();
+    vm1.migrate(host1);
+    endTime = Msg.getClock();
+    Msg.info("     - End of Migration from host 0 to host 1 (duration:"+(endTime-startTime)+")");
+    Msg.info("     - Launch migration from host 1 to host 0");
+    startTime = Msg.getClock();
+    vm1.migrate(host0);
+    endTime = Msg.getClock();
+    Msg.info("     - End of Migration from host 1 to host 0 (duration:"+(endTime-startTime)+")");
+
+    Msg.info("");
+    Msg.info("");
+    Msg.info("Round trip of VM1 (load "+load2+"%)");
+    vm1.setLoad(load2);
+    Msg.info("     - Launch migration from host 0 to host 1");
+    startTime = Msg.getClock();
+    vm1.migrate(host1);
+    endTime = Msg.getClock();
+    Msg.info("     - End of Migration from host 0 to host 1 (duration:"+(endTime-startTime)+")");
+    Msg.info("     - Launch migration from host 1 to host 0");
+    startTime = Msg.getClock();
+    vm1.migrate(host0);
+    endTime = Msg.getClock();
+    Msg.info("     - End of Migration from host 1 to host 0 (duration:"+(endTime-startTime)+")");
+
+    Main.setEndOfTest();
+    Msg.info("Forcefully destroy VMs");
+    for (VM vm: vms)
+      vm.finalize();
+  }
 }
index 47467bd..a564bb9 100644 (file)
 
 package cloud.migration;
 
-import org.simgrid.msg.*;
-import org.simgrid.msg.Process;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random; 
 
-// This test aims at validating that the migration process is robust in face of host turning off either on the SRC node or on the DST node. 
+import org.simgrid.msg.*;
+import org.simgrid.msg.Process;
 
+// This test aims at validating that the migration process is robust in face of host turning off either on the SRC 
+// node or on the DST node. 
 public class TestHostOnOff extends Process{    
 
-       public static Host host0 = null;
-        public static Host host1 = null;
-       public static Host host2 = null;
-     
+  public static Host host0 = null;
+  public static Host host1 = null;
+  public static Host host2 = null;
 
-    TestHostOnOff(Host host, String name, String[] args) throws HostNotFoundException, NativeException  {
-        super(host, name, args);
-    }
 
-    public void main(String[] strings) throws MsgException {
+  TestHostOnOff(Host host, String name, String[] args) throws HostNotFoundException, NativeException {
+    super(host, name, args);
+  }
 
-       double startTime = 0;
-       double endTime = 0;
+  public void main(String[] strings) throws MsgException {
+    double startTime = 0;
+    double endTime = 0;
 
-       /* get hosts 1 and 2*/
-       try {
-            host0 = Host.getByName("host0");
-            host1 = Host.getByName("host1");
-            host1 = Host.getByName("host2");
-        }catch (HostNotFoundException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-       
-        // Robustness on the SRC node
-       //for (int i =0 ; i < 55000 ; i++)
-        //  test_vm_migrate(host1, i);
-
-        // Robustness on the DST node
-       //for (int i =0 ; i < 55000 ; i++)
-        //  test_vm_migrate(host2, i);
-
-       /* End of Tests */
-        Msg.info("Nor more tests, Bye Bye !");
-        Main.setEndOfTest();
+    /* get hosts 1 and 2*/
+    try {
+      host0 = Host.getByName("host0");
+      host1 = Host.getByName("host1");
+      host1 = Host.getByName("host2");
+    }catch (HostNotFoundException e) {
+      e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
     }
 
-      public static void test_vm_migrate (Host hostToKill, long killAt) throws MsgException {
-        Msg.info("**** **** **** ***** ***** Test Migrate with host shutdown ***** ***** **** **** ****");
-        Msg.info("Turn on one host, assign a VM on this host, launch a process inside the VM, migrate the VM and turn off either the SRC or DST");
-
-        host1.off();
-        host2.off();
-        host1.on();
-        host2.on();
-
-        // Create VM0
-        int dpRate = 70;
-        XVM vm0 = null;
-        vm0 = new XVM(
-                host1,
-                "vm0",
-                1, // Nb of vcpu
-                2048, // Ramsize,
-                125, // Net Bandwidth
-                null, //VM disk image
-                -1,   //size of disk image,
-                125, // Net bandwidth,
-                dpRate // Memory intensity
+    // Robustness on the SRC node
+    //for (int i =0 ; i < 55000 ; i++)
+    //  test_vm_migrate(host1, i);
+
+    // Robustness on the DST node
+    //for (int i =0 ; i < 55000 ; i++)
+    //  test_vm_migrate(host2, i);
+
+    /* End of Tests */
+    Msg.info("Nor more tests, Bye Bye !");
+    Main.setEndOfTest();
+  }
+
+  public static void test_vm_migrate (Host hostToKill, long killAt) throws MsgException {
+    Msg.info("**** **** **** ***** ***** Test Migrate with host shutdown ***** ***** **** **** ****");
+    Msg.info("Turn on one host, assign a VM on this host, launch a process inside the VM, migrate the VM and "
+             + "turn off either the SRC or DST");
+
+    host1.off();
+    host2.off();
+    host1.on();
+    host2.on();
+
+    // Create VM0
+    int dpRate = 70;
+    XVM vm0 = null;
+    vm0 = new XVM(host1, "vm0",
+        1, // Nb of vcpu
+        2048, // Ramsize,
+        125, // Net Bandwidth
+        null, //VM disk image
+        -1,   //size of disk image,
+        125, // Net bandwidth,
+        dpRate // Memory intensity
         );
-        vm0.start();
-        vm0.setLoad(90);
-
-        String[] args = new String[3];
-
-        args[0] = "vm0";
-        args[1] = "host1";
-        args[2] = "host2";
-        new Process(host1, "Migrate-" + new Random().nextDouble(), args) {
-            public void main(String[] args) {
-                Host destHost = null;
-                Host sourceHost = null;
-
-                try {
-                    sourceHost = Host.getByName(args[1]);
-                    destHost = Host.getByName(args[2]);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    System.err.println("You are trying to migrate from/to a non existing node");
-                }
-                if (destHost != null) {
-                    if (sourceHost.isOn() && destHost.isOn()) {
-
-                        try {
-                            Msg.info("Migrate vm "+args[0]+" to node "+destHost.getName());
-                            VM.getVMByName(args[0]).migrate(destHost);
-                        } catch (HostFailureException e) {
-                            e.printStackTrace();
-                            Msg.info("Something occurs during the migration that cannot validate the operation");
-                        }
-                    }
-                }
-
+    vm0.start();
+    vm0.setLoad(90);
+
+    String[] args = new String[3];
+
+    args[0] = "vm0";
+    args[1] = "host1";
+    args[2] = "host2";
+    new Process(host1, "Migrate-" + new Random().nextDouble(), args) {
+      public void main(String[] args) {
+        Host destHost = null;
+        Host sourceHost = null;
+
+        try {
+          sourceHost = Host.getByName(args[1]);
+          destHost = Host.getByName(args[2]);
+        } catch (Exception e) {
+          e.printStackTrace();
+          System.err.println("You are trying to migrate from/to a non existing node");
+        }
+        if (destHost != null) {
+          if (sourceHost.isOn() && destHost.isOn()) {
+            try {
+              Msg.info("Migrate vm "+args[0]+" to node "+destHost.getName());
+              VM.getVMByName(args[0]).migrate(destHost);
+            } catch (HostFailureException e) {
+              e.printStackTrace();
+              Msg.info("Something occurs during the migration that cannot validate the operation");
             }
-        }.start();
-        
-       // Wait killAt ms before killing thehost
-       Process.sleep(killAt);
-        hostToKill.off();
-        Process.sleep(5);
-        Msg.info("The migration process should be stopped and we should catch an exception\n");
-        Process.sleep(5);
-
-        Process.sleep(50000);
-        Msg.info("Destroy VMs");
-        vm0.shutdown();
-        Process.sleep(20000);
-    }
-
-
-    public static void test_vm_shutdown_destroy () throws HostFailureException {
-
-        Msg.info("**** **** **** ***** ***** Test shutdown a VM ***** ***** **** **** ****");
-        Msg.info("Turn on host1, assign a VM on host1, launch a process inside the VM, and turn off the vm, " +
-                "and check whether you can reallocate the same VM");
-
-
-        // Create VM0
-        int dpRate = 70;
-        XVM vm0 = null;
-        vm0 = new XVM(
-                host1,
-                "vm0",
-                1, // Nb of vcpu
-                2048, // Ramsize,
-                125, // Net Bandwidth
-                null, //VM disk image
-                -1,   //size of disk image,
-                125, // Net bandwidth,
-                dpRate // Memory intensity
+          }
+        }
+      }
+    }.start();
+
+    // Wait killAt ms before killing thehost
+    Process.sleep(killAt);
+    hostToKill.off();
+    Process.sleep(5);
+    Msg.info("The migration process should be stopped and we should catch an exception\n");
+    Process.sleep(5);
+
+    Process.sleep(50000);
+    Msg.info("Destroy VMs");
+    vm0.shutdown();
+    Process.sleep(20000);
+  }
+
+  public static void test_vm_shutdown_destroy () throws HostFailureException {
+    Msg.info("**** **** **** ***** ***** Test shutdown a VM ***** ***** **** **** ****");
+    Msg.info("Turn on host1, assign a VM on host1, launch a process inside the VM, and turn off the vm, " +
+        "and check whether you can reallocate the same VM");
+
+    // Create VM0
+    int dpRate = 70;
+    XVM vm0 = null;
+    vm0 = new XVM(host1, "vm0",
+        1, // Nb of vcpu
+        2048, // Ramsize,
+        125, // Net Bandwidth
+        null, //VM disk image
+        -1,   //size of disk image,
+        125, // Net bandwidth,
+        dpRate // Memory intensity
         );
-        Msg.info("Start VM0");
-        vm0.start();
-        vm0.setLoad(90);
-
-        Process.sleep(5000);
-
-        Msg.info("Shutdown VM0");
-        vm0.shutdown();
-        Process.sleep(5000);
-
-        Msg.info("Restart VM0");
-        vm0 = new XVM(
-                host1,
-                "vm0",
-                1, // Nb of vcpu
-                2048, // Ramsize,
-                125, // Net Bandwidth
-                null, //VM disk image
-                -1,   //size of disk image,
-                125, // Net bandwidth,
-                dpRate // Memory intensity
+    Msg.info("Start VM0");
+    vm0.start();
+    vm0.setLoad(90);
+
+    Process.sleep(5000);
+
+    Msg.info("Shutdown VM0");
+    vm0.shutdown();
+    Process.sleep(5000);
+
+    Msg.info("Restart VM0");
+    vm0 = new XVM(host1, "vm0",
+        1, // Nb of vcpu
+        2048, // Ramsize,
+        125, // Net Bandwidth
+        null, //VM disk image
+        -1,   //size of disk image,
+        125, // Net bandwidth,
+        dpRate // Memory intensity
         );
-        vm0.start();
-        vm0.setLoad(90);
-    
-       Msg.info("You suceed to recreate and restart a VM without generating any exception ! Great the Test is ok");
-               
-        Process.sleep(5000);
-        vm0.shutdown();
-    }
-
-}
-
-
+    vm0.start();
+    vm0.setLoad(90);
 
+    Msg.info("You suceed to recreate and restart a VM without generating any exception ! Great the Test is ok");
 
+    Process.sleep(5000);
+    vm0.shutdown();
+  }
+}
index 6e3671e..f34da08 100644 (file)
@@ -6,77 +6,71 @@
 
 package cloud.migration;
 
+import org.simgrid.msg.Msg;
+import org.simgrid.msg.VM;
 import org.simgrid.msg.Host;
 import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.HostFailureException;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.VM;
 
-/**
- * A stupid VM extension to associate a daemon to the VM
- */
 public class XVM extends VM {
+  private int dpIntensity;
+  private int netBW;
+  private int ramsize;
+  private int currentLoad;
 
+  private Daemon daemon;
 
-    private int dpIntensity;
-    private int netBW;
-    private int ramsize;
-    private int currentLoad;
-
-    private Daemon daemon;
-
-    public XVM(Host host, String name,
-               int nbCores, int ramsize, int netBW, String diskPath, int diskSize, int migNetBW, int dpIntensity){
-        super(host, name, nbCores, ramsize, netBW, diskPath, diskSize, (int)(migNetBW*0.9), dpIntensity);
-        this.currentLoad = 0;
-        this.netBW = netBW ;
-        this. dpIntensity = dpIntensity ;
-        this.ramsize= ramsize;
-        this.daemon = new Daemon(this, 100);
+  public XVM(Host host, String name,
+    int nbCores, int ramsize, int netBW, String diskPath, int diskSize, int migNetBW, int dpIntensity){
+    super(host, name, nbCores, ramsize, netBW, diskPath, diskSize, (int)(migNetBW*0.9), dpIntensity);
+    this.currentLoad = 0;
+    this.netBW = netBW ;
+    this. dpIntensity = dpIntensity ;
+    this.ramsize= ramsize;
+    this.daemon = new Daemon(this, 100);
+  }
 
+  public void setLoad(int load){  
+    if (load >0) {
+      this.setBound(load);
+      //    this.getDaemon().setLoad(load);
+      daemon.resume();
+    } else{
+      daemon.suspend();
     }
+    currentLoad = load ;
+  }
 
-    public void setLoad(int load){  
-        if (load >0) {
-            this.setBound(load);
-        //    this.getDaemon().setLoad(load);
-            daemon.resume();
-        }
-        else{
-            daemon.suspend();
-        }
-        currentLoad = load ;
+  public void start(){
+    super.start();
+    try {
+      daemon.start();
+    } catch (HostNotFoundException e) {
+      e.printStackTrace();
     }
+    this.setLoad(0);
+  }
 
-    public void start(){
-        super.start();
-         try {
-            daemon.start();
-        } catch (HostNotFoundException e) {
-            e.printStackTrace();
-        }
-        this.setLoad(0);
+  public Daemon getDaemon(){
+    return this.daemon;
+  }
 
-    }
-    public Daemon getDaemon(){
-        return this.daemon;
-    }
-    public int getLoad(){
-       System.out.println("Remaining comp:" + this.daemon.getRemaining());
-        return this.currentLoad;
-    }
+  public int getLoad(){
+    System.out.println("Remaining comp:" + this.daemon.getRemaining());
+    return this.currentLoad;
+  }
 
-    public void migrate(Host host) throws HostFailureException {
-        Msg.info("Start migration of VM " + this.getName() + " to " + host.getName());
-        Msg.info("    currentLoad:" + this.currentLoad + "/ramSize:" + this.ramsize + "/dpIntensity:" + this.dpIntensity 
-                       + "/remaining:" + String.format(java.util.Locale.US, "%.2E",this.daemon.getRemaining()));
-        try{
-               super.migrate(host);
-       } catch (Exception e){
-               Msg.info("Something wrong during the live migration of VM "+this.getName());
-               throw new HostFailureException(); 
-        }
-        this.setLoad(this.currentLoad); //Fixed the fact that setBound is not propagated to the new node.
-        Msg.info("End of migration of VM " + this.getName() + " to node " + host.getName());
+  public void migrate(Host host) throws HostFailureException {
+    Msg.info("Start migration of VM " + this.getName() + " to " + host.getName());
+    Msg.info("    currentLoad:" + this.currentLoad + "/ramSize:" + this.ramsize + "/dpIntensity:" + this.dpIntensity 
+        + "/remaining:" + String.format(java.util.Locale.US, "%.2E",this.daemon.getRemaining()));
+    try{
+      super.migrate(host);
+    } catch (Exception e){
+      Msg.info("Something wrong during the live migration of VM "+this.getName());
+      throw new HostFailureException(); 
     }
+    this.setLoad(this.currentLoad); //Fixed the fact that setBound is not propagated to the new node.
+    Msg.info("End of migration of VM " + this.getName() + " to node " + host.getName());
+  }
 }
index cdf9b7c..0b5dffa 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-    <process host="host0" function="cloud/migration/Test">
-    </process>
+  <process host="host0" function="cloud/migration/Test"/>
 </platform>
index 34b2b21..fd5c496 100644 (file)
@@ -3,7 +3,7 @@
 $ java -classpath ${classpath:=.} cloud/migration/Main ${srcdir:=.}/../platforms/two_hosts_platform.xml ${srcdir:=.}/cloud/migration/deploy_simple.xml
 > [0.000000] [jmsg/INFO] Using regular java threads.
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] This example evaluates the migration time of a VM in presence of collocated VMs on the source and the dest nodes
-> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] The migrated VM has a memory intensity rate of 70% of the network BW and a cpu load of 90% "(see cloudcom 2013 paper "Adding a Live Migration Model Into SimGrid" for further information) 
+> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] The migrated VM has a memory intensity rate of 70% of the network BW and a cpu load of 90% " (see cloudcom 2013 paper "Adding a Live Migration Model Into SimGrid" for further information) 
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] Load of collocated VMs fluctuate between 0 and 90% in order to create a starvation issue and see whether it impacts or not the migration time
 > [0.000000] [surf_vm/INFO] Create VM(vm0)@PM(host0) with 0 mounted disks
 > [0.000000] [surf_vm/INFO] Create VM(vm1)@PM(host0) with 0 mounted disks
@@ -32,9 +32,8 @@ $ java -classpath ${classpath:=.} cloud/migration/Main ${srcdir:=.}/../platforms
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO] End of migration of VM vm0 to node host0
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO]      - End of Migration from host 1 to host 0 (duration:32.46684874546391)
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO] 
->  
->  
-> Round trip of VM1 (load 80%)
+> [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO] 
+> [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO] Round trip of VM1 (load 80%)
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO]      - Launch migration from host 0 to host 1
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO] Start migration of VM vm0 to host1
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO]     currentLoad:80/ramSize:2048/dpIntensity:70/remaining:4.64E+11
index fbaa0c6..5014ac6 100644 (file)
@@ -31,10 +31,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/README
-  PARENT_SCOPE)
index 417aa27..46bf24c 100644 (file)
@@ -9,28 +9,21 @@ import org.simgrid.msg.Msg;
 import org.simgrid.msg.NativeException;
 
 public class CommTimeTest {
-       
-   /* This only contains the launcher. If you do nothing more than than you can run 
-    *   java simgrid.msg.Msg
-    * which also contains such a launcher
-    */
-   
-    public static void main(String[] args) throws NativeException {
-       
-       /* initialize the MSG simulation. Must be done before anything else (even logging). */
-       Msg.init(args);
+  public static void main(String[] args) throws NativeException {
 
-       if(args.length < 2) {                   
-         Msg.info("Usage   : CommTime platform_file deployment_file");
-         Msg.info("example : CommTime comm_time_platform.xml comm_time_deployment.xml");
-         System.exit(1);
-       }
-       
-       /* construct the platform and deploy the application */
-       Msg.createEnvironment(args[0]);
-       Msg.deployApplication(args[1]);
-               
-       /*  execute the simulation. */
-        Msg.run();
+    Msg.init(args);
+
+    if(args.length < 2) {
+      Msg.info("Usage   : CommTime platform_file deployment_file");
+      Msg.info("example : CommTime ../platforms/platform.xml commTimeDeployment.xml");
+      System.exit(1);
     }
+
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
+
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
index f5dcc18..f11da75 100644 (file)
@@ -7,9 +7,8 @@
 package commTime;
 import org.simgrid.msg.*;
 
-public class FinalizeTask extends Task {       
-   public FinalizeTask() {
-      super("",0,0);
-   }
+public class FinalizeTask extends Task {
+  public FinalizeTask() {
+    super("",0,0);
+  }
 }
-    
\ No newline at end of file
index 9193702..37da768 100644 (file)
@@ -1,5 +1,3 @@
-/* Master of a basic master/slave example in Java */
-
 /* Copyright (c) 2006-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
@@ -15,37 +13,37 @@ import org.simgrid.msg.Process;
 import org.simgrid.msg.Task;
 
 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");
-        System.exit(1);
-      }
-      
-      int tasksCount = Integer.valueOf(args[0]).intValue();            
-      double taskComputeSize = Double.valueOf(args[1]).doubleValue();          
-      double taskCommunicateSize = Double.valueOf(args[2]).doubleValue();
-      
-      int slavesCount = Integer.valueOf(args[3]).intValue();
-      
-      Msg.info("Hello! Got "+  slavesCount + " slaves and "+tasksCount+" tasks to process");
-      
-      for (int i = 0; i < tasksCount; i++) {
-        Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize);
-        if (i%1000==0)
-          Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
-        task.send("slave_"+(i%slavesCount));
-      }
-      
-      Msg.info("All tasks have been dispatched. Let's tell everybody the computation is over.");
-      
-      for (int i = 0; i < slavesCount; i++) {
-        FinalizeTask task = new FinalizeTask();
-        task.send("slave_"+(i%slavesCount));
-      }
-      
-      Msg.info("Goodbye now!");
+  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");
+      System.exit(1);
+    }
+
+    int tasksCount = Integer.valueOf(args[0]).intValue();    
+    double taskComputeSize = Double.valueOf(args[1]).doubleValue();    
+    double taskCommunicateSize = Double.valueOf(args[2]).doubleValue();
+
+    int slavesCount = Integer.valueOf(args[3]).intValue();
+
+    Msg.info("Hello! Got "+  slavesCount + " slaves and "+tasksCount+" tasks to process");
+
+    for (int i = 0; i < tasksCount; i++) {
+      Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize);
+      if (i%1000==0)
+         Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
+         task.send("slave_"+(i%slavesCount));
+       }
+
+    Msg.info("All tasks have been dispatched. Let's tell everybody the computation is over.");
+
+    for (int i = 0; i < slavesCount; i++) {
+      FinalizeTask task = new FinalizeTask();
+      task.send("slave_"+(i%slavesCount));
     }
+    Msg.info("Goodbye now!");
+  }
 }
diff --git a/examples/java/commTime/README b/examples/java/commTime/README
deleted file mode 100644 (file)
index 6512acd..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory is almost exactly the same example than the
-master/slave, the only differences are:
- * there is no forwarder here
- * the outputs are a bit less verbose
- * the example give a lot more work to do (this is used for benchmarking)
\ No newline at end of file
index c90ad64..7711a92 100644 (file)
@@ -5,31 +5,28 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package commTime;
-
 import org.simgrid.msg.*;
 
 public class Slave extends org.simgrid.msg.Process {
-       public Slave(Host host, String name, String[]args) {
-               super(host,name,args);
-       } 
-       public void main(String[] args) throws MsgException {
-      if (args.length < 1) {
-        Msg.info("Slave needs 1 argument (its number)");
-        System.exit(1);
-      }
+  public Slave(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+  public void main(String[] args) throws MsgException {
+    if (args.length < 1) {
+       Msg.info("Slave needs 1 argument (its number)");
+       System.exit(1);
+    }
 
-      int num = Integer.valueOf(args[0]).intValue();
-      Msg.info("Receiving on 'slave_"+num+"'");
-      
-      while(true) { 
-        Task task = Task.receive("slave_"+num);        
-        
-        if (task instanceof FinalizeTask) {
-           break;
-        }
-        task.execute();
-       }
-       
-      Msg.info("Received Finalize. I'm done. See you!");
+    int num = Integer.valueOf(args[0]).intValue();
+    Msg.info("Receiving on 'slave_"+num+"'");
+
+    while(true) { 
+      Task task = Task.receive("slave_"+num);  
+      if (task instanceof FinalizeTask) {
+        break;
+      }
+      task.execute();
     }
+    Msg.info("Received Finalize. I'm done. See you!");
+  }
 }
\ No newline at end of file
index 3a1fa8f..a229c37 100644 (file)
@@ -7,49 +7,26 @@
      <argument value="10"/>    <!-- Communication size of each one -->
      <argument value="21"/>    <!-- Amount of commTime.Slaves waiting for orders -->
   </process>
-  
-  <process host="iRMX" function="commTime.Slave">
-     <argument value="0"/>  <!-- Input mailbox -->
-  </process>
-  
-  <process host="Bousquet" function="commTime.Slave">
-     <argument value="1"/></process>
-  <process host="Soucy" function="commTime.Slave">
-     <argument value="2"/></process>
-  <process host="Casavant" function="commTime.Slave">
-     <argument value="3"/></process>
-  <process host="Jackson" function="commTime.Slave">
-     <argument value="4"/></process>
-  <process host="Geoff" function="commTime.Slave">
-     <argument value="5"/></process>
-  <process host="Disney" function="commTime.Slave">
-     <argument value="6"/></process>
-  <process host="McGee" function="commTime.Slave">
-     <argument value="7"/></process>
-  <process host="Gatien" function="commTime.Slave">
-     <argument value="8"/></process>
-  <process host="Laroche" function="commTime.Slave">
-     <argument value="9"/></process>
-  <process host="Tanguay" function="commTime.Slave">
-     <argument value="10"/></process>
-  <process host="Morin" function="commTime.Slave">
-     <argument value="11"/></process>
-  <process host="Ethernet" function="commTime.Slave">
-     <argument value="12"/></process>
-  <process host="Bellemarre" function="commTime.Slave">
-     <argument value="13"/></process>
-  <process host="Harry" function="commTime.Slave">
-     <argument value="14"/></process>
-  <process host="Olivier" function="commTime.Slave">
-     <argument value="15"/></process>
-  <process host="Boucherville" function="commTime.Slave">
-     <argument value="16"/></process>
-  <process host="Pointe_Claire" function="commTime.Slave">
-     <argument value="17"/></process>
-  <process host="Kansas" function="commTime.Slave">
-     <argument value="18"/></process>
-  <process host="King" function="commTime.Slave">
-     <argument value="19"/></process>
-  <process host="Lapointe" function="commTime.Slave">
-     <argument value="20"/></process>
+
+  <process host="iRMX" function="commTime.Slave">          <argument value="0"/>  <!-- Input mailbox --></process>
+  <process host="Bousquet" function="commTime.Slave">      <argument value="1"/></process>
+  <process host="Soucy" function="commTime.Slave">         <argument value="2"/></process>
+  <process host="Casavant" function="commTime.Slave">      <argument value="3"/></process>
+  <process host="Jackson" function="commTime.Slave">       <argument value="4"/></process>
+  <process host="Geoff" function="commTime.Slave">         <argument value="5"/></process>
+  <process host="Disney" function="commTime.Slave">        <argument value="6"/></process>
+  <process host="McGee" function="commTime.Slave">         <argument value="7"/></process>
+  <process host="Gatien" function="commTime.Slave">        <argument value="8"/></process>
+  <process host="Laroche" function="commTime.Slave">       <argument value="9"/></process>
+  <process host="Tanguay" function="commTime.Slave">       <argument value="10"/></process>
+  <process host="Morin" function="commTime.Slave">         <argument value="11"/></process>
+  <process host="Ethernet" function="commTime.Slave">      <argument value="12"/></process>
+  <process host="Bellemarre" function="commTime.Slave">    <argument value="13"/></process>
+  <process host="Harry" function="commTime.Slave">         <argument value="14"/></process>
+  <process host="Olivier" function="commTime.Slave">       <argument value="15"/></process>
+  <process host="Boucherville" function="commTime.Slave">  <argument value="16"/></process>
+  <process host="Pointe_Claire" function="commTime.Slave"> <argument value="17"/></process>
+  <process host="Kansas" function="commTime.Slave">        <argument value="18"/></process>
+  <process host="King" function="commTime.Slave">          <argument value="19"/></process>
+  <process host="Lapointe" function="commTime.Slave">      <argument value="20"/></process>
 </platform>
index 7388cd3..2ad4d43 100644 (file)
@@ -28,9 +28,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index 8f70b7b..5d6884d 100644 (file)
@@ -6,36 +6,34 @@
 
 package energy;
 
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.MsgException;
-/**
- * Example showing the use of the new experimental Cloud API.
- */
+
 public class Energy {
-       public static final double task_comp_size = 10;
-       public static final double task_comm_size = 10;
-       public static final int hostNB = 2 ; 
-       public static void main(String[] args) throws MsgException {  
-               Msg.energyInit(); 
-           Msg.init(args); 
-           
-           if (args.length < 1) {
-               Msg.info("Usage  : Cloud platform_file");
-               Msg.info("Usage  : Cloud platform.xml");
-               System.exit(1);
-           }
-           /* Construct the platform */
-               Msg.createEnvironment(args[0]);
-               Host[] hosts = Host.all();
-               if (hosts.length < 1) {
-                       Msg.info("I need at least one host in the platform file, but " + args[0] + " contains only " + hosts.length + " hosts");
-                       System.exit(42);
-               }
-               /* Instanciate a process */
-               new EnergyConsumer(hosts[0],"energyConsumer",null).start();
-               /* Execute the simulation */
-               Msg.run();
-               
+  public static final double task_comp_size = 10;
+  public static final double task_comm_size = 10;
+  public static final int hostNB = 2 ; 
+
+  public static void main(String[] args) throws MsgException {  
+    Msg.energyInit(); 
+    Msg.init(args); 
+
+    if (args.length < 1) {
+      Msg.info("Usage   : Energy platform_file");
+      Msg.info("Usage  : Energy ../platforms/energy_platform.xml");
+      System.exit(1);
+    }
+    /* Construct the platform */
+    Msg.createEnvironment(args[0]);
+    Host[] hosts = Host.all();
+    if (hosts.length < 1) {
+      Msg.info("I need at least one host in the platform file, but " + args[0] + " has no host at all");
+      System.exit(42);
     }
+    /* Instanciate a process */
+    new EnergyConsumer(hosts[0],"energyConsumer",null).start();
+    /* Execute the simulation */
+    Msg.run();
+  }
 }
index 50b6ea8..bf3be52 100644 (file)
@@ -6,24 +6,25 @@
 
 package energy;
 
+import org.simgrid.msg.Msg;
 import org.simgrid.msg.Comm;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Process;
 import org.simgrid.msg.Task;
+import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 import org.simgrid.msg.TimeoutException;
 
 public class EnergyConsumer extends Process {
-       public EnergyConsumer(Host host, String name, String[] args) {
-               super(host,name,args);
-       }
-       @Override
-       public void main(String[] args) throws MsgException {
-          Msg.info("Currently consumed energy: "+getHost().getConsumedEnergy());
-          this.waitFor(10);
-          Msg.info("Currently consumed energy after sleeping 10 sec: "+getHost().getConsumedEnergy());
-          new Task(null, 1E9, 0).execute();
-          Msg.info("Currently consumed energy after executing 1E9 flops: "+getHost().getConsumedEnergy());        
-       }
+  public EnergyConsumer(Host host, String name, String[] args) {
+    super(host,name,args);
+  }
+
+  @Override
+  public void main(String[] args) throws MsgException {
+     Msg.info("Currently consumed energy: "+getHost().getConsumedEnergy());
+     this.waitFor(10);
+     Msg.info("Currently consumed energy after sleeping 10 sec: "+getHost().getConsumedEnergy());
+     new Task(null, 1E9, 0).execute();
+     Msg.info("Currently consumed energy after executing 1E9 flops: "+getHost().getConsumedEnergy());
+  }
 }
index 49f15e3..c761d3b 100644 (file)
@@ -21,6 +21,7 @@ endif()
 
 set(tesh_files
   ${tesh_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/storage.tesh
   PARENT_SCOPE)
 set(xml_files
   ${xml_files}
@@ -29,9 +30,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index b8d718f..fdddde7 100644 (file)
 
 package io;
 
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Process;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.Storage;
+import org.simgrid.msg.HostNotFoundException;
+import org.simgrid.msg.MsgException;
 
 public class Client extends Process {
-  
   public Client(Host host, int number) throws HostNotFoundException {
     super(host, Integer.toString(number), null);
   }
-  
+
   public void main(String[] args) throws MsgException {
-    
-       // Retrieve all mount points of current host
+   // Retrieve all mount points of current host
     Storage[] storages = getHost().getMountedStorage();
-    
-       for (int i = 0; i < storages.length; i++) {
-               // For each disk mounted on host
-               Msg.info("------------------------------------");
-               Msg.info("Disk name: "+storages[i].getName());
-               Msg.info("Size: "+storages[i].getSize()+" bytes.");
-               Msg.info("Free Size: "+storages[i].getFreeSize()+" bytes.");
-               Msg.info("Used Size: "+storages[i].getUsedSize()+" bytes.");
-               
-       }
-       
-       Storage st = Storage.getByName("Disk2");
-       Msg.info("Disk name: "+st.getName());
-       Msg.info("Attached to host:"+st.getHost());
-       
-       
-       st.setProperty("key","Pierre");
-       Msg.info("Property key: "+st.getProperty("key"));
-       
-       Host h = Host.currentHost();
-       h.setProperty("key2","Pierre");
-       Msg.info("Property key2: "+h.getProperty("key"));
-       
-       
-       String[] attach = h.getAttachedStorage();
-       for (int j = 0; j < attach.length; j++) {
-               Msg.info("Disk attached: "+attach[j]);
-       }
-       
-       Msg.info("**************** ALL *************************");
-       
-       Storage[] stos = Storage.all();
-       for (int i = 0; i < stos.length; i++) {
-               Msg.info("Disk: "+ stos[i].getName());
-       }
-       
-       
+
+    for (int i = 0; i < storages.length; i++) {
+      // For each disk mounted on host
+      Msg.info("------------------------------------");
+      Msg.info("Disk name: "+storages[i].getName());
+      Msg.info("Size: "+storages[i].getSize()+" bytes.");
+      Msg.info("Free Size: "+storages[i].getFreeSize()+" bytes.");
+      Msg.info("Used Size: "+storages[i].getUsedSize()+" bytes.");
+    }
+
+    Storage st = Storage.getByName("Disk2");
+    Msg.info("Disk name: "+st.getName());
+    Msg.info("Attached to host:"+st.getHost());
+
+    st.setProperty("key","Pierre");
+    Msg.info("Property key: "+st.getProperty("key"));
+
+    Host h = Host.currentHost();
+    h.setProperty("key2","Pierre");
+    Msg.info("Property key2: "+h.getProperty("key2"));
+
+    String[] attach = h.getAttachedStorage();
+    for (int j = 0; j < attach.length; j++) {
+      Msg.info("Disk attached: "+attach[j]);
+    }
+
+    Msg.info("**************** ALL *************************");
+    Storage[] stos = Storage.all();
+    for (int i = 0; i < stos.length; i++) {
+      Msg.info("Disk: "+ stos[i].getName());
+    }
   }
 }
\ No newline at end of file
index 4c94dcf..f9de388 100644 (file)
@@ -6,31 +6,28 @@
 
 package io;
 
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.MsgException;
-/**
- * This example demonstrates of how to use the other
- * kind of resources, such as disk or GPU. These resources are quite
- * experimental for now, but here we go anyway.
- */
+
 public class IO {
-    public static void main(String[] args) throws MsgException {       
-               Msg.init(args);
-               if(args.length < 1) {
-                       Msg.info("Usage   : IO platform_file ");
-               Msg.info("example : IO platform.xml ");
-               System.exit(1);
-           }    
-               Msg.createEnvironment(args[0]);
-               
-               Host[] hosts = Host.all();
-               
-               Msg.info("Number of hosts:" + hosts.length);
-               for (int i = 0; i < hosts.length && i < 4; i++) {
-                       new io.Node(hosts[i],i).start();
-               }
-               
-               Msg.run();              
+  public static void main(String[] args) throws MsgException {
+    Msg.init(args);
+    if(args.length < 1) {
+      Msg.info("Usage   : IO platform_file ");
+      Msg.info("example : IO ../platforms/storage/storage.xml ");
+      System.exit(1);
+    }
+
+    Msg.createEnvironment(args[0]);
+
+    Host[] hosts = Host.all();
+
+    Msg.info("Number of hosts:" + hosts.length);
+    for (int i = 0; i < hosts.length && i < 4; i++) {
+      new io.Node(hosts[i],i).start();
     }
+
+    Msg.run();
+  }
 }
\ No newline at end of file
index 4a139b7..42e84b8 100644 (file)
@@ -6,59 +6,61 @@
 
 package io;
 
+import org.simgrid.msg.Msg;
 import org.simgrid.msg.File;
 import org.simgrid.msg.Host;
+import org.simgrid.msg.Process;
 import org.simgrid.msg.HostNotFoundException;
-import org.simgrid.msg.Msg;
 import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Process;
 
 public class Node extends Process {
-       private static String FILENAME1 = "/doc/simgrid/examples/platforms/g5k.xml";
-       private static String FILENAME2 = "\\Windows\\setupact.log";
-       private static String FILENAME3 = "/doc/simgrid/examples/platforms/g5k_cabinets.xml";
-       private static String FILENAME4 = "/doc/simgrid/examples/platforms/nancy.xml";
-                       
-       protected int number;
-               
-       public Node(Host host, int number) throws HostNotFoundException {
-               super(host, Integer.toString(number), null);
-               this.number = number;
-       }       
-       public void main(String[] args) throws MsgException {
-               String mount = "";
-               String filename;
-               switch (number) {
-                       case 0:
-                mount = "/home";
-                               filename = mount + FILENAME1;
-                       break;
-                       case 1:
-                mount = "c:";
-                               filename = mount + FILENAME2;
-                       break;
-                       case 2:
-                mount = "/home";
-                               filename = mount + FILENAME3;
-                       break;
-                       case 3:
-                mount = "/home";
-                               filename = mount + FILENAME4;
-                       break;
-                       default:
-                mount = "/home";
-                               filename = mount + FILENAME1;
-               }
-               Msg.info("Open file " + filename);
-               File file = new File(filename);
+  private static String FILENAME1 = "/doc/simgrid/examples/platforms/g5k.xml";
+  private static String FILENAME2 = "\\Windows\\setupact.log";
+  private static String FILENAME3 = "/doc/simgrid/examples/platforms/g5k_cabinets.xml";
+  private static String FILENAME4 = "/doc/simgrid/examples/platforms/nancy.xml";
+
+  protected int number;
+
+  public Node(Host host, int number) throws HostNotFoundException {
+    super(host, Integer.toString(number), null);
+    this.number = number;
+  }
+
+  public void main(String[] args) throws MsgException {
+    String mount = "";
+    String filename;
+    switch (number) {
+      case 0:
+        mount = "/home";
+        filename = mount + FILENAME1;
+      break;
+      case 1:
+        mount = "c:";
+        filename = mount + FILENAME2;
+      break;
+      case 2:
+        mount = "/home";
+        filename = mount + FILENAME3;
+      break;
+      case 3:
+        mount = "/home";
+        filename = mount + FILENAME4;
+      break;
+      default:
+        mount = "/home";
+        filename = mount + FILENAME1;
+    }
+
+    Msg.info("Open file " + filename);
+    File file = new File(filename);
+
+    long read = file.read(10000000,1);
+    Msg.info("Having read " + read + " on " + filename);
 
-               long read = file.read(10000000,1);
-               Msg.info("Having read " + read + " on " + filename);
-               
-               long write = file.read(100000,1);
-               Msg.info("Having write " + write + " on " + filename);
+    long write = file.read(100000,1);
+    Msg.info("Having write " + write + " on " + filename);
 
-               read = file.read(10000000,1);
-               Msg.info("Having read " + read + " on " + filename);    
-       }
+    read = file.read(10000000,1);
+    Msg.info("Having read " + read + " on " + filename);  
+  }
 }
index dc2c9e6..ae2488d 100644 (file)
@@ -4,29 +4,25 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-
-
 package io;
-
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.MsgException;
 
+public class Storage {
+  public static void main(String[] args) throws MsgException {      
+    Msg.init(args);
+    if(args.length < 1) {
+      Msg.info("Usage   : Storage platform_file ");
+      Msg.info("example : Storage ../platforms/storage/storage.xml ");
+      System.exit(1);
+    }
 
+    Msg.createEnvironment(args[0]);
 
-public class Storage {
-  public static void main(String[] args) throws MsgException {         
-               Msg.init(args);
-               if(args.length < 1) {
-                       Msg.info("Usage   : storage platform_file ");
-               Msg.info("example : storage platform.xml ");
-               System.exit(1);
-           }    
-               Msg.createEnvironment(args[0]);
-               
-               Host[] hosts = Host.all();              
-               new io.Client(hosts[0],0).start();
+    Host[] hosts = Host.all();
+    new io.Client(hosts[0],0).start();
 
-               Msg.run();              
+    Msg.run();
     }
 }
diff --git a/examples/java/io/storage.tesh b/examples/java/io/storage.tesh
new file mode 100644 (file)
index 0000000..f8d9db4
--- /dev/null
@@ -0,0 +1,46 @@
+#! tesh
+
+$ java -classpath ${classpath:=.} io/Storage ${srcdir:=.}/../platforms/storage/storage.xml
+> [0.000000] [jmsg/INFO] Using regular java threads.
+> [denise:0:(1) 0.000000] [jmsg/INFO] ------------------------------------
+> [denise:0:(1) 0.000000] [jmsg/INFO] Disk name: Disk2
+> [denise:0:(1) 0.000000] [jmsg/INFO] Size: 536870912000 bytes.
+> [denise:0:(1) 0.000000] [jmsg/INFO] Free Size: 534479374867 bytes.
+> [denise:0:(1) 0.000000] [jmsg/INFO] Used Size: 2391537133 bytes.
+> [denise:0:(1) 0.000000] [jmsg/INFO] ------------------------------------
+> [denise:0:(1) 0.000000] [jmsg/INFO] Disk name: Disk4
+> [denise:0:(1) 0.000000] [jmsg/INFO] Size: 536870912000 bytes.
+> [denise:0:(1) 0.000000] [jmsg/INFO] Free Size: 536857690006 bytes.
+> [denise:0:(1) 0.000000] [jmsg/INFO] Used Size: 13221994 bytes.
+> [denise:0:(1) 0.000000] [jmsg/INFO] Disk name: Disk2
+> [denise:0:(1) 0.000000] [jmsg/INFO] Attached to host:alice
+> [denise:0:(1) 0.000000] [jmsg/INFO] Property key: Pierre
+> [denise:0:(1) 0.000000] [jmsg/INFO] Property key2: Pierre
+> [denise:0:(1) 0.000000] [jmsg/INFO] Disk attached: Disk4
+> [denise:0:(1) 0.000000] [jmsg/INFO] **************** ALL *************************
+> [denise:0:(1) 0.000000] [jmsg/INFO] Disk: Disk1
+> [denise:0:(1) 0.000000] [jmsg/INFO] Disk: Disk2
+> [denise:0:(1) 0.000000] [jmsg/INFO] Disk: Disk3
+> [denise:0:(1) 0.000000] [jmsg/INFO] Disk: Disk4
+> [0.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
+
+$ java -classpath ${classpath:=.} io/IO ${srcdir:=.}/../platforms/storage/storage.xml
+> [0.000000] [jmsg/INFO] Using regular java threads.
+> [0.000000] [jmsg/INFO] Number of hosts:4
+> [denise:0:(1) 0.000000] [jmsg/INFO] Open file /home/doc/simgrid/examples/platforms/g5k.xml
+> [alice:1:(2) 0.000000] [jmsg/INFO] Open file c:\Windows\setupact.log
+> [carl:2:(3) 0.000000] [jmsg/INFO] Open file /home/doc/simgrid/examples/platforms/g5k_cabinets.xml
+> [bob:3:(4) 0.000000] [jmsg/INFO] Open file /home/doc/simgrid/examples/platforms/nancy.xml
+> [bob:3:(4) 0.000040] [jmsg/INFO] Having read 4028 on /home/doc/simgrid/examples/platforms/nancy.xml
+> [bob:3:(4) 0.000040] [jmsg/INFO] Having write 0 on /home/doc/simgrid/examples/platforms/nancy.xml
+> [bob:3:(4) 0.000040] [jmsg/INFO] Having read 0 on /home/doc/simgrid/examples/platforms/nancy.xml
+> [denise:0:(1) 0.000085] [jmsg/INFO] Having read 17028 on /home/doc/simgrid/examples/platforms/g5k.xml
+> [denise:0:(1) 0.000085] [jmsg/INFO] Having write 0 on /home/doc/simgrid/examples/platforms/g5k.xml
+> [denise:0:(1) 0.000085] [jmsg/INFO] Having read 0 on /home/doc/simgrid/examples/platforms/g5k.xml
+> [carl:2:(3) 0.000226] [jmsg/INFO] Having read 22645 on /home/doc/simgrid/examples/platforms/g5k_cabinets.xml
+> [carl:2:(3) 0.000226] [jmsg/INFO] Having write 0 on /home/doc/simgrid/examples/platforms/g5k_cabinets.xml
+> [carl:2:(3) 0.000226] [jmsg/INFO] Having read 0 on /home/doc/simgrid/examples/platforms/g5k_cabinets.xml
+> [alice:1:(2) 0.000508] [jmsg/INFO] Having read 101663 on c:\Windows\setupact.log
+> [alice:1:(2) 0.000508] [jmsg/INFO] Having write 0 on c:\Windows\setupact.log
+> [alice:1:(2) 0.000508] [jmsg/INFO] Having read 0 on c:\Windows\setupact.log
+> [0.000508] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
index ff0a25b..24164a4 100644 (file)
@@ -1,98 +1,73 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package kademlia;
-
 import java.util.ArrayList;
 import java.util.Collections;
 
-/**
- * Answer to a "FIND_NODE" query. Contains the nodes closest to
- * an id given.
- */
+/* Answer to a "FIND_NODE" query. Contains the nodes closest to an id given */
 public class Answer {
-       /**
-        * Id of the node we're trying to find
-        */
-       private int destinationId;
-       /**
-        * Closest nodes in the answer.
-        */
-       private ArrayList<Contact> nodes;
-       
-       /**
-        * Constructor
-        */
-       public Answer(int destinationId) {
-               this.destinationId = destinationId;
-               nodes = new ArrayList<Contact>();
-       }
-       /**
-        * Returns the destination id
-        */
-       int getDestinationId() {
-               return destinationId;
-       }
-       /**
-        * Returns the list of the nodes in the answer
-        */
-       ArrayList<Contact> getNodes() {
-               return nodes;
-       }
-       /**
-        * Returns the answer array size
-        */
-       int size() {
-               return nodes.size();
-       }
-       /**
-        * Remove an element from the answer.
-        */
-       public void remove(int index) {
-               nodes.remove(index);
-       }
-       /**
-        * Add a contact to the answer.
-        */
-       public void add(Contact contact) {
-               nodes.add(contact);
-       }
-       /**
-        * Merge the contents of this answer with another answer
-        */
-       public int merge(Answer answer) {
-               int nbAdded = 0;
-               
-               for (Contact c: answer.getNodes()) {
-                       if (!nodes.contains(c)) {
-                               nbAdded++;
-                               nodes.add(c);
-                       }
-               }
-               Collections.sort(nodes);
-               //Trim the list
-               while (answer.size() > Common.BUCKET_SIZE) {
-                       answer.remove(answer.size() - 1);
-               }
-               return nbAdded;
-       }
-       /**
-        * Returns if the destination has been found
-        */
-       public boolean destinationFound() {
-               if (nodes.size() < 1) {
-                       return false;
-               }
-               Contact tail = nodes.get(0);
-               return tail.getDistance() == 0;
-       }
-       @Override
-       public String toString() {
-               return "Answer [destinationId=" + destinationId + ", nodes=" + nodes
-                               + "]";
-       }
-       
+  private int destinationId;
+  /* Closest nodes in the answer. */
+  private ArrayList<Contact> nodes;
+
+  public Answer(int destinationId) {
+    this.destinationId = destinationId;
+    nodes = new ArrayList<Contact>();
+  }
+
+  int getDestinationId() {
+    return destinationId;
+  }
+
+  ArrayList<Contact> getNodes() {
+    return nodes;
+  }
+
+  int size() {
+    return nodes.size();
+  }
+
+  public void remove(int index) {
+    nodes.remove(index);
+  }
+
+  public void add(Contact contact) {
+    nodes.add(contact);
+  }
+
+  /* Merge the contents of this answer with another answer */
+  public int merge(Answer answer) {
+    int nbAdded = 0;
+
+    for (Contact c: answer.getNodes()) {
+      if (!nodes.contains(c)) {
+        nbAdded++;
+        nodes.add(c);
+      }
+    }
+    Collections.sort(nodes);
+    //Trim the list
+    while (answer.size() > Common.BUCKET_SIZE) {
+      answer.remove(answer.size() - 1);
+    }
+    return nbAdded;
+  }
+
+  /* Returns if the destination has been found */
+  public boolean destinationFound() {
+    if (nodes.size() < 1) {
+      return false;
+    }
+    Contact tail = nodes.get(0);
+    return tail.getDistance() == 0;
+  }
+
+  @Override
+  public String toString() {
+    return "Answer [destinationId=" + destinationId + ", nodes=" + nodes + "]";
+  }
 }
index 8ad2326..41d391d 100644 (file)
@@ -1,77 +1,58 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package kademlia;
-
 import java.util.ArrayList;
 
-/**
- * Stores the information held in a bucket
- */
 public class Bucket {
-       private ArrayList<Integer> nodes;
-       private int id;
-       
-       /**
-        * Constructor
-        */
-       public Bucket(int id) {
-               this.nodes = new ArrayList<Integer>();
-               this.id = id;
-       }
-       /**
-        * Returns the bucket's id.
-        */
-       public int getId() {
-               return this.id;
-       }
-       /**
-        * Returns how many nodes there is in the bucket
-        */
-       public int size() {
-               return nodes.size();
-       }
-       /**
-        * Returns if the bucket contains the element
-        */
-       public boolean contains(int id) {
-               return nodes.contains(id);
-       }
-       /**
-        * Add an to the front of the bucket
-        */
-       public void add(int id) {
-               nodes.add(0,id);
-       }
-       /**
-        * Pushs an element into the front of a bucket.
-        */
-       public void pushToFront(int id) {
-               int i = nodes.indexOf(id);
-               nodes.remove(i);
-               nodes.add(0, id);
-       }
-       /**
-        * Returns a node
-        */
-       public int getNode(int id) {
-               return nodes.get(id);
-       }
-       /**
-        * Adds the content of the bucket into a answer object.
-        */
-       public void addToAnswer(Answer answer, int destination) {
-               for (int id : this.nodes) {
-                       answer.getNodes().add(new Contact(id,id ^ destination));
-               }
-       }
-       
-       @Override
-       public String toString() {
-               return "Bucket [id= " + id + " nodes=" + nodes + "]";
-       }
-       
+  private ArrayList<Integer> nodes;
+  private int id;
+
+  public Bucket(int id) {
+    this.nodes = new ArrayList<Integer>();
+    this.id = id;
+  }
+
+  public int getId() {
+    return this.id;
+  }
+
+  public int size() {
+    return nodes.size();
+  }
+
+  public boolean contains(int id) {
+    return nodes.contains(id);
+  }
+
+  /* Add a node to the front of the bucket */
+  public void add(int id) {
+    nodes.add(0,id);
+  }
+
+  /* Push a node to the front of a bucket */
+  public void pushToFront(int id) {
+    int i = nodes.indexOf(id);
+    nodes.remove(i);
+    nodes.add(0, id);
+  }
+
+  public int getNode(int id) {
+    return nodes.get(id);
+  }
+
+  /* Add the content of the bucket into a answer object. */
+  public void addToAnswer(Answer answer, int destination) {
+    for (int id : this.nodes) {
+      answer.getNodes().add(new Contact(id,id ^ destination));
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "Bucket [id= " + id + " nodes=" + nodes + "]";
+  }
 }
index d49e24f..5767cd2 100644 (file)
@@ -39,9 +39,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index 7df08e7..0c3d425 100644 (file)
@@ -1,46 +1,32 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package kademlia;
-/**
- * Common constants used all over the simulation
- */
+
 public class Common {
-       public final static int COMM_SIZE = 1;
-       public final static int COMP_SIZE = 0;
-       
-       public final static int RANDOM_LOOKUP_INTERVAL = 100;
-       
-       public final static int alpha = 3;
-       /**
-        * Size of the nodes identifier
-        */
-       public final static int IDENTIFIER_SIZE = 32;
-       /**
-        * Maximum size of the buckets
-        */
-       public final static int BUCKET_SIZE = 20;
-       /**
-        * Maximum number of trial for the "JOIN" request
-        */
-       public final static int MAX_JOIN_TRIALS = 4;
-       /**
-        * Timeout for a "FIND_NODE" request to a node
-        */
-       public final static int FIND_NODE_TIMEOUT = 10;
-       /**
-        * Global timeout for a FIND_NODE.
-        */
-       public final static int FIND_NODE_GLOBAL_TIMEOUT = 50;
-       /**
-        * Timeout for a "PING" request
-        */
-       public final static int PING_TIMEOUT = 35;
-       
-       public final static int MAX_STEPS = 10;
+  /* Common constants used all over the simulation */
+  public final static int COMM_SIZE = 1;
+  public final static int COMP_SIZE = 0;
+
+  public final static int RANDOM_LOOKUP_INTERVAL = 100;
+
+  public final static int alpha = 3;
+
+  public final static int IDENTIFIER_SIZE = 32;
+  /* Maximum size of the buckets */
+  public final static int BUCKET_SIZE = 20;
+  /* Maximum number of trials for the "JOIN" request */
+  public final static int MAX_JOIN_TRIALS = 4;
+  /* Timeout for a "FIND_NODE" request to a node */
+  public final static int FIND_NODE_TIMEOUT = 10;
+  /* Global timeout for a FIND_NODE request */
+  public final static int FIND_NODE_GLOBAL_TIMEOUT = 50;
+  /* Timeout for a "PING" request */
+  public final static int PING_TIMEOUT = 35;
 
-       public final static int JOIN_BUCKETS_QUERIES = 1;
+  public final static int MAX_STEPS = 10;
+  public final static int JOIN_BUCKETS_QUERIES = 1;
 }
index 16d3906..76e155b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,47 +6,43 @@
 
 package kademlia;
 
-/**
- * Contains the information about a foreign node according to
- * a node we are trying to find.
- */
 public class Contact implements Comparable<Object> {
-       private int id;
-       private int distance;
-       
-       public Contact(int id, int distance) {
-               this.id = id;
-               this.distance = distance;
-       }
-
-       public int getId() {
-               return id;
-       }
-
-       public int getDistance() {
-               return distance;
-       }
-       
-       public boolean equals(Object x) {
-               return x.equals(id) ;
-       }
-
-       public int compareTo(Object o) {
-               Contact c = (Contact)o;
-               if (distance < c.distance) {
-                       return -1;
-               }
-               else if (distance == c.distance) {
-                       return 0;
-               }
-               else {
-                       return 1;
-               }
-       }
-
-       @Override
-       public String toString() {
-               return "Contact [id=" + id + ", distance=" + distance + "]";
-       }
-       
+  private int id;
+  private int distance;
+
+  public Contact(int id, int distance) {
+    this.id = id;
+    this.distance = distance;
+  }
+
+  public int getId() {
+    return id;
+  }
+
+  public int getDistance() {
+    return distance;
+  }
+
+  public boolean equals(Object x) {
+    return x.equals(id) ;
+  }
+
+  public int compareTo(Object o) {
+    Contact c = (Contact)o;
+    if (distance < c.distance) {
+      return -1;
+    }
+    else if (distance == c.distance) {
+      return 0;
+    }
+    else {
+      return 1;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "Contact [id=" + id + ", distance=" + distance + "]";
+  }
+
 }
\ No newline at end of file
index cb036da..b4cad24 100644 (file)
@@ -1,35 +1,25 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package kademlia;
-
 import kademlia.Answer;
 
 public class FindNodeAnswerTask extends KademliaTask {
-       /**
-        * Destination id
-        */
-       protected int destinationId;
-       /**
-        * Answer to the FIND_NODE query.
-        */
-       protected Answer answer;
-       /**
-        * Constructor
-        */
-       public FindNodeAnswerTask(int senderId, int destinationId, Answer answer) {
-               super(senderId);
-               this.destinationId = destinationId;
-               this.answer = answer;
-       }
-       public int getDestinationId() {
-               return destinationId;
-       }
-       public Answer getAnswer() {
-               return answer;
-       }
-       
+  protected int destinationId;
+  protected Answer answer;
+
+  public FindNodeAnswerTask(int senderId, int destinationId, Answer answer) {
+    super(senderId);
+    this.destinationId = destinationId;
+    this.answer = answer;
+  }
+  public int getDestinationId() {
+    return destinationId;
+  }
+  public Answer getAnswer() {
+    return answer;
+  }
 }
index 9ee53a9..f2020aa 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,27 +7,19 @@
 package kademlia;
 
 /**
- * @brief Find node tasks sent by a node to another
- * "Find Node" task sent by a node to another. Ask him for
- * its closest nodes from a destination.
+ * @brief Find node tasks sent by a node to another "Find Node" task sent by a node to another. Ask him for its closest
+ * nodes from a destination.
  */
 public class FindNodeTask extends KademliaTask {
-       /**
-        * Id of the node we are trying to find: the destination
-        */
-       private int destination;
-       /**
-        * Constructor
-        */
-       public FindNodeTask(int senderId, int destination) {
-               super(senderId);        
-               this.destination = destination;
-       }
+  /* Id of the node we are trying to find: the destination */
+  private int destination;
 
+  public FindNodeTask(int senderId, int destination) {
+    super(senderId);  
+    this.destination = destination;
+  }
 
-
-       public int getDestination() {
-               return destination;
-       }
-       
+  public int getDestination() {
+    return destination;
+  }
 }
index a9c05c4..01fcef2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,24 +7,21 @@
 package kademlia;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.MsgException;
-/**
- * Main class of the simulation. Launch the simulation.
- */
+
 public class Kademlia {
-       public static void main(String[] args) throws MsgException {
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-               if(args.length < 2) {
-                       Msg.info("Usage   : Kademlia platform_file deployment_file");
-                       Msg.info("example : Kademlia platform.xml deployment.xml");
-                       System.exit(1);
-               }
-               
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
-                       
-               /*  execute the simulation. */
-        Msg.run();             
-       }
+  public static void main(String[] args) throws MsgException {
+    Msg.init(args);
+    if(args.length < 2) {
+      Msg.info("Usage   : Kademlia platform_file deployment_file");
+      Msg.info("example : Kademlia ../platforms/platform.xml kademlia.xml");
+      System.exit(1);
+    }
+
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
+
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
index 9ca0c5f..0a549b4 100644 (file)
@@ -1,32 +1,23 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package kademlia;
-
 import kademlia.Common;
 
 import org.simgrid.msg.Task;
 
-/**
- * @brief Base class for all the tasks related to Kademlia.
- */
 public class KademliaTask extends Task {
-       /**
-        * Sender id
-        */
-       protected int senderId;
-       
-       /**
-        * Constructor
-        */
-       public KademliaTask(int senderId) {
-               super("kademliatask",Common.COMP_SIZE,Common.COMM_SIZE);
-               this.senderId = senderId;
-       }
-       public int getSenderId() {
-               return senderId;
-       }
+  protected int senderId;
+
+  public KademliaTask(int senderId) {
+    super("kademliatask",Common.COMP_SIZE,Common.COMM_SIZE);
+    this.senderId = senderId;
+  }
+
+  public int getSenderId() {
+    return senderId;
+  }
 }
index 0a94781..5dd2ae2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,345 +8,312 @@ package kademlia;
 
 import org.simgrid.msg.Host;
 
-import org.simgrid.msg.Comm;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
-import org.simgrid.msg.Process;
+import org.simgrid.msg.Comm;
 import org.simgrid.msg.Task;
-/**
- * Main class of the simulation, contains the logic of a node.
- */
+import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
+
 public class Node extends Process {
-       /**
-         * Id in the network.
-        */
-       protected int id;
-       /**
-        * Routing table
-        */
-       protected RoutingTable table;
-       /**
-        * Deadline
-        */
-       protected int deadline;
-       /**
-        * FIND_NODE which have succeeded.
-        */
-       protected int findNodeSuccedded = 0;
-       /**
-        * FIND_NODE which have failed
-        */
-       protected int findNodeFailed = 0;
-       
-       protected Comm comm;
+  protected int id;
+  protected RoutingTable table;
+  protected int deadline;
+  protected int findNodeSuccedded = 0;
+  protected int findNodeFailed = 0;
+  protected Comm comm;
+
+  public Node(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  @Override
+  public void main(String[] args) throws MsgException {
+    //Check the number of arguments.
+    if (args.length != 2 && args.length != 3) {
+      Msg.info("Wrong argument count.");
+      return;
+    }
+    this.id = Integer.valueOf(args[0]);
+    this.table = new RoutingTable(this.id);
+
+    if (args.length == 3) {
+      this.deadline = Integer.valueOf(args[2]).intValue();
+      Msg.info("Hi, I'm going to join the network with the id " + id + "!");
+      if (joinNetwork(Integer.valueOf(args[1]))) {
+        this.mainLoop();
+      }
+      else {
+        Msg.info("I couldn't join the network :(");
+      }
+    }
+    else {
+      this.deadline = Integer.valueOf(args[1]).intValue();
+      Msg.info("Hi, I'm going to create the network with the id " + id + "!");
+      table.update(this.id);
+      this.mainLoop();
+    }
+    Msg.debug("I'm leaving the network");
+    Msg.debug("Here is my routing table:" + table);
+  }
+
+  public void mainLoop() {
+    double next_lookup_time = Msg.getClock() + Common.RANDOM_LOOKUP_INTERVAL;
+    while (Msg.getClock() < this.deadline) {
+      try {
+        if (comm == null) {
+          comm = Task.irecv(Integer.toString(id));
+        }
+        if (!comm.test()) {
+          if (Msg.getClock() >= next_lookup_time) {
+            randomLookup();
+            next_lookup_time += Common.RANDOM_LOOKUP_INTERVAL;
+          } else {
+            waitFor(1);
+          }
+        } else {
+          Task task = comm.getTask();
+          handleTask(task);
+          comm = null;
+        }
+      }
+      catch (Exception e) {
+      }
+    }
+    Msg.info(findNodeSuccedded + "/"  + (findNodeSuccedded + findNodeFailed) + " FIND_NODE have succedded.");
+  }
+
+  /**
+   * @brief Try to make the node join the network
+   * @param idKnown Id of someone we know in the system
+   */
+  public boolean joinNetwork(int idKnown) {
+    boolean answerGot = false;
+    double timeBegin = Msg.getClock();
+    Msg.debug("Joining the network knowing " + idKnown);
+    //Add ourselves and the node we know to our routing table
+    table.update(this.id);
+    table.update(idKnown);
+    //Send a "FIND_NODE" to the node we know.
+    sendFindNode(idKnown,this.id);
+    //Wait for the answer.
+    int trials = 0;
+
+    do {
+      try {
+        if (comm == null) {
+          comm = Task.irecv(Integer.toString(id));
+        }
+        if (comm != null) {
+          if (!comm.test()) {
+            waitFor(1);
+          } else {
+            Task task = comm.getTask();
+            if (task instanceof FindNodeAnswerTask) {
+              answerGot = true;
+              //Retrieve the node list and ping them
+              FindNodeAnswerTask answerTask = (FindNodeAnswerTask)task;
+              Answer answer = answerTask.getAnswer();
+              answerGot = true;
+              //answersGotten++;
+              if (answer.getDestinationId() == this.id) {
+                //Ping everyone in the list
+                for (Contact c : answer.getNodes()) {
+                  table.update(c.getId());
+                }
+              }
+            } else {
+              handleTask(task);
+            }
+            comm = null;
+          }
+        }
+      }
+      catch (Exception ex) {
+        trials++;
+        Msg.info("FIND_NODE failed");
+      }
+    } while (!answerGot && trials < Common.MAX_JOIN_TRIALS);
+    /* Second step: Send a FIND_NODE in a node in each bucket */
+    int bucketId = table.findBucket(idKnown).getId();
+    for (int i = 0; ((bucketId - i) > 0 || 
+       (bucketId + i) <= Common.IDENTIFIER_SIZE) && 
+       i < Common.JOIN_BUCKETS_QUERIES; i++) {
+      if (bucketId - i > 0) {
+        int idInBucket = table.getIdInPrefix(this.id,bucketId - i);
+        this.findNode(idInBucket,false);
+      }
+      if (bucketId + i <= Common.IDENTIFIER_SIZE) {
+        int idInBucket = table.getIdInPrefix(this.id,bucketId + i);
+        findNode(idInBucket,false);
+      }
+    }
+    Msg.debug("Time spent:" + (Msg.getClock() - timeBegin));
+    return answerGot;
+  }
+
+  /* Send a request to find a node in the node's routing table. */
+  public boolean findNode(int destination, boolean counts) {
+    int queries, answers;
+    int nodesAdded = 0;
+    boolean destinationFound = false;
+    int steps = 0;
+    double timeBeginReceive;
+    double timeout, globalTimeout = Msg.getClock() + Common.FIND_NODE_GLOBAL_TIMEOUT;
+    //Build a list of the closest nodes we already know.
+    Answer nodeList = table.findClosest(destination);
+    Msg.verb("Doing a FIND_NODE on " + destination);
+    do {
+      timeBeginReceive = Msg.getClock();
+      answers = 0;
+      queries = this.sendFindNodeToBest(nodeList);
+      nodesAdded = 0;
+      timeout = Msg.getClock() + Common.FIND_NODE_TIMEOUT;
+      steps++;
+      do {
+        try {
+          if (comm == null) {
+            comm = Task.irecv(Integer.toString(id));
+          }
+          if (!comm.test()) {
+            waitFor(1);
+          } else {
+            Task task = comm.getTask();  
+            if (task instanceof FindNodeAnswerTask) {
+              FindNodeAnswerTask answerTask = (FindNodeAnswerTask)task;
+              //Check if we received what we are looking for.
+              if (answerTask.getDestinationId() == destination) {
+                table.update(answerTask.getSenderId());
+                //Add the answer to our routing table
+                for (Contact c: answerTask.getAnswer().getNodes()) {
+                  table.update(c.getId());
+                }
+                answers++;
+                
+                nodesAdded = nodeList.merge(answerTask.getAnswer());
+              } else {
+              /* If it's not our answer, we answer to the node that has queried us anyway */
+                handleTask(task);
+                //Update the timeout if it's not our answer.
+                timeout += Msg.getClock() - timeBeginReceive;
+                timeBeginReceive = Msg.getClock();
+              }
+            } else {
+              handleTask(task);
+              timeout += Msg.getClock() - timeBeginReceive;
+              timeBeginReceive = Msg.getClock();
+            }
+            comm = null;
+          }
+        }
+        catch (Exception e) {
+          comm = null;
+        }
+      } while (answers < queries && Msg.getClock() < timeout);
+      destinationFound = nodeList.destinationFound();
+    } while (!destinationFound && (nodesAdded > 0 || answers == 0) && Msg.getClock() < globalTimeout 
+             && steps < Common.MAX_STEPS);
+
+    if (destinationFound) {
+      if (counts) {
+        findNodeSuccedded++;
+      }
+      Msg.debug("Find node on " + destination + " succedded");
+    } else {
+      Msg.debug("Find node on " + destination + " failed");
+      Msg.debug("Queried " + queries + " nodes to find "  + destination);
+      Msg.debug(nodeList.toString());
+      if (counts) {
+        findNodeFailed++;
+      }
+    }
+    return destinationFound;
+  }
+
+  /**
+   * @brief Sends a "PING" request to a node
+   * @param destination Ping destination id.
+   */
+  public void ping(int destination) {
+    boolean destinationFound = false;
+    double timeout = Msg.getClock() + Common.PING_TIMEOUT;
+    PingTask pingTask = new PingTask(this.id);
+    /* Sending the ping task */
+    pingTask.dsend(Integer.toString(destination));
+    do {
+      try {
+        Task task = Task.receive(Integer.toString(this.id),Common.PING_TIMEOUT);
+        if (task instanceof PingAnswerTask) {
+          PingAnswerTask answerTask = (PingAnswerTask)task;
+          if (answerTask.getSenderId() == destination) {
+            this.table.update(destination);
+            destinationFound = true;
+          } else {
+            handleTask(task);
+          }
+        } else {
+          handleTask(task);
+        }
+        waitFor(1);
+      }
+      catch (Exception ex) {
+      }
+    } while (Msg.getClock() < timeout && !destinationFound);
+  }
+
+  /**
+   * @brief Sends a "FIND_NODE" request (task) to a node we know.
+   * @param id Id of the node we are querying
+   * @param destination id of the node we are trying to find.
+   */
+  public void sendFindNode(int id, int destination) {
+    Msg.debug("Sending a FIND_NODE to " + Integer.toString(id) + " to find " + destination  );
+    FindNodeTask task = new FindNodeTask(this.id,destination);
+    task.dsend(Integer.toString(id));
+  }
+
+  /** Sends a "FIND_NODE" request to the best "alpha" nodes in a node list */
+  public int sendFindNodeToBest(Answer nodeList) {
+    int destination = nodeList.getDestinationId();
+    int i;
+    for (i = 0; i < Common.alpha && i < nodeList.size(); i++) {
+      Contact node = nodeList.getNodes().get(i);
+      if (node.getId() != this.id) {
+        this.sendFindNode(node.getId(),destination);
+      }
+    }
+    return i;
+  }
+
+  public void randomLookup() {
+    findNode(0,true);
+  }
 
-       public Node(Host host, String name, String[]args) {
-               super(host,name,args);
-       }
-       
-       @Override
-       public void main(String[] args) throws MsgException {
-               //Check the number of arguments.
-               if (args.length != 2 && args.length != 3) {
-                       Msg.info("Wrong argument count.");
-                       return;
-               }
-               this.id = Integer.valueOf(args[0]);
-               this.table = new RoutingTable(this.id);
-               
-               if (args.length == 3) {
-                       this.deadline = Integer.valueOf(args[2]).intValue();
-                       Msg.info("Hi, I'm going to join the network with the id " + id + "!");
-                       if (joinNetwork(Integer.valueOf(args[1]))) {
-                               this.mainLoop();
-                       } 
-                       else {
-                               Msg.info("I couldn't join the network :(");
-                       }
-               }
-               else {
-                       this.deadline = Integer.valueOf(args[1]).intValue();
-                       Msg.info("Hi, I'm going to create the network with the id " + id + "!");
-                       table.update(this.id);
-                       this.mainLoop();
-               }               
-               Msg.debug("I'm leaving the network");
-               Msg.debug("Here is my routing table:" + table);
-       }
-       /**
-        * Node main loop
-        */
-       public void mainLoop() {
-               double next_lookup_time = Msg.getClock() + Common.RANDOM_LOOKUP_INTERVAL;
-               while (Msg.getClock() < this.deadline) {
-                       try {
-                               if (comm == null) {
-                                       comm = Task.irecv(Integer.toString(id));
-                               }
-                               if (!comm.test()) {
-                                       if (Msg.getClock() >= next_lookup_time) {
-                                               randomLookup();
-                                               next_lookup_time += Common.RANDOM_LOOKUP_INTERVAL;
-                                       }
-                                       else {
-                                               waitFor(1);
-                                       }                                               
-                               }
-                               else {
-                                       Task task = comm.getTask();
-                                       handleTask(task);
-                                       comm = null;
-                               }
-                       }
-                       catch (Exception e) {
-                               
-                       }
-               }
-               Msg.info(findNodeSuccedded + "/"  + (findNodeSuccedded + findNodeFailed) + " FIND_NODE have succedded.");
-       }
-       /**
-        * @brief Try to make the node join the network
-        * @param idKnown Id of someone we know in the system
-        */
-       public boolean joinNetwork(int idKnown) {
-               boolean answerGot = false;
-               double timeBegin = Msg.getClock();
-               Msg.debug("Joining the network knowing " + idKnown);
-               //Add ourselves and the node we know to our routing table
-               table.update(this.id);
-               table.update(idKnown);
-               //Send a "FIND_NODE" to the node we know.
-               sendFindNode(idKnown,this.id);
-               //Wait for the answer.
-               int trials = 0;
+  /**
+   * @brief Handles an incomming task
+   * @param task The task we need to handle
+   */
+  public void handleTask(Task task) {
+    if (task instanceof KademliaTask) {
+      table.update(((KademliaTask) task).getSenderId());
+      if (task instanceof FindNodeTask) {
+        handleFindNode((FindNodeTask)task);
+      }
+      else if (task instanceof PingTask) {
+        handlePing((PingTask)task);
+      }
+    }
+  }
 
-               do {
-                       try {
-                               if (comm == null) {
-                                       comm = Task.irecv(Integer.toString(id));
-                               }
-                               if (comm != null) {
-                                       if (!comm.test()) {
-                                               waitFor(1);
-                                       }
-                                       else {
-                                               Task task = comm.getTask();
-                                               if (task instanceof FindNodeAnswerTask) {
-                                                       answerGot = true;
-                                                       //Retrieve the node list and ping them
-                                                       FindNodeAnswerTask answerTask = (FindNodeAnswerTask)task;
-                                                       Answer answer = answerTask.getAnswer();
-                                                       answerGot = true;
-                                                       //answersGotten++;
-                                                       if (answer.getDestinationId() == this.id) {
-                                                               //Ping everyone in the list
-                                                               for (Contact c : answer.getNodes()) {
-                                                                       table.update(c.getId());
-                                                               }                                               
-                                                       }
-                                               }
-                                               else {
-                                                       handleTask(task);
-                                               }
-                                               comm = null;
-                                       }
-                               }
+  public void handleFindNode(FindNodeTask task) {
+    Msg.debug("Received a FIND_NODE from " + task.getSenderId());
+    Answer answer = table.findClosest(task.getDestination());
+    FindNodeAnswerTask taskToSend = new FindNodeAnswerTask(this.id,task.getDestination(),answer);
+    taskToSend.dsend(Integer.toString(task.getSenderId()));
+  }
 
-                       }
-                       catch (Exception ex) {
-                               trials++;
-                               Msg.info("FIND_NODE failed");
-                       }
-               } while (!answerGot && trials < Common.MAX_JOIN_TRIALS);
-               /* Second step: Send a FIND_NODE in a node in each bucket */
-               int bucketId = table.findBucket(idKnown).getId();
-               for (int i = 0; ((bucketId - i) > 0 || 
-                        (bucketId + i) <= Common.IDENTIFIER_SIZE) && 
-                        i < Common.JOIN_BUCKETS_QUERIES; i++) {
-                       if (bucketId - i > 0) {
-                               int idInBucket = table.getIdInPrefix(this.id,bucketId - i);
-                               this.findNode(idInBucket,false);
-                       }
-                       if (bucketId + i <= Common.IDENTIFIER_SIZE) {
-                               int idInBucket = table.getIdInPrefix(this.id,bucketId + i);                             
-                               findNode(idInBucket,false);
-                       }
-               }
-               Msg.debug("Time spent:" + (Msg.getClock() - timeBegin));
-               return answerGot;
-       }
-       /**
-        * Send a request to find a node in the node's routing table.
-        */
-       public boolean findNode(int destination, boolean counts) {
-               int queries, answers;
-               int nodesAdded = 0;
-               boolean destinationFound = false;
-               int steps = 0;
-               double timeBeginReceive;
-               double timeout, globalTimeout = Msg.getClock() + Common.FIND_NODE_GLOBAL_TIMEOUT;
-               //Build a list of the closest nodes we already know.
-               Answer nodeList = table.findClosest(destination);
-               Msg.verb("Doing a FIND_NODE on " + destination);
-               do {
-                       timeBeginReceive = Msg.getClock();
-                       answers = 0;
-                       queries = this.sendFindNodeToBest(nodeList);
-                       nodesAdded = 0;
-                       timeout = Msg.getClock() + Common.FIND_NODE_TIMEOUT;
-                       steps++;
-                       do {
-                               try {
-                                       if (comm == null) {
-                                               comm = Task.irecv(Integer.toString(id));
-                                       }
-                                       if (!comm.test()) {
-                                               waitFor(1);
-                                       }
-                                       else {
-                                               Task task = comm.getTask();     
-                                               if (task instanceof FindNodeAnswerTask) {
-                                                       FindNodeAnswerTask answerTask = (FindNodeAnswerTask)task;
-                                                       //Check if we received what we are looking for.
-                                                       if (answerTask.getDestinationId() == destination) {
-                                                               table.update(answerTask.getSenderId());
-                                                               //Add the answer to our routing table
-                                                               for (Contact c: answerTask.getAnswer().getNodes()) {
-                                                                       table.update(c.getId());
-                                                               }
-                                                               answers++;
-                                                               
-                                                               nodesAdded = nodeList.merge(answerTask.getAnswer());                                                    
-                                                       }
-                                                       /* If it's not our answer, we answer to the node that
-                                                        * has queried us anyway
-                                                        */
-                                                       else {
-                                                               handleTask(task);
-                                                               //Update the timeout if it's not our answer.
-                                                               timeout += Msg.getClock() - timeBeginReceive;
-                                                               timeBeginReceive = Msg.getClock();
-                                                       }
-                                               }
-                                               else {
-                                                       handleTask(task);
-                                                       timeout += Msg.getClock() - timeBeginReceive;
-                                                       timeBeginReceive = Msg.getClock();
-                                               }
-                                               comm = null;
-                                       }
-                               }
-                               catch (Exception e) {
-                                       comm = null;
-                               }
-                       } while (answers < queries && Msg.getClock() < timeout);
-                       destinationFound = nodeList.destinationFound();
-               } while (!destinationFound && (nodesAdded > 0 || answers == 0) && Msg.getClock() < globalTimeout && steps < Common.MAX_STEPS);
-               
-               if (destinationFound) {
-                       if (counts) {
-                               findNodeSuccedded++;
-                       }
-                       Msg.debug("Find node on " + destination + " succedded");
-               }
-               else {
-                       Msg.debug("Find node on " + destination + " failed");
-                       Msg.debug("Queried " + queries + " nodes to find "  + destination);
-                       Msg.debug(nodeList.toString());
-                       if (counts) {
-                               findNodeFailed++;
-                       }
-               }
-               return destinationFound;
-       }
-       /**
-        * Sends a "PING" request to a node
-        * @param destination Ping destination id.
-        */
-       public void ping(int destination) {
-               boolean destinationFound = false;
-               double timeout = Msg.getClock() + Common.PING_TIMEOUT;
-               PingTask pingTask = new PingTask(this.id);
-               /* Sending the ping task */
-               pingTask.dsend(Integer.toString(destination));
-               do
-               {
-                       try {
-                               Task task = Task.receive(Integer.toString(this.id),Common.PING_TIMEOUT);
-                               if (task instanceof PingAnswerTask) {
-                                       PingAnswerTask answerTask = (PingAnswerTask)task;
-                                       if (answerTask.getSenderId() == destination) {
-                                               this.table.update(destination);
-                                               destinationFound = true;
-                                       }
-                                       else {
-                                               handleTask(task);
-                                       }
-                               }
-                               else {
-                                       handleTask(task);
-                               }
-                               waitFor(1);
-                       }
-                       catch (Exception ex) {
-                       }
-               } while (Msg.getClock() < timeout && !destinationFound);
-       }
-       /**
-        * Sends a "FIND_NODE" request (task) to a node we know.
-        * @brief id Id of the node we are querying
-        * @brief destination id of the node we are trying to find.
-        */
-       public void sendFindNode(int id, int destination) {
-               Msg.debug("Sending a FIND_NODE to " + Integer.toString(id) + " to find " + destination  );
-               FindNodeTask task = new FindNodeTask(this.id,destination);
-               task.dsend(Integer.toString(id));
-       }
-       /**
-        * Sends a "FIND_NODE" request to the best "alpha" nodes in a node
-        * list
-        */
-       public int sendFindNodeToBest(Answer nodeList) {
-               int destination = nodeList.getDestinationId();
-               int i;
-               for (i = 0; i < Common.alpha && i < nodeList.size(); i++) {
-                       Contact node = nodeList.getNodes().get(i);
-                       if (node.getId() != this.id) {
-                               this.sendFindNode(node.getId(),destination);
-                       }
-               }
-               return i;
-       }
-       /**
-        * Does a random lookup
-        */
-       public void randomLookup() {
-               findNode(0,true);
-       }
-       /**
-        * Handles an incomming task
-        * @param task The task we need to handle
-        */
-       public void handleTask(Task task) {
-               if (task instanceof KademliaTask) {
-                       table.update(((KademliaTask) task).getSenderId());
-                       if (task instanceof FindNodeTask) {
-                               handleFindNode((FindNodeTask)task);
-                       }
-                       else if (task instanceof PingTask) {
-                               handlePing((PingTask)task);
-                       }
-               }
-       }
-       public void handleFindNode(FindNodeTask task) {
-               Msg.debug("Received a FIND_NODE from " + task.getSenderId());
-               Answer answer = table.findClosest(task.getDestination());
-               FindNodeAnswerTask taskToSend = new FindNodeAnswerTask(this.id,task.getDestination(),answer);
-               taskToSend.dsend(Integer.toString(task.getSenderId()));
-       }
-       public void handlePing(PingTask task) {
-               Msg.debug("Received a PING from " + task.getSenderId());
-               PingAnswerTask taskToSend = new PingAnswerTask(this.id);
-               taskToSend.dsend(Integer.toString(task.getSenderId()));
-       }
+  public void handlePing(PingTask task) {
+    Msg.debug("Received a PING from " + task.getSenderId());
+    PingAnswerTask taskToSend = new PingAnswerTask(this.id);
+    taskToSend.dsend(Integer.toString(task.getSenderId()));
+  }
 }
index 46f2fd8..d6dd4a0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,10 +7,7 @@
 package kademlia;
 
 public class PingAnswerTask extends KademliaTask {
-       /**
-        * Constructor
-        */
-       public PingAnswerTask(int senderId) {
-               super(senderId);
-       }
+  public PingAnswerTask(int senderId) {
+    super(senderId);
+  }
 }
index 3b08c93..eacfb1d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,14 +6,8 @@
 
 package kademlia;
 
-/**
- * @brief "PING" task sent by a node to another to see if it is still alive
- */
 public class PingTask extends KademliaTask {
-       /**
-        * Constructor
-        */
-       public PingTask(int senderId) {
-               super(senderId);
-       }
+  public PingTask(int senderId) {
+    super(senderId);
+  }
 }
index ca136a0..961d38f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,125 +9,105 @@ import java.util.Collections;
 import java.util.Vector;
 
 import org.simgrid.msg.Msg;
-/**
- * @brief Contains the various data of a routing table.
- */
+
 public class RoutingTable {
-       /**
-        * Bucket list
-        */
-       private Vector<Bucket> buckets;
-       /**
-        * Id of the routing table owner
-        */
-       private int id;
-       /**
-        * Constructor
-        */
-       public RoutingTable(int id) {
-               this.id = id;
-               buckets = new Vector<Bucket>();
-               for (int i = 0; i < Common.IDENTIFIER_SIZE + 1; i++) {
-                       buckets.add(new Bucket(i));
-               }               
-       }
-       /**
-        * Returns an identifier which is in a specific bucket of a routing table
-        * @brief id id of the routing table owner
-        * @brief prefix id of the bucket where we want that identifier to be
-        */
-       public int getIdInPrefix(int id, int prefix) {
-               if (prefix == 0) {
-                       return 0;
-               }
-               int identifier = 1;
-               identifier = identifier << (prefix - 1);
-               identifier = identifier ^ id;
-               return identifier;
-       }
-       /**
-        * Returns the corresponding node prefix for a given id
-        */
-       public int getNodePrefix(int id) {
-               for (int j = 0; j < 32; j++) {
-                       if ((id >> (32 - 1 - j) & 0x1) != 0) {
-                               return 32 - j;
-                       }
-               }
-               return 0;
-       }
-       /**
-         * Fins the corresponding bucket in a routing table for a given identifier
-         */
-       public Bucket findBucket(int id) {
-               int xorNumber = id ^ this.id;
-//             Msg.info("Number:" + xorNumber.toString(16));
-               int prefix = this.getNodePrefix(xorNumber);                             
-               
-               return buckets.get(prefix);
-       }
-       /**
-        * Updates the routing table with a new value.
-        */
-       public void update(int id) {
+  /* Bucket list */
+  private Vector<Bucket> buckets;
+  /* Id of the routing table owner */
+  private int id;
+
+  public RoutingTable(int id) {
+    this.id = id;
+    buckets = new Vector<Bucket>();
+    for (int i = 0; i < Common.IDENTIFIER_SIZE + 1; i++) {
+      buckets.add(new Bucket(i));
+    }
+  }
+
+  /**
+   * @brief Returns an identifier which is in a specific bucket of a routing table
+   * @param id id of the routing table owner
+   * @param prefix id of the bucket where we want that identifier to be
+   */
+  public int getIdInPrefix(int id, int prefix) {
+    if (prefix == 0) {
+      return 0;
+    }
+    int identifier = 1;
+    identifier = identifier << (prefix - 1);
+    identifier = identifier ^ id;
+    return identifier;
+  }
+
+  /* Returns the corresponding node prefix for a given id */
+  public int getNodePrefix(int id) {
+    for (int j = 0; j < 32; j++) {
+      if ((id >> (32 - 1 - j) & 0x1) != 0) {
+        return 32 - j;
+      }
+    }
+    return 0;
+  }
+
+  /* Finds the corresponding bucket in a routing table for a given identifier */
+  public Bucket findBucket(int id) {
+    int xorNumber = id ^ this.id;
+    int prefix = this.getNodePrefix(xorNumber);
+    return buckets.get(prefix);
+  }
+
+  /* Updates the routing table with a new value. */
+  public void update(int id) {
+    Bucket bucket = this.findBucket(id);
+    if (bucket.contains(id)) {
+      Msg.debug("Updating " + Integer.toString(id) + " in my routing table");
+      //If the element is already in the bucket, we update it.
+      bucket.pushToFront(id);
+    } else {
+      Msg.debug("Adding " + id + " to my routing table");
+      bucket.add(id);
+      if (bucket.size() > Common.BUCKET_SIZE)  {
+        //TODO: Ping the least seen guy and remove him if he is offline.
+      }
+    }
+  }
 
-               Bucket bucket = this.findBucket(id);
-               if (bucket.contains(id)) {
-                       Msg.debug("Updating " + Integer.toString(id) + " in my routing table");
-                       //If the element is already in the bucket, we update it.
-                       bucket.pushToFront(id);
-               }
-               else {
-                       Msg.debug("Adding " + id + " to my routing table");
-                       bucket.add(id);
-                       if (bucket.size() > Common.BUCKET_SIZE)  {
-                               //TODO: Ping the least seen guy and remove him if he is offline.
-                       }
-               }
-       }
-       /**
-        * Returns the closest notes we know to a given id 
-        */
-       public Answer findClosest(int destinationId) {
-               Answer answer = new Answer(destinationId);
+  /* Returns the closest notes we know to a given id */
+  public Answer findClosest(int destinationId) {
+    Answer answer = new Answer(destinationId);
+    Bucket bucket = this.findBucket(destinationId);
+    bucket.addToAnswer(answer,destinationId);
 
-               
-               Bucket bucket = this.findBucket(destinationId);
-               bucket.addToAnswer(answer,destinationId);
-               
-               for (int i = 1; answer.size() < Common.BUCKET_SIZE && 
-               ((bucket.getId() - i) >= 0 ||
-               (bucket.getId() + i) <= Common.IDENTIFIER_SIZE); i++) {
-                       //Check the previous buckets
-                       if (bucket.getId() - i >= 0) {
-                               Bucket bucketP = this.buckets.get(bucket.getId() - i);
-                               bucketP.addToAnswer(answer,destinationId);
-                       }
-                       //Check the next buckets
-                       if (bucket.getId() + i <= Common.IDENTIFIER_SIZE) {
-                               Bucket bucketN = this.buckets.get(bucket.getId() + i);
-                               bucketN.addToAnswer(answer, destinationId);
-                       }
-               }
-               //We sort the list
-               Collections.sort(answer.getNodes());
-               //We trim the list
-               while (answer.size() > Common.BUCKET_SIZE) {
-                       answer.remove(answer.size() - 1); //TODO: Not the best thing.
-               }
-               
-               return answer;
-       }
-       
-       @Override
-       public String toString() {
-               String string = "RoutingTable [ id=" + id + " " ;
-               for (int i = 0; i < buckets.size(); i++) {
-                       if (buckets.get(i).size() > 0) {
-                               string += buckets.get(i) + " ";
-                       }
-               }
-               return string;
-       }
+    for (int i = 1; answer.size() < Common.BUCKET_SIZE && ((bucket.getId() - i) >= 0 ||
+                                    (bucket.getId() + i) <= Common.IDENTIFIER_SIZE); i++) {
+      //Check the previous buckets
+      if (bucket.getId() - i >= 0) {
+        Bucket bucketP = this.buckets.get(bucket.getId() - i);
+        bucketP.addToAnswer(answer,destinationId);
+      }
+      //Check the next buckets
+      if (bucket.getId() + i <= Common.IDENTIFIER_SIZE) {
+        Bucket bucketN = this.buckets.get(bucket.getId() + i);
+        bucketN.addToAnswer(answer, destinationId);
+      }
+    }
+    //We sort the list
+    Collections.sort(answer.getNodes());
+    //We trim the list
+    while (answer.size() > Common.BUCKET_SIZE) {
+      answer.remove(answer.size() - 1); //TODO: Not the best thing.
+    }
+    return answer;
+  }
 
+  @Override
+  public String toString() {
+    String string = "RoutingTable [ id=" + id + " " ;
+    for (int i = 0; i < buckets.size(); i++) {
+      if (buckets.get(i).size() > 0) {
+        string += buckets.get(i) + " ";
+      }
+    }
+    return string;
+  }
 }
index 7315a7e..4ea6551 100644 (file)
@@ -1,28 +1,23 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
   <process host="Jacquelin" function="kademlia.Node">
     <argument value="0"/>        <!-- my id -->
-    <argument value ="900"/>           <!-- deadline -->
+    <argument value ="900"/>     <!-- deadline -->
   </process>
-
   <process host="Boivin" function="kademlia.Node">
     <argument value="1"/>        <!-- my id -->
-    <argument value="0"/>         <!-- known id -->
-    <argument value ="900"/>           <!-- deadline -->
+    <argument value="0"/>        <!-- known id -->
+    <argument value ="900"/>     <!-- deadline -->
   </process>
-
   <process host="Jean_Yves" function="kademlia.Node">
     <argument value="2"/>        <!-- my id -->
-    <argument value="0"/>         <!-- known id -->
-    <argument value ="900"/>           <!-- deadline -->
+    <argument value="0"/>        <!-- known id -->
+    <argument value ="900"/>     <!-- deadline -->
   </process>
-
   <process host="TeX" function="kademlia.Node">
     <argument value="4"/>        <!-- my id -->
-    <argument value="0"/>         <!-- known id -->
-    <argument value ="900"/>           <!-- deadline -->  
+    <argument value="0"/>        <!-- known id -->
+    <argument value ="900"/>     <!-- deadline -->  
   </process>
-
 </platform>
index 349c954..27a2553 100644 (file)
@@ -30,9 +30,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index 5fda9f5..1946306 100644 (file)
@@ -1,42 +1,42 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package migration;
-
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Task;
 import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 
 public class Emigrant extends Process {
-       public Emigrant(Host host, String name, String[]args) {
-               super(host,name,args);
-       }
-       public void main(String[] args) throws MsgException {           
-               Migration.mutex.acquire();
-               
-               Msg.info("I'll look for a new job on another machine where the grass is greener.");
-               migrate(Host.getByName("Boivin"));
-               
-               Msg.info("Yeah, found something to do");
-               Task task = new Task("job", 98095000, 0);
-               task.execute();
-               waitFor(2);
-               
-               Msg.info("Moving back to home after work");
-               migrate(Host.getByName("Jacquelin"));
-               migrate(Host.getByName("Boivin"));
-               waitFor(4);
-               
-               Migration.processToMigrate = this;
-               Migration.mutex.release();              
-               suspend();
-                       
-               Msg.info("I've been moved on this new host:" + getHost().getName());
-               Msg.info("Uh, nothing to do here. Stopping now");
-       }
+  public Emigrant(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws MsgException {    
+    Migration.mutex.acquire();
+    
+    Msg.info("I'll look for a new job on another machine where the grass is greener.");
+    migrate(Host.getByName("Boivin"));
+
+    Msg.info("Yeah, found something to do");
+    Task task = new Task("job", 98095000, 0);
+    task.execute();
+    waitFor(2);
+
+    Msg.info("Moving back to home after work");
+    migrate(Host.getByName("Jacquelin"));
+    migrate(Host.getByName("Boivin"));
+    waitFor(4);
+
+    Migration.processToMigrate = this;
+    Migration.mutex.release();
+    suspend();
+
+    Msg.info("I've been moved on this new host:" + getHost().getName());
+    Msg.info("Uh, nothing to do here. Stopping now");
+  }
 }
\ No newline at end of file
index 97aa53b..37509a0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,37 +7,28 @@
 package migration;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.Mutex;
-import org.simgrid.msg.NativeException;
 import org.simgrid.msg.Process;
-/**
- * Demonstrates the use of Task.setPriority to change
- * the computation priority of a task
- */ 
-public class Migration  {
-       public static Mutex mutex;
-       public static Process processToMigrate = null;
-       
-   /* This only contains the launcher. If you do nothing more than than you can run 
-    *   java simgrid.msg.Msg
-    * which also contains such a launcher
-    */
-    
-    public static void main(String[] args) throws NativeException {            
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-               if(args.length < 2) {
-                       Msg.info("Usage   : Priority platform_file deployment_file");
-               Msg.info("example : Priority ping_pong_platform.xml ping_pong_deployment.xml");
-               System.exit(1);
-               }
-               /* Create the mutex */
-               mutex = new Mutex();            
-               
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
-               
-               /*  execute the simulation. */
-           Msg.run();
+import org.simgrid.msg.NativeException;
+
+public class Migration {
+  public static Mutex mutex;
+  public static Process processToMigrate = null;
+
+  public static void main(String[] args) throws NativeException {      
+    Msg.init(args);
+    if(args.length < 2) {
+      Msg.info("Usage   : Migration platform_file deployment_file");
+      Msg.info("example : Migration ../platforms/platform.xml migrationDeployment.xml");
+      System.exit(1);
     }
+    /* Create the mutex */
+    mutex = new Mutex();
+
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
+
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
index 664dd33..3d4cfb4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,26 +6,26 @@
 
 package migration;
 
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 
 public class Policeman extends Process {
-       public Policeman(Host host, String name, String[]args) {
-               super(host,name,args);
-       }
+  public Policeman(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
 
-       @Override
-       public void main(String[] args) throws MsgException {
-               waitFor(1);
-               
-               Msg.info("Wait a bit before migrating the emigrant.");
-               
-               Migration.mutex.acquire();
-               
-               Migration.processToMigrate.migrate(Host.getByName("Jacquelin"));
-               Msg.info("I moved the emigrant");
-               Migration.processToMigrate.resume();
-       }
+  @Override
+  public void main(String[] args) throws MsgException {
+    waitFor(1);
+    
+    Msg.info("Wait a bit before migrating the emigrant.");
+    
+    Migration.mutex.acquire();
+    
+    Migration.processToMigrate.migrate(Host.getByName("Jacquelin"));
+    Msg.info("I moved the emigrant");
+    Migration.processToMigrate.resume();
+  }
 }
\ No newline at end of file
index 2c8c3d6..02048a8 100644 (file)
@@ -33,9 +33,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index 7a0e0a6..f605279 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,45 +7,44 @@
 package mutualExclusion;
 import java.util.LinkedList;
 
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Task;
 import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 
+public class Coordinator extends Process {
+  public Coordinator(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+  LinkedList<RequestTask> waitingQueue=new LinkedList<RequestTask>();
+  int CsToServe;
 
-public class Coordinator extends Process  {
-    public Coordinator(Host host, String name, String[]args) {
-               super(host,name,args);
-    } 
-       LinkedList<RequestTask> waitingQueue=new LinkedList<RequestTask>();
-       int CsToServe;
-               
-       public void main(String[] args) throws MsgException {
-               CsToServe = Integer.parseInt(args[0]);
-               Task task;
-               while (CsToServe >0) {
-                       task = Task.receive("coordinator");
-                       if (task instanceof RequestTask) {
-                               RequestTask t = (RequestTask) task;
-                               if (waitingQueue.isEmpty()) {
-                                  Msg.info("Got a request from "+t.from+". Queue empty: grant it");
-                                       GrantTask tosend =  new GrantTask();
-                                       tosend.send(t.from);
-                               } else {
-                                       waitingQueue.addFirst(t);
-                               }
-                       } else if (task instanceof ReleaseTask) {
-                               if (!waitingQueue.isEmpty()) {
-                                       RequestTask req = waitingQueue.removeLast();
-                                       GrantTask tosend = new GrantTask();
-                                       tosend.send(req.from);
-                               }
-                               CsToServe--;
-                               if (waitingQueue.isEmpty() && CsToServe==0) {
-                                       Msg.info("we should shutdown the simulation now");
-                               }
-                       }
-               }
-       }
+  public void main(String[] args) throws MsgException {
+    CsToServe = Integer.parseInt(args[0]);
+    Task task;
+    while (CsToServe >0) {
+      task = Task.receive("coordinator");
+      if (task instanceof RequestTask) {
+        RequestTask t = (RequestTask) task;
+        if (waitingQueue.isEmpty()) {
+          Msg.info("Got a request from "+t.from+". Queue empty: grant it");
+          GrantTask tosend =  new GrantTask();
+          tosend.send(t.from);
+        } else {
+          waitingQueue.addFirst(t);
+        }
+      } else if (task instanceof ReleaseTask) {
+        if (!waitingQueue.isEmpty()) {
+          RequestTask req = waitingQueue.removeLast();
+          GrantTask tosend = new GrantTask();
+          tosend.send(req.from);
+        }
+        CsToServe--;
+        if (waitingQueue.isEmpty() && CsToServe==0) {
+          Msg.info("we should shutdown the simulation now");
+        }
+      }
+    }
+  }
 }
index 79e19d0..fb405a9 100644 (file)
@@ -1,12 +1,8 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package mutualExclusion;
-import org.simgrid.msg.Task;
-
-
-public class GrantTask extends Task {
-}
+public class GrantTask extends org.simgrid.msg.Task {}
index d5da381..ef1fc02 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -10,29 +10,21 @@ import org.simgrid.msg.Msg;
 import org.simgrid.msg.NativeException;
 
 public class MutexCentral {
-
-       /* This only contains the launcher. If you do nothing more than than you can run 
-        *   java simgrid.msg.Msg
-        * which also contains such a launcher
-        */
-
-       public static void main(String[] args) throws NativeException {
-
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-
-               if(args.length < 2) {
-                       Msg.info("Usage: Basic platform_file deployment_file");
-                       Msg.info("Fallback to default values");
-                       Msg.createEnvironment("../ring3.xml");
-                       Msg.deployApplication("mutex_centralized_deployment.xml");
-               } else {
-                       /* construct the platform and deploy the application */
-                       Msg.createEnvironment(args[0]);
-                       Msg.deployApplication(args[1]);
-               }
-               
-               /*  execute the simulation. */
-               Msg.run();
-       }
+  public static void main(String[] args) throws NativeException {
+    Msg.init(args);
+
+    if(args.length < 2) {
+      Msg.info("Usage: MutexCentral platform_file deployment_file");
+      Msg.info("Fallback to default values");
+      Msg.createEnvironment("../platform/small_platform.xml");
+      Msg.deployApplication("mutex_centralized_deployment.xml");
+    } else {
+      /* construct the platform and deploy the application */
+      Msg.createEnvironment(args[0]);
+      Msg.deployApplication(args[1]);
+    }
+
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
index 55d91e3..353dfd7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,29 +6,29 @@
 
 package mutualExclusion;
 
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Task;
 import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 
 public class Node extends Process {
-    public Node(Host host, String name, String[]args) {
-               super(host,name,args);
-    } 
-       public void request(double CStime) throws MsgException {
-               RequestTask req = new RequestTask(getName());
-          Msg.info("Send a request to the coordinator");
-               req.send("coordinator");
-          Msg.info("Wait for a grant from the coordinator");
-               Task.receive(getName()); // FIXME: ensure that this is a grant
-               Task compute = new Task("CS", CStime, 0);
-               compute.execute();
-               ReleaseTask release = new ReleaseTask();
-               release.send("coordinator");
-       }
-       
-       public void main(String[] args) throws MsgException {
-               request(Double.parseDouble(args[1]));
-       }
+  public Node(Host host, String name, String[]args) {
+   super(host,name,args);
+  }
+  public void request(double CStime) throws MsgException {
+    RequestTask req = new RequestTask(getName());
+    Msg.info("Send a request to the coordinator");
+    req.send("coordinator");
+    Msg.info("Wait for a grant from the coordinator");
+    Task.receive(getName()); // FIXME: ensure that this is a grant
+    Task compute = new Task("CS", CStime, 0);
+    compute.execute();
+    ReleaseTask release = new ReleaseTask();
+    release.send("coordinator");
+  }
+
+  public void main(String[] args) throws MsgException {
+    request(Double.parseDouble(args[1]));
+  }
 }
\ No newline at end of file
index 6348116..2a0e020 100644 (file)
@@ -1,9 +1,8 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package mutualExclusion;
-public class ReleaseTask extends org.simgrid.msg.Task {
-}
+public class ReleaseTask extends org.simgrid.msg.Task {}
index 225d16b..1b86e4b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,9 +8,9 @@ package mutualExclusion;
 import org.simgrid.msg.Task;
 
 public class RequestTask extends Task {
-       String from;
-       public RequestTask(String name) {
-               super();
-               from=name;
-       }
+  String from;
+  public RequestTask(String name) {
+    super();
+    from=name;
+  }
 }
index 4abc36c..0f92c30 100644 (file)
@@ -2,14 +2,14 @@
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
   <process host="Tremblay" function="mutualExclusion.Coordinator">
-      <argument value="2"/> <!-- Amount of CS to serve -->
+    <argument value="2"/> <!-- Amount of CS to serve -->
   </process>
   <process host="Jupiter" function="mutualExclusion.Node">
-      <argument value="2"/> <!-- initial sleep time -->
-      <argument value="5"/> <!-- CS time -->
+    <argument value="2"/> <!-- initial sleep time -->
+    <argument value="5"/> <!-- CS time -->
   </process>
   <process host="Fafard" function="mutualExclusion.Node">
-      <argument value="2"/> <!-- initial sleep time -->
-      <argument value="5"/> <!-- CS time -->
+    <argument value="2"/> <!-- initial sleep time -->
+    <argument value="5"/> <!-- CS time -->
   </process>
 </platform>
index 001a23b..1132494 100644 (file)
@@ -31,10 +31,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/README
-  PARENT_SCOPE)
index 76f7fff..17f2bed 100644 (file)
@@ -1,31 +1,29 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package pingPong;
-import org.simgrid.msg.NativeException;
 import org.simgrid.msg.Task;
+import org.simgrid.msg.NativeException;
 
 public class PingPongTask extends Task {
-   
-   private double timeVal;
-   
-   public PingPongTask() throws NativeException {
-      this.timeVal = 0;
-   }
-   
-   public PingPongTask(String name, double computeDuration, double messageSize) throws NativeException {      
-      super(name,computeDuration,messageSize);         
-   }
-   
-   public void setTime(double timeVal){
-      this.timeVal = timeVal;
-   }
-   
-   public double getTime() {
-      return this.timeVal;
-   }
+  private double timeVal;
+
+  public PingPongTask() throws NativeException {
+    this.timeVal = 0;
+  }
+
+  public PingPongTask(String name, double computeDuration, double messageSize) throws NativeException {
+    super(name,computeDuration,messageSize);
+  }
+
+  public void setTime(double timeVal) {
+    this.timeVal = timeVal;
+  }
+
+  public double getTime() {
+    return this.timeVal;
+  }
 }
-    
\ No newline at end of file
index 04f71d9..cb7ef02 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,27 +8,20 @@ package pingPong;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.NativeException;
  
-public class PingPongTest  {
+public class PingPongTest {
+  public static void main(String[] args) throws NativeException {
+    Msg.init(args);
+    if(args.length < 2) {
+      Msg.info("Usage   : PingPongTest platform_file deployment_file");
+      Msg.info("example : PingPongTest ../platforms/platform.xml pingPongDeployment.xml");
+      System.exit(1);
+    }
 
-   /* This only contains the launcher. If you do nothing more than than you can run 
-    *   java simgrid.msg.Msg
-    * which also contains such a launcher
-    */
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
     
-    public static void main(String[] args) throws NativeException {            
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-               if(args.length < 2) {
-                       Msg.info("Usage   : PingPong platform_file deployment_file");
-               Msg.info("example : PingPong ping_pong_platform.xml ping_pong_deployment.xml");
-               System.exit(1);
-               }
-       
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
-               
-               /*  execute the simulation. */
-           Msg.run();
-    }
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
diff --git a/examples/java/pingPong/README b/examples/java/pingPong/README
deleted file mode 100644 (file)
index aa16de9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-This is a stupid ping/pong example. The processes exchange a simple
-task and time them.
\ No newline at end of file
index 57e69cf..0d6f1ce 100644 (file)
@@ -5,41 +5,38 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package pingPong;
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Task;
 import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 
 public class Receiver extends Process {
-   public Receiver(Host host, String name, String[]args) {
-               super(host,name,args);
-   } 
-   final double commSizeLat = 1;
-   final double commSizeBw = 100000000;
-    
-   public void main(String[] args) throws MsgException {
-        
-      Msg.info("hello!");
-      double communicationTime=0;
-
-      double time = Msg.getClock();
-    
-      Msg.info("try to get a task");
-        
-      PingPongTask task = (PingPongTask)Task.receive(getHost().getName());
-      double timeGot = Msg.getClock();
-      double timeSent = task.getTime();
-            
-      Msg.info("Got at time "+ timeGot);
-      Msg.info("Was sent at time "+timeSent);
-      time=timeSent;
-            
-      communicationTime=timeGot - time;
-      Msg.info("Communication time : " + communicationTime);
-            
-      Msg.info(" --- bw "+ commSizeBw/communicationTime + " ----");
-            
-      Msg.info("goodbye!");
-    }
+  final double commSizeLat = 1;
+  final double commSizeBw = 100000000;
+  public Receiver(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws MsgException {
+    Msg.info("hello!");
+    double communicationTime=0;
+
+    double time = Msg.getClock();
+
+    Msg.info("try to get a task");
+
+    PingPongTask task = (PingPongTask)Task.receive(getHost().getName());
+    double timeGot = Msg.getClock();
+    double timeSent = task.getTime();
+
+    Msg.info("Got at time "+ timeGot);
+    Msg.info("Was sent at time "+timeSent);
+    time=timeSent;
+
+    communicationTime=timeGot - time;
+    Msg.info("Communication time : " + communicationTime);
+    Msg.info(" --- bw "+ commSizeBw/communicationTime + " ----");
+    Msg.info("goodbye!");
+  }
 }
\ No newline at end of file
index 52fbab1..530b67a 100644 (file)
@@ -1,55 +1,55 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package pingPong;
-import org.simgrid.msg.Host;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
+import org.simgrid.msg.HostNotFoundException;
 
 public class Sender extends Process {
-       public Sender(Host host, String name, String[] args) {
-               super(host,name,args);
-       }
-    private final double commSizeLat = 1;
-    final double commSizeBw = 100000000;
-   
-    public void main(String[] args) throws MsgException {
-       
-       Msg.info("hello!");
-        
-       int hostCount = args.length;
-        
-       Msg.info("host count: " + hostCount);
-       String mailboxes[] = new String[hostCount]; 
-       double time;
-       double computeDuration = 0;
-       PingPongTask task;
-        
-       for(int pos = 0; pos < args.length ; pos++) {
-         try {
-            mailboxes[pos] = Host.getByName(args[pos]).getName();
-         } catch (HostNotFoundException e) {
-            Msg.info("Invalid deployment file: " + e.toString());           
-            System.exit(1);
-         }
-        }
-        
-        for (int pos = 0; pos < hostCount; pos++) { 
-          time = Msg.getClock(); 
-            
-          Msg.info("sender time: " + time);
-          
-          task = new PingPongTask("no name",computeDuration,commSizeLat);
-          task.setTime(time);
-            
-          task.send(mailboxes[pos]);
-        } 
-        
-        Msg.info("goodbye!");
+  private final double commSizeLat = 1;
+  final double commSizeBw = 100000000;
+
+  public Sender(Host host, String name, String[] args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws MsgException {
+    Msg.info("hello!");
+
+    int hostCount = args.length;
+
+    Msg.info("host count: " + hostCount);
+    String mailboxes[] = new String[hostCount]; 
+    double time;
+    double computeDuration = 0;
+    PingPongTask task;
+
+    for(int pos = 0; pos < args.length ; pos++) {
+      try {
+        mailboxes[pos] = Host.getByName(args[pos]).getName();
+      } catch (HostNotFoundException e) {
+        Msg.info("Invalid deployment file: " + e.toString());
+        System.exit(1);
+      }
+    }
+
+    for (int pos = 0; pos < hostCount; pos++) { 
+      time = Msg.getClock(); 
+
+      Msg.info("sender time: " + time);
+
+      task = new PingPongTask("no name",computeDuration,commSizeLat);
+      task.setTime(time);
+
+      task.send(mailboxes[pos]);
     }
+
+    Msg.info("goodbye!");
+  }
 }
\ No newline at end of file
index 16f5860..c7eec34 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
   <process host="Jacquelin" function="pingPong.Sender">
-      <argument value="Boivin"/>
+    <argument value="Boivin"/>
   </process>
-<process host="Boivin" function="pingPong.Receiver"/>
+  <process host="Boivin" function="pingPong.Receiver"/>
 </platform>
index b23c0c1..1eb9ee4 100644 (file)
@@ -29,9 +29,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index 2462ca0..10fa76a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,31 +7,22 @@
 package priority;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.NativeException;
-/**
- * Demonstrates the use of Task.setPriority to change
- * the computation priority of a task
- */ 
-public class Priority  {
 
-   /* This only contains the launcher. If you do nothing more than than you can run 
-    *   java simgrid.msg.Msg
-    * which also contains such a launcher
-    */
-    
-    public static void main(String[] args) throws NativeException {            
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-               if(args.length < 2) {
-                       Msg.info("Usage   : Priority platform_file deployment_file");
-               Msg.info("example : Priority ping_pong_platform.xml ping_pong_deployment.xml");
-               System.exit(1);
-               }
-       
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
-               
-               /*  execute the simulation. */
-           Msg.run();
+/* Demonstrates the use of Task.setPriority to change the computation priority of a task */ 
+public class Priority  {
+  public static void main(String[] args) throws NativeException {
+    Msg.init(args);
+    if(args.length < 2) {
+      Msg.info("Usage   : Priority platform_file deployment_file");
+      Msg.info("example : Priority ../platforms/platform.xml priorityDeployment.xml");
+      System.exit(1);
     }
+
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
+
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
index 14370f3..8fb44d3 100644 (file)
@@ -1,34 +1,35 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package priority;
-import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Task;
 import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
 
 public class Test extends Process {
-       public Test(Host host, String name, String[]args) {
-               super(host,name,args);
-       }
-       public void main(String[] args) throws MsgException {   
-               double computationAmount = 1.0;
-               double priority = 1.0;
-               
-               computationAmount = Double.valueOf(args[0]);
-               priority = Double.valueOf(args[1]);
-               
-               Msg.info("Hello! Running a task of size " + computationAmount + " with priority " + priority);
-               
-               Task task = new Task("Task", computationAmount, 0);
-               task.setPriority(priority);
-               
-               task.execute();
-               
-               Msg.info("Goodbye now!");
-       }
+  public Test(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws MsgException {  
+    double computationAmount = 1.0;
+    double priority = 1.0;
+
+    computationAmount = Double.valueOf(args[0]);
+    priority = Double.valueOf(args[1]);
+
+    Msg.info("Hello! Running a task of size " + computationAmount + " with priority " + priority);
+
+    Task task = new Task("Task", computationAmount, 0);
+    task.setPriority(priority);
+
+    task.execute();
+
+    Msg.info("Goodbye now!");
+  }
 }
index acfe44b..1a1bdc5 100644 (file)
@@ -24,18 +24,9 @@ set(tesh_files
   PARENT_SCOPE)
 set(xml_files
   ${xml_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_kill.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_start.xml
   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_start_kill.xml
   PARENT_SCOPE)
 set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index 270c4a6..593e39a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -14,13 +14,13 @@ import org.simgrid.msg.TransferFailureException;
 
 
 public class Master extends Process {
-       public Master(Host host, String name, String[]args) {
-               super(host,name,args);
-       } 
-       public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
-               Msg.info("Hello!");
-               waitFor(10.0);
-               Msg.info("OK, goodbye now.");
-       
+  public Master(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
+    Msg.info("Hello!");
+    waitFor(10.0);
+    Msg.info("OK, goodbye now.");
   }
 }
index 0018b6e..d8feef4 100644 (file)
@@ -1,33 +1,28 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package startKillTime;
-import org.simgrid.msg.Host;
-import org.simgrid.msg.HostFailureException;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Process;
-import org.simgrid.msg.TimeoutException;
-import org.simgrid.msg.TransferFailureException;
+import org.simgrid.msg.MsgException;
 
-/**
- * Lazy Guy Slave, suspends itself ASAP
- */
+/* Lazy Guy Slave, suspends itself ASAP */
 public class Slave extends Process {
-       public Slave(Host host, String name, String[]args) {
-               super(host,name,args);
-       } 
-       public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
-               Msg.info("Hello!");
-                try {
-                        waitFor(10.0);
-                        Msg.info("OK, goodbye now.");
-                } catch (MsgException e) {
-                        Msg.debug("Wait cancelled.");
-                }
-       
+  public Slave(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws MsgException {
+    Msg.info("Hello!");
+    try {
+      waitFor(10.0);
+      Msg.info("OK, goodbye now.");
+    } catch (MsgException e) {
+      Msg.debug("Wait cancelled.");
+    }
   }
 }
index 8daffbe..b7240b3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,28 +7,20 @@
 package startKillTime;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.NativeException;
-public class StartKillTime  {
 
-   /* This only contains the launcher. If you do nothing more than than you can run 
-    *   java org.simgrid.msg.Msg
-    * which also contains such a launcher
-    */
-    
-    public static void main(String[] args) throws NativeException {            
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-               if(args.length < 2) {
-                       Msg.info("Usage   : StartKilltime platform_file deployment_file");
-               Msg.info("example : StartKilltime platform.xml startKilltime.xml");
-               System.exit(1);
-               }
-       
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
-               
-               /*  execute the simulation. */
-           Msg.run();
+public class StartKillTime {
+  public static void main(String[] args) throws NativeException {      
+    Msg.init(args);
+    if(args.length < 2) {
+      Msg.info("Usage   : StartKilltime platform_file deployment_file");
+      Msg.info("example : StartKilltime ../platforms/platform.xml deployment_start_kill.xml");
+      System.exit(1);
     }
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
+
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
diff --git a/examples/java/startKillTime/deployment.xml b/examples/java/startKillTime/deployment.xml
deleted file mode 100644 (file)
index 0bbd654..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
-   <process host="Jacquelin" function="startKillTime.Master"/>
-  <process host="Boivin" function="startKillTime.Slave"/>
-       <process host="Jean_Yves" function="startKillTime.Slave"/>
-       <process host="TeX" function="startKillTime.Slave"/>
-       <process host="Geoff" function="startKillTime.Slave"/>
-       <process host="Disney" function="startKillTime.Slave"/>
-</platform>
diff --git a/examples/java/startKillTime/deployment_kill.xml b/examples/java/startKillTime/deployment_kill.xml
deleted file mode 100644 (file)
index 4270dc0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
-   <process host="Jacquelin" function="startKillTime.Master"/>
-  <process host="Boivin" function="startKillTime.Slave"  kill_time="5"/>
-       <process host="Jean_Yves" function="startKillTime.Slave" kill_time="6"/>
-       <process host="TeX" function="startKillTime.Slave"  kill_time="7"/>
-       <process host="Geoff" function="startKillTime.Slave" kill_time="8"/>
-       <process host="Disney" function="startKillTime.Slave" kill_time="9"/>
-</platform>
diff --git a/examples/java/startKillTime/deployment_start.xml b/examples/java/startKillTime/deployment_start.xml
deleted file mode 100644 (file)
index 7e33054..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
-  <process host="Jacquelin" function="startKillTime.Master"/>
-  <process host="Boivin" function="startKillTime.Slave" start_time="1" />
-       <process host="Jean_Yves" function="startKillTime.Slave" start_time="2"/>
-       <process host="TeX" function="startKillTime.Slave" start_time="3"/>
-       <process host="Geoff" function="startKillTime.Slave" start_time="4"/>
-       <process host="Disney" function="startKillTime.Slave" start_time="5"/>
-</platform>
index 5f083d8..d449286 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-   <process host="Jacquelin" function="startKillTime.Master"/>
+  <process host="Jacquelin" function="startKillTime.Master"/>
   <process host="Boivin" function="startKillTime.Slave" start_time="1" kill_time="5"/>
-       <process host="Jean_Yves" function="startKillTime.Slave" start_time="2" kill_time="6"/>
-       <process host="TeX" function="startKillTime.Slave" start_time="3" kill_time="7"/>
-       <process host="Geoff" function="startKillTime.Slave" start_time="4" kill_time="8"/>
-       <process host="Disney" function="startKillTime.Slave" start_time="5" kill_time="9"/>
+  <process host="Jean_Yves" function="startKillTime.Slave" start_time="2" kill_time="6"/>
+  <process host="TeX" function="startKillTime.Slave" start_time="3" kill_time="7"/>
+  <process host="Geoff" function="startKillTime.Slave" start_time="4" kill_time="8"/>
+  <process host="Disney" function="startKillTime.Slave" start_time="5" kill_time="9"/>
 </platform>
index 07088a4..d978b49 100644 (file)
@@ -30,9 +30,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE)
index 8dff985..6469b5a 100644 (file)
@@ -5,23 +5,24 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package suspend;
-
 import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.Process;
 import org.simgrid.msg.MsgException;
+
 public class DreamMaster extends Process {
-       public DreamMaster(Host host, String name, String[]args) {
-               super(host,name,args);
-       } 
-       public void main(String[] args) throws MsgException {
-               Msg.info("Let's create a lazy guy.");
-               Process lazyGuy = new LazyGuy(getHost(),"Lazy",null);
-               lazyGuy.start();
-               Msg.info("Let's wait a little bit...");
-               waitFor(10);
-               Msg.info("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
-               lazyGuy.resume();
-               Msg.info("OK, goodbye now.");
-       }
+  public DreamMaster(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws MsgException {
+    Msg.info("Let's create a lazy guy.");
+    Process lazyGuy = new LazyGuy(getHost(),"Lazy",null);
+    lazyGuy.start();
+    Msg.info("Let's wait a little bit...");
+    waitFor(10);
+    Msg.info("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
+    lazyGuy.resume();
+    Msg.info("OK, goodbye now.");
+  }
 }
\ No newline at end of file
index ffad084..74231fe 100644 (file)
@@ -1,23 +1,24 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package suspend;
-
 import org.simgrid.msg.Host;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.Process;
 import org.simgrid.msg.MsgException;
+
 public class LazyGuy extends Process {
-       public LazyGuy(Host host, String name, String[]args) {
-               super(host,name,args);
-       } 
-       public void main(String[] args) throws MsgException {
-               Msg.info("Nobody's watching me ? Let's go to sleep.");
-               suspend();
-               Msg.info("Uuuh ? Did somebody call me ?");
-               Msg.info("Mmmh, goodbye now.");
-       }
+  public LazyGuy(Host host, String name, String[]args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws MsgException {
+    Msg.info("Nobody's watching me ? Let's go to sleep.");
+    suspend();
+    Msg.info("Uuuh ? Did somebody call me ?");
+    Msg.info("Mmmh, goodbye now.");
+  }
 }
\ No newline at end of file
index 027ed8e..f6c19e0 100644 (file)
@@ -1,27 +1,25 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package suspend;
-
 import org.simgrid.msg.Msg;
 
 public class Suspend {
-       public static void main(String[] args) {
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-       if(args.length < 2) {
-               Msg.info("Usage   : Suspend platform_file deployment_file");
-               Msg.info("example : Suspend platform.xml deployment.xml");
-               System.exit(1);
-       }
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
-                       
-               /*  execute the simulation. */
-        Msg.run();             
-       }
+  public static void main(String[] args) {
+    Msg.init(args);
+    if(args.length < 2) {
+      Msg.info("Usage   : Suspend platform_file deployment_file");
+      Msg.info("example : Suspend ../platforms/platform.xml suspendDeployment.xml");
+      System.exit(1);
+    }
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
+
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
index 9dde98c..e21c754 100644 (file)
@@ -31,10 +31,3 @@ set(examples_src
   ${examples_src}
   ${sources}
   PARENT_SCOPE)
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE)
-set(txt_files
-  ${txt_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/README
-  PARENT_SCOPE)
index f43b69e..22ee817 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,23 +9,22 @@ import org.simgrid.msg.NativeException;
 import org.simgrid.msg.Task;
 
 public class PingPongTask extends Task {
-   
-   private double timeVal;
-   
-   public PingPongTask() throws NativeException {
-      this.timeVal = 0;
-   }
-   
-   public PingPongTask(String name, double computeDuration, double messageSize) throws NativeException {      
-      super(name,computeDuration,messageSize);         
-   }
-   
-   public void setTime(double timeVal){
-      this.timeVal = timeVal;
-   }
-   
-   public double getTime() {
-      return this.timeVal;
-   }
+  private double timeVal;
+
+  public PingPongTask() throws NativeException {
+    this.timeVal = 0;
+  }
+
+  public PingPongTask(String name, double computeDuration, double messageSize) throws NativeException {
+    super(name,computeDuration,messageSize);
+  }
+
+  public void setTime(double timeVal){
+    this.timeVal = timeVal;
+  }
+
+  public double getTime() {
+    return this.timeVal;
+  }
 }
-    
+
diff --git a/examples/java/tracing/README b/examples/java/tracing/README
deleted file mode 100644 (file)
index aa16de9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-This is a stupid ping/pong example. The processes exchange a simple
-task and time them.
\ No newline at end of file
index 0cd91d4..d3d0a1a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2007, 2012-2014. The SimGrid Team.
+/* Copyright (c) 2006-2007, 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -13,49 +13,47 @@ import org.simgrid.msg.Process;
 import org.simgrid.trace.Trace;
 
 public class Receiver extends Process {
-  
-       private  final double commSizeLat = 1;
+  private  final double commSizeLat = 1;
   private final double commSizeBw = 100000000;
-                
-       public Receiver(Host host, String name, String[]args) {
-               super(host,name,args);
-   } 
-   
-   public void main(String[] args) throws MsgException {
-        
-      Msg.info("hello!");
-      Trace.hostPushState (getHost().getName(), "PM_STATE", "waitingPing");
-                       double communicationTime=0;
-
-      double time = Msg.getClock();
-    
-                       /* Wait for the ping */ 
-      Msg.info("try to get a task");
-        
-      PingPongTask ping = (PingPongTask)Task.receive(getHost().getName());
-      double timeGot = Msg.getClock();
-      double timeSent = ping.getTime();
-            
-      Msg.info("Got at time "+ timeGot);
-      Msg.info("Was sent at time "+timeSent);
-      time=timeSent;
-            
-      communicationTime=timeGot - time;
-      Msg.info("Communication time : " + communicationTime);
-            
-      Msg.info(" --- bw "+ commSizeBw/communicationTime + " ----");
-      
-                       /* Send the pong */
-               Trace.hostPushState (getHost().getName(), "PM_STATE", "sendingPong");
-                       double computeDuration = 0;
-                       PingPongTask pong = new PingPongTask("no name",computeDuration,commSizeLat);
-                       pong.setTime(time);
-                       pong.send(ping.getSource().getName());
-
-               /* Pop the two states */
-      Trace.hostPopState (getHost().getName(), "PM_STATE");
-      Trace.hostPopState (getHost().getName(), "PM_STATE");
-  
-               Msg.info("goodbye!");
-    }
+
+  public Receiver(Host host, String name, String[]args) {
+    super(host,name,args);
+  } 
+
+  public void main(String[] args) throws MsgException {
+    Msg.info("hello!");
+    Trace.hostPushState (getHost().getName(), "PM_STATE", "waitingPing");
+    double communicationTime=0;
+
+    double time = Msg.getClock();
+
+    /* Wait for the ping */ 
+    Msg.info("try to get a task");
+
+    PingPongTask ping = (PingPongTask)Task.receive(getHost().getName());
+    double timeGot = Msg.getClock();
+    double timeSent = ping.getTime();
+
+    Msg.info("Got at time "+ timeGot);
+    Msg.info("Was sent at time "+timeSent);
+    time=timeSent;
+
+    communicationTime=timeGot - time;
+    Msg.info("Communication time : " + communicationTime);
+
+    Msg.info(" --- bw "+ commSizeBw/communicationTime + " ----");
+
+    /* Send the pong */
+    Trace.hostPushState (getHost().getName(), "PM_STATE", "sendingPong");
+    double computeDuration = 0;
+    PingPongTask pong = new PingPongTask("no name",computeDuration,commSizeLat);
+    pong.setTime(time);
+    pong.send(ping.getSource().getName());
+
+    /* Pop the two states */
+    Trace.hostPopState (getHost().getName(), "PM_STATE");
+    Trace.hostPopState (getHost().getName(), "PM_STATE");
+
+    Msg.info("goodbye!");
+  }
 }
index 82930bd..8d9206b 100644 (file)
@@ -1,77 +1,74 @@
-/* Sender of basic ping/pong example */
-
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package tracing;
-import org.simgrid.msg.Host;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.Msg;
+import org.simgrid.msg.Host;
 import org.simgrid.msg.Task;
-import org.simgrid.msg.MsgException;
 import org.simgrid.msg.Process;
+import org.simgrid.msg.MsgException;
+import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.trace.Trace;
 
 public class Sender extends Process {
-       
-                               private final double commSizeLat = 1;
-                               private final double commSizeBw = 100000000;
+  private final double commSizeLat = 1;
+  private final double commSizeBw = 100000000;
+
+  public Sender(Host host, String name, String[] args) {
+    super(host,name,args);
+  }
+
+  public void main(String[] args) throws MsgException {
+    Msg.info("hello !"); 
+    Trace.hostPushState (getHost().getName(), "PM_STATE", "sendingPing");
+
+    int hostCount = args.length;
+    Msg.info("host count: " + hostCount);
+    String mailboxes[] = new String[hostCount]; 
+    double time;
+    double computeDuration = 0;
+    PingPongTask ping, pong;
+
+    for(int pos = 0; pos < args.length ; pos++) {
+      try {
+        mailboxes[pos] = Host.getByName(args[pos]).getName();
+      } catch (HostNotFoundException e) {
+        Msg.info("Invalid deployment file: " + e.toString());
+        System.exit(1);
+      }
+    }
+
+    for (int pos = 0; pos < hostCount; pos++) { 
+      time = Msg.getClock(); 
+      Msg.info("sender time: " + time);
+      ping = new PingPongTask("no name",computeDuration,commSizeLat);
+      ping.setTime(time);
+      ping.send(mailboxes[pos]);
+
+      Trace.hostPushState (getHost().getName(), "PM_STATE", "waitingPong");
+      pong = (PingPongTask)Task.receive(getHost().getName());
+      double timeGot = Msg.getClock();
+      double timeSent = ping.getTime();
+      double communicationTime=0;
+
+      Msg.info("Got at time "+ timeGot);
+      Msg.info("Was sent at time "+timeSent);
+      time=timeSent;
+
+      communicationTime=timeGot - time;
+      Msg.info("Communication time : " + communicationTime);
+
+      Msg.info(" --- bw "+ commSizeBw/communicationTime + " ----");
 
-                               public Sender(Host host, String name, String[] args) {
-                                                               super(host,name,args);
-                               }
-                               
-                               public void main(String[] args) throws MsgException {
-                                                               Msg.info("hello !"); 
-                                                               Trace.hostPushState (getHost().getName(), "PM_STATE", "sendingPing");
-                                                               
-                                                               int hostCount = args.length;
-                                                               Msg.info("host count: " + hostCount);
-                                                               String mailboxes[] = new String[hostCount]; 
-                                                               double time;
-                                                               double computeDuration = 0;
-                                                               PingPongTask ping, pong;
-                                                               
-                                                               for(int pos = 0; pos < args.length ; pos++) {
-                                                                                               try {
-                                                                                                                               mailboxes[pos] = Host.getByName(args[pos]).getName();
-                                                                                               } catch (HostNotFoundException e) {
-                                                                                                                               Msg.info("Invalid deployment file: " + e.toString());
-                                                                                                                               System.exit(1);
-                                                                                               }
-                                                               }
-                                                               
-                                                               for (int pos = 0; pos < hostCount; pos++) { 
-                                                                                               time = Msg.getClock(); 
-                                                                                               Msg.info("sender time: " + time);
-                                                                                               ping = new PingPongTask("no name",computeDuration,commSizeLat);
-                                                                                               ping.setTime(time);
-                                                                                               ping.send(mailboxes[pos]);
-                                                               
-                                                                                               Trace.hostPushState (getHost().getName(), "PM_STATE", "waitingPong");
-                                                                                               pong = (PingPongTask)Task.receive(getHost().getName());
-                                                                       double timeGot = Msg.getClock();
-                                                                       double timeSent = ping.getTime();
-                                                       double communicationTime=0;
-                                                                       
-                                                                                               Msg.info("Got at time "+ timeGot);
-                                                                       Msg.info("Was sent at time "+timeSent);
-                                                                       time=timeSent;
-            
-                                                                       communicationTime=timeGot - time;
-                                                                       Msg.info("Communication time : " + communicationTime);
-            
-                                                                       Msg.info(" --- bw "+ commSizeBw/communicationTime + " ----");
-      
-                                                                                               /* Pop the last state (going back to sending ping) */   
-                                                                                               Trace.hostPopState (getHost().getName(), "PM_STATE");
+      /* Pop the last state (going back to sending ping) */  
+      Trace.hostPopState (getHost().getName(), "PM_STATE");
+    }
 
-                                                               }
-                                                          /* Pop the sendingPong state */      
-                                                               Trace.hostPopState (getHost().getName(), "PM_STATE");
-                                                               Msg.info("goodbye!");
-                               }
+    /* Pop the sendingPong state */  
+    Trace.hostPopState (getHost().getName(), "PM_STATE");
+    Msg.info("goodbye!");
+  }
 }
index b8453bd..5a033e3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2007, 2012-2014. The SimGrid Team.
+/* Copyright (c) 2006-2007, 2012-2014, 2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,35 +8,28 @@ package tracing;
 import org.simgrid.msg.Msg;
 import org.simgrid.trace.Trace;
 import org.simgrid.msg.NativeException;
+
 public class TracingTest  {
+  public static void main(String[] args) throws NativeException {      
+    Msg.init(args);
+    if(args.length < 2) {
+      Msg.info("Usage   : TracingTest platform_file deployment_file");
+      Msg.info("example : TracingTest ../platforms/platform.xml tracingPingPongDeployment.xml");
+      System.exit(1);
+    }
 
-   /* This only contains the launcher. If you do nothing more than than you can run 
-    *   java simgrid.msg.Msg
-    * which also contains such a launcher
-    */
-    
-    public static void main(String[] args) throws NativeException {            
-               /* initialize the MSG simulation. Must be done before anything else (even logging). */
-               Msg.init(args);
-               if(args.length < 2) {
-                       Msg.info("Usage   : PingPong platform_file deployment_file");
-               Msg.info("example : PingPong ping_pong_platform.xml ping_pong_deployment.xml");
-               System.exit(1);
-               }
-       
-               /* construct the platform and deploy the application */
-               Msg.createEnvironment(args[0]);
-               Msg.deployApplication(args[1]);
+    /* construct the platform and deploy the application */
+    Msg.createEnvironment(args[0]);
+    Msg.deployApplication(args[1]);
 
-               /* Initialize some state for the hosts */
-               Trace.hostStateDeclare ("PM_STATE"); 
-               Trace.hostStateDeclareValue ("PM_STATE", "waitingPing", "0 0 1");
-               Trace.hostStateDeclareValue ("PM_STATE", "sendingPong", "0 1 0");
-               Trace.hostStateDeclareValue ("PM_STATE", "sendingPing", "0 1 1");
-               Trace.hostStateDeclareValue ("PM_STATE", "waitingPong", "1 0 0");
+    /* Initialize some state for the hosts */
+    Trace.hostStateDeclare ("PM_STATE"); 
+    Trace.hostStateDeclareValue ("PM_STATE", "waitingPing", "0 0 1");
+    Trace.hostStateDeclareValue ("PM_STATE", "sendingPong", "0 1 0");
+    Trace.hostStateDeclareValue ("PM_STATE", "sendingPing", "0 1 1");
+    Trace.hostStateDeclareValue ("PM_STATE", "waitingPong", "1 0 0");
 
-               /*  execute the simulation. */
-           Msg.run();
-    }
+    /*  execute the simulation. */
+    Msg.run();
+  }
 }
index fa2c473..ed7db68 100644 (file)
@@ -2,9 +2,9 @@
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
   <process host="Jacquelin" function="tracing.Sender">
-      <argument value="Boivin"/>
-      <argument value="Marcel"/>
+    <argument value="Boivin"/>
+    <argument value="Marcel"/>
   </process>
-<process host="Boivin" function="tracing.Receiver"/>
-<process host="Marcel" function="tracing.Receiver"/>
+  <process host="Boivin" function="tracing.Receiver"/>
+  <process host="Marcel" function="tracing.Receiver"/>
 </platform>
index 88d352c..e60fdce 100644 (file)
@@ -1,59 +1,50 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
   <process host="Gatien" function="node">
     <argument value="48"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="400"/>        <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="McGee" function="node">
     <argument value="42"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="300"/>        <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="iRMX" function="node">
     <argument value="38"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="200"/>         <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="Geoff" function="node">
     <argument value="32"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="100"/>         <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="TeX" function="node">
     <argument value="21"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="40"/>        <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="Jean_Yves" function="node">
     <argument value="14"/>        <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="16"/>        <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-  
   <process host="Boivin" function="node">
     <argument value="8"/>         <!-- my id -->
     <argument value="1"/>         <!-- known id -->
     <argument value="1"/>         <!-- time to sleep before it starts-->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
   <process host="Jacquelin" function="node">
     <argument value="1"/>         <!-- my id -->
-    <argument value ="600"/>           <!-- deadline -->
+    <argument value ="600"/>    <!-- deadline -->
   </process>
-
 </platform>
index 1f60947..0964365 100644 (file)
@@ -1,6 +1,7 @@
 #! ./tesh
 
 $ $SG_TEST_EXENV parallel_task/parallel_task$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'ptask_L07'
 > [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
 > [  0.000000] (1:test@Fafard) First, build a classical parallel task, with 1 Gflop to execute on each node, and 10MB to exchange between each pair
 > [ 20.625396] (1:test@Fafard) Then, build a parallel task involving only computations and no communication (1 Gflop per node)
index 4f33d9c..dacf416 100644 (file)
@@ -1,46 +1,29 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-<AS  id="AS0"  routing="Full">
-  <cluster id="my_cluster_1" prefix="" suffix=""
-               radical="1"     speed="1Gf"    bw="125MBps"     lat="50us"/>
-               
-  <cluster id="my_cluster_2" prefix="" suffix=""
-           radical="2" speed="1Gf"     bw="125MBps"    lat="50us"/>  
-           
-  <cluster id="my_cluster_3" prefix="" suffix=""
-        radical="3" speed="1Gf"    bw="125MBps"  lat="50us"/>  
-       
-     <link id="link1" bandwidth="1.25GBps" latency="500us"/>  
-        <link id="link2" bandwidth="1.25GBps" latency="500us"/>
-        <link id="link3" bandwidth="1.25GBps" latency="500us"/>
-        <link id="link_tmp"  bandwidth="1.25GBps" latency="500us"/>
-       
-     <ASroute src="my_cluster_1" dst="my_cluster_2" 
-        gw_src="my_cluster_1_router" 
-        gw_dst="my_cluster_2_router">
-               <link_ctn id="link1"/>
-               <link_ctn id="link2"/>
-     </ASroute>
-     
-     <ASroute src="my_cluster_1" dst="my_cluster_3" 
-     gw_src="my_cluster_1_router" 
-     gw_dst="my_cluster_3_router">
-        <link_ctn id="link1"/>
-        <link_ctn id="link3"/>
-     </ASroute>
-     
-     <ASroute src="my_cluster_2" dst="my_cluster_3" 
-     gw_src="my_cluster_2_router" 
-     gw_dst="my_cluster_3_router">
-        <link_ctn id="link2"/>
-        <link_ctn id="link3"/>
-     </ASroute>
-     
-     <bypassASroute src="my_cluster_1" dst="my_cluster_2"
-     gw_src="my_cluster_1_router" 
-     gw_dst="my_cluster_2_router">
-        <link_ctn id="link_tmp"/>  
-     </bypassASroute>
+<AS  id="AS0" routing="Full">
+  <cluster id="my_cluster_1" prefix="" suffix="" radical="1" speed="1Gf" bw="125MBps" lat="50us"/>
+  <cluster id="my_cluster_2" prefix="" suffix="" radical="2" speed="1Gf" bw="125MBps" lat="50us"/>
+  <cluster id="my_cluster_3" prefix="" suffix="" radical="3" speed="1Gf" bw="125MBps" lat="50us"/>
+
+  <link id="link1" bandwidth="1.25GBps" latency="500us"/>
+  <link id="link2" bandwidth="1.25GBps" latency="500us"/>
+  <link id="link3" bandwidth="1.25GBps" latency="500us"/>
+
+  <link id="link_tmp"  bandwidth="1.25GBps" latency="500us"/>
+
+  <ASroute src="my_cluster_1" dst="my_cluster_2" gw_src="my_cluster_1_router" gw_dst="my_cluster_2_router">
+    <link_ctn id="link1"/><link_ctn id="link2"/>
+  </ASroute>
+  <ASroute src="my_cluster_1" dst="my_cluster_3" gw_src="my_cluster_1_router" gw_dst="my_cluster_3_router">
+    <link_ctn id="link1"/><link_ctn id="link3"/>
+  </ASroute>
+  <ASroute src="my_cluster_2" dst="my_cluster_3" gw_src="my_cluster_2_router" gw_dst="my_cluster_3_router">
+    <link_ctn id="link2"/><link_ctn id="link3"/>
+  </ASroute>
+
+  <bypassASroute src="my_cluster_1" dst="my_cluster_2" gw_src="my_cluster_1_router" gw_dst="my_cluster_2_router">
+    <link_ctn id="link_tmp"/>
+  </bypassASroute>
 </AS>
 </platform>
index ce6eca8..ae2a0e8 100644 (file)
@@ -1,58 +1,57 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-       <AS  id="AS_Big"  routing="Dijkstra">
-         <AS id="AS_1" routing="Full">    
-            <host id="AS_1_host1" speed="1Gf"/>        
-            <link id="AS_1_link" bandwidth="1.25GBps" latency="500us"/>  
-            <router id="AS_1_gateway"/>
-            <route src="AS_1_host1" dst="AS_1_gateway">
-                   <link_ctn id="AS_1_link"/>
-            </route>   
-         </AS>
-         <AS id="AS_2" routing="Floyd">    
-            <host id="AS_2_host1" speed="1Gf"/>        
-            <host id="AS_2_host2" speed="1Gf"/>        
-            <host id="AS_2_host3" speed="1Gf"/>        
-           
-            <link id="AS_2_link1" bandwidth="1.25GBps" latency="500us"/>  
-            <link id="AS_2_link2" bandwidth="1.25GBps" latency="500us"/>  
-            <link id="AS_2_link3" bandwidth="1.25GBps" latency="500us"/>  
-            <link id="AS_2_link4" bandwidth="1.25GBps" latency="500us"/>
-            <link id="AS_2_link5" bandwidth="1.25GBps" latency="500us"/>  
-            <link id="AS_2_link6" bandwidth="1.25GBps" latency="500us"/>              
-            <link id="AS_2_link7" bandwidth="1.25GBps" latency="500us"/>
-            
-            <router id="central_router"/>
-            <router id="bypass_router1"/>
-            <router id="bypass_router2"/>
-            <router id="AS_2_gateway"/>
-           
-            <!-- routes providing topological information -->  
-            <route src="central_router" dst="AS_2_host1"><link_ctn id="AS_2_link1"/></route>   
-            <route src="central_router" dst="AS_2_host2"><link_ctn id="AS_2_link2"/></route>   
-            <route src="central_router" dst="AS_2_host3"><link_ctn id="AS_2_link3"/></route>        
-            <route src="central_router" dst="AS_2_gateway"><link_ctn id="AS_2_link4"/></route>
-            
-            <!--  longer route -->
-            <route src="bypass_router1" dst="AS_2_host2"><link_ctn id="AS_2_link5"/></route>
-            <route src="bypass_router1" dst="bypass_router2"><link_ctn id="AS_2_link6"/></route>
-            <route src="bypass_router2" dst="AS_2_host1"><link_ctn id="AS_2_link7"/></route>
-            
-            <!-- bypass route -->
-            <bypassRoute src="AS_2_host1" dst="AS_2_host2">
-                    <link_ctn id="AS_2_link7"/>
-                    <link_ctn id="AS_2_link6"/>
-                    <link_ctn id="AS_2_link5"/>
-            </bypassRoute>     
-         </AS>
-         <link id="backbone" bandwidth="1.25GBps" latency="500us"/>    
-       
-          <ASroute src="AS_1" dst="AS_2" 
-       gw_src="AS_1_gateway" 
-       gw_dst="AS_2_gateway">
-               <link_ctn id="backbone"/>
-          </ASroute>
-          
-       </AS>
+  <AS  id="AS_Big" routing="Dijkstra">
+    <AS id="AS_1" routing="Full">
+       <host id="AS_1_host1" speed="1Gf"/>
+       <link id="AS_1_link" bandwidth="1.25GBps" latency="500us"/>
+       <router id="AS_1_gateway"/>
+       <route src="AS_1_host1" dst="AS_1_gateway">
+         <link_ctn id="AS_1_link"/>
+       </route>
+    </AS>
+
+    <AS id="AS_2" routing="Floyd">
+       <host id="AS_2_host1" speed="1Gf"/>
+       <host id="AS_2_host2" speed="1Gf"/>
+       <host id="AS_2_host3" speed="1Gf"/>
+
+       <link id="AS_2_link1" bandwidth="1.25GBps" latency="500us"/>
+       <link id="AS_2_link2" bandwidth="1.25GBps" latency="500us"/>
+       <link id="AS_2_link3" bandwidth="1.25GBps" latency="500us"/>
+       <link id="AS_2_link4" bandwidth="1.25GBps" latency="500us"/>
+       <link id="AS_2_link5" bandwidth="1.25GBps" latency="500us"/>
+       <link id="AS_2_link6" bandwidth="1.25GBps" latency="500us"/>
+       <link id="AS_2_link7" bandwidth="1.25GBps" latency="500us"/>
+
+       <router id="central_router"/>
+       <router id="bypass_router1"/>
+       <router id="bypass_router2"/>
+       <router id="AS_2_gateway"/>
+
+       <!-- routes providing topological information -->  
+       <route src="central_router" dst="AS_2_host1"><link_ctn id="AS_2_link1"/></route>
+       <route src="central_router" dst="AS_2_host2"><link_ctn id="AS_2_link2"/></route>
+       <route src="central_router" dst="AS_2_host3"><link_ctn id="AS_2_link3"/></route>
+       <route src="central_router" dst="AS_2_gateway"><link_ctn id="AS_2_link4"/></route>
+
+       <!--  longer route -->
+       <route src="bypass_router1" dst="AS_2_host2"><link_ctn id="AS_2_link5"/></route>
+       <route src="bypass_router1" dst="bypass_router2"><link_ctn id="AS_2_link6"/></route>
+       <route src="bypass_router2" dst="AS_2_host1"><link_ctn id="AS_2_link7"/></route>
+
+       <!-- bypass route -->
+       <bypassRoute src="AS_2_host1" dst="AS_2_host2">
+         <link_ctn id="AS_2_link7"/>
+         <link_ctn id="AS_2_link6"/>
+         <link_ctn id="AS_2_link5"/>
+       </bypassRoute>
+    </AS>
+
+    <link id="backbone" bandwidth="1.25GBps" latency="500us"/>
+
+    <ASroute src="AS_1" dst="AS_2" gw_src="AS_1_gateway" gw_dst="AS_2_gateway">
+      <link_ctn id="backbone"/>
+    </ASroute>
+  </AS>
 </platform>
index b869da7..972231a 100644 (file)
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
 <config id="General">
-       <prop id="network/coordinates" value="yes"/>
+<prop id="network/coordinates" value="yes"/>
 </config>
 
 <AS id="AS0" routing="Vivaldi">
-   
-   <AS id="AS1_dc1" routing="Full">
-   <!--small tier-1 datacenter, according to TIA-942 annex G tiers notation, routing : rule based, because of its regularity-->    
-           <!-- 3 clusters, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted because not a part of the production platform  -->
-            <!-- clusters -->
-            <cluster id="AS1_cb1" prefix="cb1-" suffix=".dc1.acloud.com" radical="1-40" speed="5.2297Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-           <link id="link_dc1_cb1" bandwidth="1.25GBps" latency="100us"/>
+  <AS id="AS1_dc1" routing="Full">
+    <!--small tier-1 datacenter, according to TIA-942 annex G tiers notation -->
+    <!-- 3 clusters, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted -->
+    <!-- clusters -->
+    <cluster id="AS1_cb1" prefix="cb1-" suffix=".dc1.acloud.com" radical="1-40" speed="5.2297Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="AS1_cb2" prefix="cb2-" suffix=".dc1.acloud.com" radical="1-50" speed="8.8925Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="AS1_cb3" prefix="cb3-" suffix=".dc1.acloud.com" radical="1-30" speed="13.357Gf"
+           bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
 
-           <cluster id="AS1_cb2" prefix="cb2-" suffix=".dc1.acloud.com" radical="1-50" speed="8.8925Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-           <link id="link_dc1_cb2" bandwidth="1.25GBps" latency="100us"/>
+    <link id="link_dc1_cb1" bandwidth="1.25GBps" latency="100us"/>
+    <link id="link_dc1_cb2" bandwidth="1.25GBps" latency="100us"/>
+    <link id="link_dc1_cb3" bandwidth="1.25GBps" latency="100us"/>
 
-            <cluster id="AS1_cb3" prefix="cb3-" suffix=".dc1.acloud.com" radical="1-30" speed="13.357Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-           <link id="link_dc1_cb3" bandwidth="1.25GBps" latency="100us"/>
-            <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
-            <AS id="gw_AS1_dc1" routing="Floyd">
-                <!-- equipments-->
-                    <router id="gw_dc1_horizdist"/>
-                    <router id="gw_dc1_maindist"/>
-                    <router id="gw_dc1_entranceroom"/>
-                    <!-- ISP end point, entering the cloud, so it has coordinates -->
-                    <router id="router_AS1_dc1" coordinates="25.5 9.4 1.4"/>
-                    <!-- links -->
-                    <link id="dc1_horizdist_maindist" bandwidth="1.25GBps" latency="100us"/>        
-                    <link id="dc1_maindist_entranceroom" bandwidth="1.25GBps" latency="100us"/>  
-                        <link id="dc1_entranceroom_ISP" bandwidth="1.25GBps" latency="100us"/>  
-                    <!-- links to router relationships -->
-                    <route src="gw_dc1_horizdist" dst="gw_dc1_maindist"><link_ctn id="dc1_horizdist_maindist"/></route>
-                    <route src="gw_dc1_maindist" dst="gw_dc1_entranceroom"><link_ctn id="dc1_maindist_entranceroom"/></route>
-                    <route src="gw_dc1_entranceroom" dst="router_AS1_dc1"><link_ctn id="dc1_entranceroom_ISP"/></route>
-            </AS>
-           
-            <!-- internal routes between clusters -->
-            <ASroute src="AS1_cb1" dst="AS1_cb1" gw_src="cb1-AS1_cb1_router.dc1.acloud.com" gw_dst="cb1-AS1_cb1_router.dc1.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc1_cb1"/>
-                    <link_ctn id="link_dc1_cb1"/>
-            </ASroute><ASroute src="AS1_cb3" dst="AS1_cb1" gw_src="cb3-AS1_cb3_router.dc1.acloud.com" gw_dst="cb1-AS1_cb1_router.dc1.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc1_cb3"/>
-                    <link_ctn id="link_dc1_cb1"/>
-            </ASroute><ASroute src="AS1_cb3" dst="AS1_cb3" gw_src="cb3-AS1_cb3_router.dc1.acloud.com" gw_dst="cb3-AS1_cb3_router.dc1.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc1_cb3"/>
-                    <link_ctn id="link_dc1_cb3"/>
-            </ASroute><ASroute src="AS1_cb2" dst="AS1_cb1" gw_src="cb2-AS1_cb2_router.dc1.acloud.com" gw_dst="cb1-AS1_cb1_router.dc1.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc1_cb2"/>
-                    <link_ctn id="link_dc1_cb1"/>
-            </ASroute><ASroute src="AS1_cb2" dst="AS1_cb3" gw_src="cb2-AS1_cb2_router.dc1.acloud.com" gw_dst="cb3-AS1_cb3_router.dc1.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc1_cb2"/>
-                    <link_ctn id="link_dc1_cb3"/>
-            </ASroute><ASroute src="AS1_cb2" dst="AS1_cb2" gw_src="cb2-AS1_cb2_router.dc1.acloud.com" gw_dst="cb2-AS1_cb2_router.dc1.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc1_cb2"/>
-                    <link_ctn id="link_dc1_cb2"/>
-            </ASroute>
-            <!-- clusters to exit AS -->
-            <ASroute src="AS1_cb1" dst="gw_AS1_dc1" gw_src="cb1-AS1_cb1_router.dc1.acloud.com" gw_dst="gw_dc1_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc1_cb1"/>
-            </ASroute><ASroute src="AS1_cb3" dst="gw_AS1_dc1" gw_src="cb3-AS1_cb3_router.dc1.acloud.com" gw_dst="gw_dc1_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc1_cb3"/>
-            </ASroute><ASroute src="AS1_cb2" dst="gw_AS1_dc1" gw_src="cb2-AS1_cb2_router.dc1.acloud.com" gw_dst="gw_dc1_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc1_cb2"/>
-            </ASroute> 
-            <ASroute dst="AS1_cb1" src="gw_AS1_dc1" gw_dst="cb1-AS1_cb1_router.dc1.acloud.com" gw_src="gw_dc1_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc1_cb1"/>
-            </ASroute><ASroute dst="AS1_cb3" src="gw_AS1_dc1" gw_dst="cb3-AS1_cb3_router.dc1.acloud.com" gw_src="gw_dc1_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc1_cb3"/>
-            </ASroute><ASroute dst="AS1_cb2" src="gw_AS1_dc1" gw_dst="cb2-AS1_cb2_router.dc1.acloud.com" gw_src="gw_dc1_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc1_cb2"/>
-            </ASroute>    
-   </AS>
+    <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
+    <AS id="gw_AS1_dc1" routing="Floyd">
+      <!-- equipments-->
+      <router id="gw_dc1_horizdist"/>
+      <router id="gw_dc1_maindist"/>
+      <router id="gw_dc1_entranceroom"/>
+      <!-- ISP end point, entering the cloud, so it has coordinates -->
+      <router id="router_AS1_dc1" coordinates="25.5 9.4 1.4"/>
+
+      <link id="dc1_horizdist_maindist" bandwidth="1.25GBps" latency="100us"/>
+      <link id="dc1_maindist_entranceroom" bandwidth="1.25GBps" latency="100us"/>
+      <link id="dc1_entranceroom_ISP" bandwidth="1.25GBps" latency="100us"/>
+
+      <route src="gw_dc1_horizdist" dst="gw_dc1_maindist"><link_ctn id="dc1_horizdist_maindist"/></route>
+      <route src="gw_dc1_maindist" dst="gw_dc1_entranceroom"><link_ctn id="dc1_maindist_entranceroom"/></route>
+      <route src="gw_dc1_entranceroom" dst="router_AS1_dc1"><link_ctn id="dc1_entranceroom_ISP"/></route>
+    </AS>
 
-   <AS id="AS2_dc2" routing="Full">
-   <!--bigger tier-1 datacenter, according to TIA-942 annex G tiers notation, routing : rule based, because of its regularity-->   
-            <!-- 6 clusters, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted because not a part of the production platform  -->
-            <!-- clusters -->
-            <cluster id="AS2_cb1" prefix="cb1-" suffix=".dc2.acloud.com" radical="1-40" speed="5.2297Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc2_cb1" bandwidth="1.25GBps" latency="100us"/>
+    <!-- internal routes between clusters -->
+    <ASroute src="AS1_cb1" dst="AS1_cb1" gw_src="cb1-AS1_cb1_router.dc1.acloud.com"
+             gw_dst="cb1-AS1_cb1_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb1"/><link_ctn id="link_dc1_cb1"/>
+    </ASroute>
+    <ASroute src="AS1_cb3" dst="AS1_cb1" gw_src="cb3-AS1_cb3_router.dc1.acloud.com"
+             gw_dst="cb1-AS1_cb1_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb3"/><link_ctn id="link_dc1_cb1"/>
+    </ASroute>
+    <ASroute src="AS1_cb3" dst="AS1_cb3" gw_src="cb3-AS1_cb3_router.dc1.acloud.com"
+             gw_dst="cb3-AS1_cb3_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb3"/><link_ctn id="link_dc1_cb3"/>
+    </ASroute>
+    <ASroute src="AS1_cb2" dst="AS1_cb1" gw_src="cb2-AS1_cb2_router.dc1.acloud.com"
+             gw_dst="cb1-AS1_cb1_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb2"/><link_ctn id="link_dc1_cb1"/>
+    </ASroute>
+    <ASroute src="AS1_cb2" dst="AS1_cb3" gw_src="cb2-AS1_cb2_router.dc1.acloud.com"
+             gw_dst="cb3-AS1_cb3_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb2"/><link_ctn id="link_dc1_cb3"/>
+    </ASroute>
+    <ASroute src="AS1_cb2" dst="AS1_cb2" gw_src="cb2-AS1_cb2_router.dc1.acloud.com"
+             gw_dst="cb2-AS1_cb2_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb2"/><link_ctn id="link_dc1_cb2"/>
+    </ASroute>
+    <!-- routes to exit AS -->
+    <ASroute src="AS1_cb1" dst="gw_AS1_dc1" gw_src="cb1-AS1_cb1_router.dc1.acloud.com"
+             gw_dst="gw_dc1_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc1_cb1"/>
+    </ASroute>
+    <ASroute src="AS1_cb3" dst="gw_AS1_dc1" gw_src="cb3-AS1_cb3_router.dc1.acloud.com"
+             gw_dst="gw_dc1_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc1_cb3"/>
+    </ASroute>
+    <ASroute src="AS1_cb2" dst="gw_AS1_dc1" gw_src="cb2-AS1_cb2_router.dc1.acloud.com"
+             gw_dst="gw_dc1_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc1_cb2"/>
+    </ASroute> 
+    <ASroute dst="AS1_cb1" src="gw_AS1_dc1" gw_dst="cb1-AS1_cb1_router.dc1.acloud.com"
+             gw_src="gw_dc1_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc1_cb1"/>
+    </ASroute>
+    <ASroute dst="AS1_cb3" src="gw_AS1_dc1" gw_dst="cb3-AS1_cb3_router.dc1.acloud.com"
+             gw_src="gw_dc1_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc1_cb3"/>
+    </ASroute>
+    <ASroute dst="AS1_cb2" src="gw_AS1_dc1" gw_dst="cb2-AS1_cb2_router.dc1.acloud.com"
+             gw_src="gw_dc1_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc1_cb2"/>
+    </ASroute>
+  </AS>
 
-            <cluster id="AS2_cb2" prefix="cb2-" suffix=".dc2.acloud.com" radical="1-50" speed="8.8925Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc2_cb2" bandwidth="1.25GBps" latency="100us"/>
+  <AS id="AS2_dc2" routing="Full">
+    <!--bigger tier-1 datacenter, according to TIA-942 annex G tiers notation, routing : Full -->
+    <!-- 6 clusters, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted -->
+    <!-- clusters -->
+    <cluster id="AS2_cb1" prefix="cb1-" suffix=".dc2.acloud.com" radical="1-40" speed="5.2297Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="AS2_cb2" prefix="cb2-" suffix=".dc2.acloud.com" radical="1-50" speed="8.8925Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="AS2_cb3" prefix="cb3-" suffix=".dc2.acloud.com" radical="1-30" speed="13.357Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="AS2_cb4" prefix="cb4-" suffix=".dc2.acloud.com" radical="1-40" speed="5.2297Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="AS2_cb5" prefix="cb5-" suffix=".dc2.acloud.com" radical="1-50" speed="8.8925Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="AS2_cb6" prefix="cb6-" suffix=".dc2.acloud.com" radical="1-30" speed="13.357Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
 
-            <cluster id="AS2_cb3" prefix="cb3-" suffix=".dc2.acloud.com" radical="1-30" speed="13.357Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc2_cb3" bandwidth="1.25GBps" latency="100us"/>
+    <link id="link_dc2_cb1" bandwidth="1.25GBps" latency="100us"/>
+    <link id="link_dc2_cb2" bandwidth="1.25GBps" latency="100us"/>
+    <link id="link_dc2_cb3" bandwidth="1.25GBps" latency="100us"/>
+    <link id="link_dc2_cb4" bandwidth="1.25GBps" latency="100us"/>
+    <link id="link_dc2_cb5" bandwidth="1.25GBps" latency="100us"/>
+    <link id="link_dc2_cb6" bandwidth="1.25GBps" latency="100us"/>
 
-            <cluster id="AS2_cb4" prefix="cb4-" suffix=".dc2.acloud.com" radical="1-40" speed="5.2297Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc2_cb4" bandwidth="1.25GBps" latency="100us"/>
+    <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
+    <AS id="gw_AS2_dc2" routing="Floyd">
+      <!-- equipments-->
+      <router id="gw_dc2_horizdist"/>
+      <router id="gw_dc2_maindist"/>
+      <router id="gw_dc2_entranceroom"/>
+      <!-- ISP end point, entering the cloud, so it has coordinates -->
+      <router id="router_AS2_dc2" coordinates="12.8 14.4 6.4"/>
 
-            <cluster id="AS2_cb5" prefix="cb5-" suffix=".dc2.acloud.com" radical="1-50" speed="8.8925Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc2_cb5" bandwidth="1.25GBps" latency="100us"/>
+      <!-- links -->
+      <link id="dc2_horizdist_maindist" bandwidth="1.25GBps" latency="100us"/>
+      <link id="dc2_maindist_entranceroom" bandwidth="1.25GBps" latency="100us"/>
+      <link id="dc2_entranceroom_ISP" bandwidth="1.25GBps" latency="100us"/>
+      <!-- links to router relationships -->
+      <route src="gw_dc2_horizdist" dst="gw_dc2_maindist"><link_ctn id="dc2_horizdist_maindist"/></route>
+      <route src="gw_dc2_maindist" dst="gw_dc2_entranceroom"><link_ctn id="dc2_maindist_entranceroom"/></route>
+      <route src="gw_dc2_entranceroom" dst="router_AS2_dc2"><link_ctn id="dc2_entranceroom_ISP"/></route>
+    </AS>
 
-            <cluster id="AS2_cb6" prefix="cb6-" suffix=".dc2.acloud.com" radical="1-30" speed="13.357Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc2_cb6" bandwidth="1.25GBps" latency="100us"/>
+    <!-- internal routes between clusters -->
+    <ASroute src="AS2_cb6" dst="AS2_cb6" gw_src="cb6-AS2_cb6_router.dc2.acloud.com"
+             gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc2_cb6"/><link_ctn id="link_dc2_cb6"/>
+    </ASroute>
+    <ASroute src="AS2_cb4" dst="AS2_cb6" gw_src="cb4-AS2_cb4_router.dc2.acloud.com"
+             gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb4"/><link_ctn id="link_dc2_cb6"/>
+    </ASroute>
+    <ASroute src="AS2_cb4" dst="AS2_cb4" gw_src="cb4-AS2_cb4_router.dc2.acloud.com"
+             gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb4"/><link_ctn id="link_dc2_cb4"/>
+    </ASroute>
+    <ASroute src="AS2_cb5" dst="AS2_cb6" gw_src="cb5-AS2_cb5_router.dc2.acloud.com"
+             gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb5"/><link_ctn id="link_dc2_cb6"/>
+    </ASroute>
+    <ASroute src="AS2_cb5" dst="AS2_cb4" gw_src="cb5-AS2_cb5_router.dc2.acloud.com"
+             gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb5"/><link_ctn id="link_dc2_cb4"/>
+    </ASroute>
+    <ASroute src="AS2_cb5" dst="AS2_cb5" gw_src="cb5-AS2_cb5_router.dc2.acloud.com"
+             gw_dst="cb5-AS2_cb5_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb5"/><link_ctn id="link_dc2_cb5"/>
+    </ASroute>
+    <ASroute src="AS2_cb2" dst="AS2_cb6" gw_src="cb2-AS2_cb2_router.dc2.acloud.com"
+             gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb2"/> <link_ctn id="link_dc2_cb6"/>
+    </ASroute>
+    <ASroute src="AS2_cb2" dst="AS2_cb4" gw_src="cb2-AS2_cb2_router.dc2.acloud.com"
+             gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb2"/><link_ctn id="link_dc2_cb4"/>
+    </ASroute>
+    <ASroute src="AS2_cb2" dst="AS2_cb5" gw_src="cb2-AS2_cb2_router.dc2.acloud.com"
+             gw_dst="cb5-AS2_cb5_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb2"/><link_ctn id="link_dc2_cb5"/>
+    </ASroute>
+    <ASroute src="AS2_cb2" dst="AS2_cb2" gw_src="cb2-AS2_cb2_router.dc2.acloud.com"
+             gw_dst="cb2-AS2_cb2_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb2"/><link_ctn id="link_dc2_cb2"/>
+    </ASroute>
+    <ASroute src="AS2_cb3" dst="AS2_cb6" gw_src="cb3-AS2_cb3_router.dc2.acloud.com"
+             gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb3"/><link_ctn id="link_dc2_cb6"/>
+    </ASroute>
+    <ASroute src="AS2_cb3" dst="AS2_cb4" gw_src="cb3-AS2_cb3_router.dc2.acloud.com" 
+             gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb3"/><link_ctn id="link_dc2_cb4"/>
+    </ASroute>
+    <ASroute src="AS2_cb3" dst="AS2_cb5" gw_src="cb3-AS2_cb3_router.dc2.acloud.com"
+             gw_dst="cb5-AS2_cb5_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb3"/><link_ctn id="link_dc2_cb5"/>
+    </ASroute>
+    <ASroute src="AS2_cb3" dst="AS2_cb2" gw_src="cb3-AS2_cb3_router.dc2.acloud.com"
+             gw_dst="cb2-AS2_cb2_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb3"/><link_ctn id="link_dc2_cb2"/>
+    </ASroute>
+    <ASroute src="AS2_cb3" dst="AS2_cb3" gw_src="cb3-AS2_cb3_router.dc2.acloud.com"
+             gw_dst="cb3-AS2_cb3_router.dc2.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc2_cb3"/><link_ctn id="link_dc2_cb3"/>
+    </ASroute>
+    <ASroute src="AS2_cb1" dst="AS2_cb6" gw_src="cb1-AS2_cb1_router.dc2.acloud.com"
+             gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc2_cb1"/><link_ctn id="link_dc2_cb6"/>
+    </ASroute>
+    <ASroute src="AS2_cb1" dst="AS2_cb4" gw_src="cb1-AS2_cb1_router.dc2.acloud.com"
+             gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc2_cb1"/><link_ctn id="link_dc2_cb4"/>
+    </ASroute>
+    <ASroute src="AS2_cb1" dst="AS2_cb5" gw_src="cb1-AS2_cb1_router.dc2.acloud.com"
+             gw_dst="cb5-AS2_cb5_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb1"/><link_ctn id="link_dc2_cb5"/>
+    </ASroute>
+    <ASroute src="AS2_cb1" dst="AS2_cb2" gw_src="cb1-AS2_cb1_router.dc2.acloud.com"
+             gw_dst="cb2-AS2_cb2_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb1"/><link_ctn id="link_dc2_cb2"/>
+    </ASroute>
+    <ASroute src="AS2_cb1" dst="AS2_cb3" gw_src="cb1-AS2_cb1_router.dc2.acloud.com"
+             gw_dst="cb3-AS2_cb3_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb1"/><link_ctn id="link_dc2_cb3"/>
+    </ASroute>
+    <ASroute src="AS2_cb1" dst="AS2_cb1" gw_src="cb1-AS2_cb1_router.dc2.acloud.com"
+             gw_dst="cb1-AS2_cb1_router.dc2.acloud.com" symmetrical="YES">
+       <link_ctn id="link_dc2_cb1"/><link_ctn id="link_dc2_cb1"/>
+    </ASroute>
 
-            <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
-            <AS id="gw_AS2_dc2" routing="Floyd">
-                <!-- equipments-->
-                    <router id="gw_dc2_horizdist"/>
-                    <router id="gw_dc2_maindist"/>
-                    <router id="gw_dc2_entranceroom"/>
-                    <!-- ISP end point, entering the cloud, so it has coordinates -->
-                    <router id="router_AS2_dc2" coordinates="12.8 14.4 6.4"/>
-                    <!-- links -->
-                    <link id="dc2_horizdist_maindist" bandwidth="1.25GBps" latency="100us"/>        
-                    <link id="dc2_maindist_entranceroom" bandwidth="1.25GBps" latency="100us"/>  
-                        <link id="dc2_entranceroom_ISP" bandwidth="1.25GBps" latency="100us"/>  
-                    <!-- links to router relationships -->
-                    <route src="gw_dc2_horizdist" dst="gw_dc2_maindist"><link_ctn id="dc2_horizdist_maindist"/></route>
-                    <route src="gw_dc2_maindist" dst="gw_dc2_entranceroom"><link_ctn id="dc2_maindist_entranceroom"/></route>
-                    <route src="gw_dc2_entranceroom" dst="router_AS2_dc2"><link_ctn id="dc2_entranceroom_ISP"/></route>
-            </AS>
-            
-            <!-- internal routes between clusters -->
-            <ASroute src="AS2_cb6" dst="AS2_cb6" gw_src="cb6-AS2_cb6_router.dc2.acloud.com" gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb6"/>
-                    <link_ctn id="link_dc2_cb6"/>
-            </ASroute><ASroute src="AS2_cb4" dst="AS2_cb6" gw_src="cb4-AS2_cb4_router.dc2.acloud.com" gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb4"/>
-                    <link_ctn id="link_dc2_cb6"/>
-            </ASroute><ASroute src="AS2_cb4" dst="AS2_cb4" gw_src="cb4-AS2_cb4_router.dc2.acloud.com" gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb4"/>
-                    <link_ctn id="link_dc2_cb4"/>
-            </ASroute><ASroute src="AS2_cb5" dst="AS2_cb6" gw_src="cb5-AS2_cb5_router.dc2.acloud.com" gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb5"/>
-                    <link_ctn id="link_dc2_cb6"/>
-            </ASroute><ASroute src="AS2_cb5" dst="AS2_cb4" gw_src="cb5-AS2_cb5_router.dc2.acloud.com" gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb5"/>
-                    <link_ctn id="link_dc2_cb4"/>
-            </ASroute><ASroute src="AS2_cb5" dst="AS2_cb5" gw_src="cb5-AS2_cb5_router.dc2.acloud.com" gw_dst="cb5-AS2_cb5_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb5"/>
-                    <link_ctn id="link_dc2_cb5"/>
-            </ASroute><ASroute src="AS2_cb2" dst="AS2_cb6" gw_src="cb2-AS2_cb2_router.dc2.acloud.com" gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb2"/>
-                    <link_ctn id="link_dc2_cb6"/>
-            </ASroute><ASroute src="AS2_cb2" dst="AS2_cb4" gw_src="cb2-AS2_cb2_router.dc2.acloud.com" gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb2"/>
-                    <link_ctn id="link_dc2_cb4"/>
-            </ASroute><ASroute src="AS2_cb2" dst="AS2_cb5" gw_src="cb2-AS2_cb2_router.dc2.acloud.com" gw_dst="cb5-AS2_cb5_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb2"/>
-                    <link_ctn id="link_dc2_cb5"/>
-            </ASroute><ASroute src="AS2_cb2" dst="AS2_cb2" gw_src="cb2-AS2_cb2_router.dc2.acloud.com" gw_dst="cb2-AS2_cb2_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb2"/>
-                    <link_ctn id="link_dc2_cb2"/>
-            </ASroute><ASroute src="AS2_cb3" dst="AS2_cb6" gw_src="cb3-AS2_cb3_router.dc2.acloud.com" gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb3"/>
-                    <link_ctn id="link_dc2_cb6"/>
-            </ASroute><ASroute src="AS2_cb3" dst="AS2_cb4" gw_src="cb3-AS2_cb3_router.dc2.acloud.com" gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb3"/>
-                    <link_ctn id="link_dc2_cb4"/>
-            </ASroute><ASroute src="AS2_cb3" dst="AS2_cb5" gw_src="cb3-AS2_cb3_router.dc2.acloud.com" gw_dst="cb5-AS2_cb5_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb3"/>
-                    <link_ctn id="link_dc2_cb5"/>
-            </ASroute><ASroute src="AS2_cb3" dst="AS2_cb2" gw_src="cb3-AS2_cb3_router.dc2.acloud.com" gw_dst="cb2-AS2_cb2_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb3"/>
-                    <link_ctn id="link_dc2_cb2"/>
-            </ASroute><ASroute src="AS2_cb3" dst="AS2_cb3" gw_src="cb3-AS2_cb3_router.dc2.acloud.com" gw_dst="cb3-AS2_cb3_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb3"/>
-                    <link_ctn id="link_dc2_cb3"/>
-            </ASroute><ASroute src="AS2_cb1" dst="AS2_cb6" gw_src="cb1-AS2_cb1_router.dc2.acloud.com" gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb1"/>
-                    <link_ctn id="link_dc2_cb6"/>
-            </ASroute><ASroute src="AS2_cb1" dst="AS2_cb4" gw_src="cb1-AS2_cb1_router.dc2.acloud.com" gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb1"/>
-                    <link_ctn id="link_dc2_cb4"/>
-            </ASroute><ASroute src="AS2_cb1" dst="AS2_cb5" gw_src="cb1-AS2_cb1_router.dc2.acloud.com" gw_dst="cb5-AS2_cb5_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb1"/>
-                    <link_ctn id="link_dc2_cb5"/>
-            </ASroute><ASroute src="AS2_cb1" dst="AS2_cb2" gw_src="cb1-AS2_cb1_router.dc2.acloud.com" gw_dst="cb2-AS2_cb2_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb1"/>
-                    <link_ctn id="link_dc2_cb2"/>
-            </ASroute><ASroute src="AS2_cb1" dst="AS2_cb3" gw_src="cb1-AS2_cb1_router.dc2.acloud.com" gw_dst="cb3-AS2_cb3_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb1"/>
-                    <link_ctn id="link_dc2_cb3"/>
-            </ASroute><ASroute src="AS2_cb1" dst="AS2_cb1" gw_src="cb1-AS2_cb1_router.dc2.acloud.com" gw_dst="cb1-AS2_cb1_router.dc2.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc2_cb1"/>
-                    <link_ctn id="link_dc2_cb1"/>
-            </ASroute>
-            <!-- clusters to exit AS -->
-            <ASroute src="AS2_cb6" dst="gw_AS2_dc2" gw_src="cb6-AS2_cb6_router.dc2.acloud.com" gw_dst="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb6"/>
-            </ASroute><ASroute src="AS2_cb4" dst="gw_AS2_dc2" gw_src="cb4-AS2_cb4_router.dc2.acloud.com" gw_dst="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb4"/>
-            </ASroute><ASroute src="AS2_cb5" dst="gw_AS2_dc2" gw_src="cb5-AS2_cb5_router.dc2.acloud.com" gw_dst="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb5"/>
-            </ASroute><ASroute src="AS2_cb2" dst="gw_AS2_dc2" gw_src="cb2-AS2_cb2_router.dc2.acloud.com" gw_dst="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb2"/>
-            </ASroute><ASroute src="AS2_cb3" dst="gw_AS2_dc2" gw_src="cb3-AS2_cb3_router.dc2.acloud.com" gw_dst="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb3"/>
-            </ASroute><ASroute src="AS2_cb1" dst="gw_AS2_dc2" gw_src="cb1-AS2_cb1_router.dc2.acloud.com" gw_dst="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb1"/>
-            </ASroute> 
-            <ASroute dst="AS2_cb6" src="gw_AS2_dc2" gw_dst="cb6-AS2_cb6_router.dc2.acloud.com" gw_src="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb6"/>
-            </ASroute><ASroute dst="AS2_cb4" src="gw_AS2_dc2" gw_dst="cb4-AS2_cb4_router.dc2.acloud.com" gw_src="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb4"/>
-            </ASroute><ASroute dst="AS2_cb5" src="gw_AS2_dc2" gw_dst="cb5-AS2_cb5_router.dc2.acloud.com" gw_src="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb5"/>
-            </ASroute><ASroute dst="AS2_cb2" src="gw_AS2_dc2" gw_dst="cb2-AS2_cb2_router.dc2.acloud.com" gw_src="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb2"/>
-            </ASroute><ASroute dst="AS2_cb3" src="gw_AS2_dc2" gw_dst="cb3-AS2_cb3_router.dc2.acloud.com" gw_src="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb3"/>
-            </ASroute><ASroute dst="AS2_cb1" src="gw_AS2_dc2" gw_dst="cb1-AS2_cb1_router.dc2.acloud.com" gw_src="gw_dc2_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc2_cb1"/>
-            </ASroute> 
+    <!-- routess to exit AS -->
+    <ASroute src="AS2_cb6" dst="gw_AS2_dc2" gw_src="cb6-AS2_cb6_router.dc2.acloud.com"
+             gw_dst="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb6"/>
+    </ASroute>
+    <ASroute src="AS2_cb4" dst="gw_AS2_dc2" gw_src="cb4-AS2_cb4_router.dc2.acloud.com"
+             gw_dst="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb4"/>
+    </ASroute>
+    <ASroute src="AS2_cb5" dst="gw_AS2_dc2" gw_src="cb5-AS2_cb5_router.dc2.acloud.com"
+             gw_dst="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb5"/>
+    </ASroute>
+    <ASroute src="AS2_cb2" dst="gw_AS2_dc2" gw_src="cb2-AS2_cb2_router.dc2.acloud.com"
+             gw_dst="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb2"/>
+    </ASroute>
+    <ASroute src="AS2_cb3" dst="gw_AS2_dc2" gw_src="cb3-AS2_cb3_router.dc2.acloud.com"
+             gw_dst="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb3"/>
+    </ASroute>
+    <ASroute src="AS2_cb1" dst="gw_AS2_dc2" gw_src="cb1-AS2_cb1_router.dc2.acloud.com"
+             gw_dst="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb1"/>
+    </ASroute> 
+    <ASroute dst="AS2_cb6" src="gw_AS2_dc2" gw_dst="cb6-AS2_cb6_router.dc2.acloud.com"
+             gw_src="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb6"/>
+    </ASroute>
+    <ASroute dst="AS2_cb4" src="gw_AS2_dc2" gw_dst="cb4-AS2_cb4_router.dc2.acloud.com"
+             gw_src="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb4"/>
+    </ASroute>
+    <ASroute dst="AS2_cb5" src="gw_AS2_dc2" gw_dst="cb5-AS2_cb5_router.dc2.acloud.com"
+             gw_src="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb5"/>
+    </ASroute>
+    <ASroute dst="AS2_cb2" src="gw_AS2_dc2" gw_dst="cb2-AS2_cb2_router.dc2.acloud.com"
+             gw_src="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb2"/>
+    </ASroute>
+    <ASroute dst="AS2_cb3" src="gw_AS2_dc2" gw_dst="cb3-AS2_cb3_router.dc2.acloud.com"
+             gw_src="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb3"/>
+    </ASroute>
+    <ASroute dst="AS2_cb1" src="gw_AS2_dc2" gw_dst="cb1-AS2_cb1_router.dc2.acloud.com"
+             gw_src="gw_dc2_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc2_cb1"/>
+    </ASroute> 
    </AS>
 
    <AS id="AS3_dc3" routing="Full">  
-   <!--small tier-1 datacenter, according to TIA-942 annex G tiers notation, routing : rule based, because of its regularity-->    
-            <!-- 4 clusters, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted because not a part of the production platform  -->
-            <!-- clusters -->
-            <cluster id="AS3_cb1" prefix="cb1-" suffix=".dc3.acloud.com" radical="1-40" speed="5.2297Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc3_cb1" bandwidth="1.25GBps" latency="100us"/>
+     <!--small tier-1 datacenter, according to TIA-942 annex G tiers notation, routing : FULL -->    
+     <!-- 4 clusters, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted -->
+     <!-- clusters -->
+     <cluster id="AS3_cb1" prefix="cb1-" suffix=".dc3.acloud.com" radical="1-40" speed="5.2297Gf"
+              bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+     <cluster id="AS3_cb2" prefix="cb2-" suffix=".dc3.acloud.com" radical="1-50" speed="8.8925Gf"
+              bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+     <cluster id="AS3_cb3" prefix="cb3-" suffix=".dc3.acloud.com" radical="1-30" speed="13.357Gf"
+              bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+     <cluster id="AS3_cb4" prefix="cb4-" suffix=".dc3.acloud.com" radical="1-30" speed="13.357Gf"
+              bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
 
-            <cluster id="AS3_cb2" prefix="cb2-" suffix=".dc3.acloud.com" radical="1-50" speed="8.8925Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc3_cb2" bandwidth="1.25GBps" latency="100us"/>
+     <link id="link_dc3_cb1" bandwidth="1.25GBps" latency="100us"/>
+     <link id="link_dc3_cb2" bandwidth="1.25GBps" latency="100us"/>
+     <link id="link_dc3_cb3" bandwidth="1.25GBps" latency="100us"/>
+     <link id="link_dc3_cb4" bandwidth="1.25GBps" latency="100us"/>
 
-            <cluster id="AS3_cb3" prefix="cb3-" suffix=".dc3.acloud.com" radical="1-30" speed="13.357Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc3_cb3" bandwidth="1.25GBps" latency="100us"/>
+     <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
+     <AS id="gw_AS3_dc3" routing="Floyd">
+        <!-- equipments-->
+        <router id="gw_dc3_horizdist"/>
+        <router id="gw_dc3_maindist"/>
+        <router id="gw_dc3_entranceroom"/>
+        <!-- ISP end point, entering the cloud, so it has coordinates -->
+        <router id="router_AS3_dc3" coordinates="6.0 5.7 6.6"/>
 
-            <cluster id="AS3_cb4" prefix="cb4-" suffix=".dc3.acloud.com" radical="1-30" speed="13.357Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
-            <link id="link_dc3_cb4" bandwidth="1.25GBps" latency="100us"/>
+        <!-- links -->
+        <link id="dc3_horizdist_maindist" bandwidth="1.25GBps" latency="100us"/>        
+        <link id="dc3_maindist_entranceroom" bandwidth="1.25GBps" latency="100us"/>  
+        <link id="dc3_entranceroom_ISP" bandwidth="1.25GBps" latency="100us"/>  
+        <!-- links to router relationships -->
+        <route src="gw_dc3_horizdist" dst="gw_dc3_maindist"><link_ctn id="dc3_horizdist_maindist"/></route>
+        <route src="gw_dc3_maindist" dst="gw_dc3_entranceroom"><link_ctn id="dc3_maindist_entranceroom"/></route>
+        <route src="gw_dc3_entranceroom" dst="router_AS3_dc3"><link_ctn id="dc3_entranceroom_ISP"/></route>
+     </AS>
 
-            <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
-            <AS id="gw_AS3_dc3" routing="Floyd">
-                <!-- equipments-->
-                    <router id="gw_dc3_horizdist"/>
-                    <router id="gw_dc3_maindist"/>
-                    <router id="gw_dc3_entranceroom"/>
-                    <!-- ISP end point, entering the cloud, so it has coordinates -->
-                    <router id="router_AS3_dc3" coordinates="6.0 5.7 6.6"/>
-                    <!-- links -->
-                    <link id="dc3_horizdist_maindist" bandwidth="1.25GBps" latency="100us"/>        
-                    <link id="dc3_maindist_entranceroom" bandwidth="1.25GBps" latency="100us"/>  
-                        <link id="dc3_entranceroom_ISP" bandwidth="1.25GBps" latency="100us"/>  
-                    <!-- links to router relationships -->
-                    <route src="gw_dc3_horizdist" dst="gw_dc3_maindist"><link_ctn id="dc3_horizdist_maindist"/></route>
-                    <route src="gw_dc3_maindist" dst="gw_dc3_entranceroom"><link_ctn id="dc3_maindist_entranceroom"/></route>
-                    <route src="gw_dc3_entranceroom" dst="router_AS3_dc3"><link_ctn id="dc3_entranceroom_ISP"/></route>
-            </AS>
-            
-            <!-- internal routes between clusters -->
-            <ASroute src="AS3_cb3" dst="AS3_cb3" gw_src="cb3-AS3_cb3_router.dc3.acloud.com" gw_dst="cb3-AS3_cb3_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb3"/>
-                    <link_ctn id="link_dc3_cb3"/>
-            </ASroute><ASroute src="AS3_cb2" dst="AS3_cb3" gw_src="cb2-AS3_cb2_router.dc3.acloud.com" gw_dst="cb3-AS3_cb3_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb2"/>
-                    <link_ctn id="link_dc3_cb3"/>
-            </ASroute><ASroute src="AS3_cb2" dst="AS3_cb2" gw_src="cb2-AS3_cb2_router.dc3.acloud.com" gw_dst="cb2-AS3_cb2_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb2"/>
-                    <link_ctn id="link_dc3_cb2"/>
-            </ASroute><ASroute src="AS3_cb1" dst="AS3_cb3" gw_src="cb1-AS3_cb1_router.dc3.acloud.com" gw_dst="cb3-AS3_cb3_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb1"/>
-                    <link_ctn id="link_dc3_cb3"/>
-            </ASroute><ASroute src="AS3_cb1" dst="AS3_cb2" gw_src="cb1-AS3_cb1_router.dc3.acloud.com" gw_dst="cb2-AS3_cb2_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb1"/>
-                    <link_ctn id="link_dc3_cb2"/>
-            </ASroute><ASroute src="AS3_cb1" dst="AS3_cb1" gw_src="cb1-AS3_cb1_router.dc3.acloud.com" gw_dst="cb1-AS3_cb1_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb1"/>
-                    <link_ctn id="link_dc3_cb1"/>
-            </ASroute><ASroute src="AS3_cb4" dst="AS3_cb3" gw_src="cb4-AS3_cb4_router.dc3.acloud.com" gw_dst="cb3-AS3_cb3_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb4"/>
-                    <link_ctn id="link_dc3_cb3"/>
-            </ASroute><ASroute src="AS3_cb4" dst="AS3_cb2" gw_src="cb4-AS3_cb4_router.dc3.acloud.com" gw_dst="cb2-AS3_cb2_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb4"/>
-                    <link_ctn id="link_dc3_cb2"/>
-            </ASroute><ASroute src="AS3_cb4" dst="AS3_cb1" gw_src="cb4-AS3_cb4_router.dc3.acloud.com" gw_dst="cb1-AS3_cb1_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb4"/>
-                    <link_ctn id="link_dc3_cb1"/>
-            </ASroute><ASroute src="AS3_cb4" dst="AS3_cb4" gw_src="cb4-AS3_cb4_router.dc3.acloud.com" gw_dst="cb4-AS3_cb4_router.dc3.acloud.com" symmetrical="YES">
-                    <link_ctn id="link_dc3_cb4"/>
-                    <link_ctn id="link_dc3_cb4"/>
-            </ASroute>
-            <!-- clusters to exit AS -->
-            <ASroute src="AS3_cb3" dst="gw_AS3_dc3" gw_src="cb3-AS3_cb3_router.dc3.acloud.com" gw_dst="gw_dc3_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc3_cb3"/>
-            </ASroute><ASroute src="AS3_cb2" dst="gw_AS3_dc3" gw_src="cb2-AS3_cb2_router.dc3.acloud.com" gw_dst="gw_dc3_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc3_cb2"/>
-            </ASroute><ASroute src="AS3_cb1" dst="gw_AS3_dc3" gw_src="cb1-AS3_cb1_router.dc3.acloud.com" gw_dst="gw_dc3_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc3_cb1"/>
-            </ASroute><ASroute src="AS3_cb4" dst="gw_AS3_dc3" gw_src="cb4-AS3_cb4_router.dc3.acloud.com" gw_dst="gw_dc3_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc3_cb4"/>
-            </ASroute>
-            <ASroute dst="AS3_cb3" src="gw_AS3_dc3" gw_dst="cb3-AS3_cb3_router.dc3.acloud.com" gw_src="gw_dc3_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc3_cb3"/>
-            </ASroute><ASroute dst="AS3_cb2" src="gw_AS3_dc3" gw_dst="cb2-AS3_cb2_router.dc3.acloud.com" gw_src="gw_dc3_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc3_cb2"/>
-            </ASroute><ASroute dst="AS3_cb1" src="gw_AS3_dc3" gw_dst="cb1-AS3_cb1_router.dc3.acloud.com" gw_src="gw_dc3_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc3_cb1"/>
-            </ASroute><ASroute dst="AS3_cb4" src="gw_AS3_dc3" gw_dst="cb4-AS3_cb4_router.dc3.acloud.com" gw_src="gw_dc3_horizdist" symmetrical="NO">
-                    <link_ctn id="link_dc3_cb4"/>
-            </ASroute>  
-   </AS>
-              
+     <!-- internal routes between clusters -->
+     <ASroute src="AS3_cb3" dst="AS3_cb3" gw_src="cb3-AS3_cb3_router.dc3.acloud.com"
+              gw_dst="cb3-AS3_cb3_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb3"/><link_ctn id="link_dc3_cb3"/>
+     </ASroute>
+     <ASroute src="AS3_cb2" dst="AS3_cb3" gw_src="cb2-AS3_cb2_router.dc3.acloud.com"
+              gw_dst="cb3-AS3_cb3_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb2"/><link_ctn id="link_dc3_cb3"/>
+     </ASroute>
+     <ASroute src="AS3_cb2" dst="AS3_cb2" gw_src="cb2-AS3_cb2_router.dc3.acloud.com"
+              gw_dst="cb2-AS3_cb2_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb2"/><link_ctn id="link_dc3_cb2"/>
+     </ASroute>
+     <ASroute src="AS3_cb1" dst="AS3_cb3" gw_src="cb1-AS3_cb1_router.dc3.acloud.com"
+              gw_dst="cb3-AS3_cb3_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb1"/><link_ctn id="link_dc3_cb3"/>
+     </ASroute>
+     <ASroute src="AS3_cb1" dst="AS3_cb2" gw_src="cb1-AS3_cb1_router.dc3.acloud.com"
+              gw_dst="cb2-AS3_cb2_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb1"/><link_ctn id="link_dc3_cb2"/>
+     </ASroute>
+     <ASroute src="AS3_cb1" dst="AS3_cb1" gw_src="cb1-AS3_cb1_router.dc3.acloud.com"
+              gw_dst="cb1-AS3_cb1_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb1"/><link_ctn id="link_dc3_cb1"/>
+     </ASroute>
+     <ASroute src="AS3_cb4" dst="AS3_cb3" gw_src="cb4-AS3_cb4_router.dc3.acloud.com"
+              gw_dst="cb3-AS3_cb3_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb4"/><link_ctn id="link_dc3_cb3"/>
+     </ASroute>
+     <ASroute src="AS3_cb4" dst="AS3_cb2" gw_src="cb4-AS3_cb4_router.dc3.acloud.com"
+              gw_dst="cb2-AS3_cb2_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb4"/><link_ctn id="link_dc3_cb2"/>
+     </ASroute>
+     <ASroute src="AS3_cb4" dst="AS3_cb1" gw_src="cb4-AS3_cb4_router.dc3.acloud.com"
+              gw_dst="cb1-AS3_cb1_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb4"/><link_ctn id="link_dc3_cb1"/>
+     </ASroute>
+     <ASroute src="AS3_cb4" dst="AS3_cb4" gw_src="cb4-AS3_cb4_router.dc3.acloud.com"
+             gw_dst="cb4-AS3_cb4_router.dc3.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc3_cb4"/><link_ctn id="link_dc3_cb4"/>
+     </ASroute>
+
+     <!-- routes to exit AS -->
+     <ASroute src="AS3_cb3" dst="gw_AS3_dc3" gw_src="cb3-AS3_cb3_router.dc3.acloud.com"
+              gw_dst="gw_dc3_horizdist" symmetrical="NO">
+        <link_ctn id="link_dc3_cb3"/>
+     </ASroute>
+     <ASroute src="AS3_cb2" dst="gw_AS3_dc3" gw_src="cb2-AS3_cb2_router.dc3.acloud.com"
+              gw_dst="gw_dc3_horizdist" symmetrical="NO">
+       <link_ctn id="link_dc3_cb2"/>
+     </ASroute>
+     <ASroute src="AS3_cb1" dst="gw_AS3_dc3" gw_src="cb1-AS3_cb1_router.dc3.acloud.com"
+              gw_dst="gw_dc3_horizdist" symmetrical="NO">
+        <link_ctn id="link_dc3_cb1"/>
+     </ASroute>
+     <ASroute src="AS3_cb4" dst="gw_AS3_dc3" gw_src="cb4-AS3_cb4_router.dc3.acloud.com"
+              gw_dst="gw_dc3_horizdist" symmetrical="NO">
+        <link_ctn id="link_dc3_cb4"/>
+     </ASroute>
+     <ASroute dst="AS3_cb3" src="gw_AS3_dc3" gw_dst="cb3-AS3_cb3_router.dc3.acloud.com"
+              gw_src="gw_dc3_horizdist" symmetrical="NO">
+        <link_ctn id="link_dc3_cb3"/>
+     </ASroute>
+     <ASroute dst="AS3_cb2" src="gw_AS3_dc3" gw_dst="cb2-AS3_cb2_router.dc3.acloud.com"
+              gw_src="gw_dc3_horizdist" symmetrical="NO">
+        <link_ctn id="link_dc3_cb2"/>
+     </ASroute>
+     <ASroute dst="AS3_cb1" src="gw_AS3_dc3" gw_dst="cb1-AS3_cb1_router.dc3.acloud.com"
+              gw_src="gw_dc3_horizdist" symmetrical="NO">
+        <link_ctn id="link_dc3_cb1"/>
+     </ASroute>
+     <ASroute dst="AS3_cb4" src="gw_AS3_dc3" gw_dst="cb4-AS3_cb4_router.dc3.acloud.com"
+              gw_src="gw_dc3_horizdist" symmetrical="NO">
+        <link_ctn id="link_dc3_cb4"/>
+     </ASroute>  
+  </AS>
 </AS>
 </platform>
index 4a8ad9f..a674628 100644 (file)
@@ -5,15 +5,12 @@
                 |          |
                 |  router  |
     ____________|__________|_____________ backbone
-      |   |   |              |     |   |       
-    l0|        l1| l2|           l97| l96 |   | l99
+      |   |   |              |     |   |  
+    l0| l1| l2|           l97| l96 |   | l99
       |   |   |   ........   |     |   |
       |                                |
   node-0.acme.org                  node-99.acme.org
 -->
-  <cluster id="acme"
-           prefix="node-"    suffix=".acme.org"
-           radical="0-99"    speed="1Gf" 
-          bw="125MBps"      lat="50us"
+  <cluster id="acme" prefix="node-" suffix=".acme.org" radical="0-99" speed="1Gf" bw="125MBps" lat="50us"
            bb_bw="2.25GBps"  bb_lat="500us"/>
 </platform>
index 3e1cd55..73004fc 100644 (file)
@@ -2,8 +2,7 @@
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
  <AS id="AS0"  routing="Full">   
-  <cluster id="my_cluster_1" prefix="c-" suffix=".me"
-          radical="0-1" speed="1Gf" bw="125MBps" lat="50us"
+  <cluster id="my_cluster_1" prefix="c-" suffix=".me" radical="0-1" speed="1Gf" bw="125MBps" lat="50us"
            router_id="router1"/>
 
   <AS id="AS1" routing="None">
   </AS>
 
   <link id="link1" bandwidth="100kBps" latency="10ms"/>
-  
-  <ASroute src="my_cluster_1" dst="AS1"
-    gw_src="router1" gw_dst="host1">
-    <link_ctn id="link1"/>
-  </ASroute>
+
+  <ASroute src="my_cluster_1" dst="AS1" gw_src="router1" gw_dst="host1"><link_ctn id="link1"/></ASroute>
  </AS>
 </platform>
index d600a79..5ae99e4 100644 (file)
@@ -1,21 +1,18 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
 <!--             _________
                 |          |
                 |  router  |
                 |__________|
                     / | \
                    /  |  \
-               l0 / l1|   \l2 
+               l0 / l1|   \l2
                  /    |    \
                 /     |     \
-            host0   host1   host2      
+            host0   host1   host2
 -->
-
-<AS  id="AS0"  routing="Full">
-  <cluster id="my_cluster_1" prefix="" suffix=""
-               radical="0-262144"      speed="1Gf"    bw="125MBps"     lat="50us"/>
+<AS id="AS0" routing="Full">
+  <cluster id="my_cluster_1" prefix="" suffix="" radical="0-262144" speed="1Gf" bw="125MBps" lat="50us"/>
 </AS>
 </platform>
index 14e63bf..6e897bd 100644 (file)
@@ -1,14 +1,13 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
 <!--                  _________________________________________
                  ____|_____                                    |
                 |          |                                   |
                 |  router1 |                                   |
     ____________|__________|_____________ backbone1            |
       |   |   |              |     |   |                       | backbone
-    l0|        l1| l2|            l7|   l8|   |l9                     |
+    l0| l1| l2|            l7|   l8|   |l9                     |
       |   |   |   ........   |     |   |                       |
       |                                |                       |
     c-0.me                             c-9.me                  |
                 |          |
                 |  router2 |
     ____________|__________|_____________ backbone2
-      |   |   |              |     |   |       
+      |   |   |              |     |   |  
    l10|l11|l12|           l17| l18 |   | l19
       |   |   |   ........   |     |   |
       |                                |
-   c-10.me                             c-19.me 
--->
+   c-10.me                             c-19.me -->
 
 <AS id="AS0" routing="Full">
-       <cluster id="my_cluster_1" prefix="node-" suffix=".acme.org" radical="0-9"
-               speed="1Gf" bw="125MBps" lat="50us" bb_bw="2.25GBps"
-               bb_lat="500us" />
+  <cluster id="my_cluster_1" prefix="node-" suffix=".acme.org" radical="0-9" speed="1Gf" 
+           bw="125MBps" lat="50us" bb_bw="2.25GBps" bb_lat="500us" />
 
-       <cluster id="my_cluster_2" prefix="node-" suffix=".acme.org" radical="10-19"
-               speed="1Gf" bw="125MBps" lat="50us" bb_bw="2.25GBps"
-               bb_lat="500us" />
+  <cluster id="my_cluster_2" prefix="node-" suffix=".acme.org" radical="10-19" speed="1Gf" 
+           bw="125MBps" lat="50us" bb_bw="2.25GBps" bb_lat="500us" />
 
-       <link id="backbone" bandwidth="1.25GBps" latency="500us" />
+  <link id="backbone" bandwidth="1.25GBps" latency="500us" />
 
-       <ASroute src="my_cluster_1" dst="my_cluster_2" gw_src="node-my_cluster_1_router.acme.org"
-               gw_dst="node-my_cluster_2_router.acme.org">
-               <link_ctn id="backbone" />
-       </ASroute>
+  <ASroute src="my_cluster_1" dst="my_cluster_2" gw_src="node-my_cluster_1_router.acme.org"
+    gw_dst="node-my_cluster_2_router.acme.org">
+    <link_ctn id="backbone" />
+  </ASroute>
 </AS>
 </platform>
index 66622fa..4dae60f 100644 (file)
@@ -1,28 +1,23 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-       
 <config id="General">
-       <prop id="maxmin/precision" value="0.000010"></prop>
-       <prop id="cpu/optim" value="TI"></prop>
-       <prop id="host/model" value="compound"></prop>
-       <prop id="network/model" value="SMPI"></prop>
-       <prop id="path" value="~/"></prop>
-       <prop id="smpi/bw_factor" value="65472:0.940694;15424:0.697866;9376:0.58729"></prop>
+  <prop id="maxmin/precision" value="0.000010"></prop>
+  <prop id="cpu/optim" value="TI"></prop>
+  <prop id="host/model" value="compound"></prop>
+  <prop id="network/model" value="SMPI"></prop>
+  <prop id="path" value="~/"></prop>
+  <prop id="smpi/bw_factor" value="65472:0.940694;15424:0.697866;9376:0.58729"></prop>
 </config>
-       
+
 <AS  id="AS0"  routing="Full">
    <host id="bob" speed="1Gf"/>
    <host id="alice" speed="500Mf"/>
+
    <link id="link1" bandwidth="125MBps" latency="50us"/>
    <link id="link2" bandwidth="125MBps" latency="50us"/>
    <link id="link3" bandwidth="125MBps" latency="50us"/>
-   
-   <route src="bob" dst="alice" symmetrical="YES">
-     <link_ctn id="link1"/>
-        <link_ctn id="link2"/>
-        <link_ctn id="link3"/>
-   </route>
+
+   <route src="bob" dst="alice"><link_ctn id="link1"/><link_ctn id="link2"/><link_ctn id="link3"/></route>
 </AS>
 </platform>
index 55d9a8b..360bc57 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
   <config id="example config">
     <prop id="tracing/uncategorized" value="yes"/>
     <prop id="tracing/buffer" value="yes"/>
@@ -12,8 +11,7 @@
     <prop id="tracing/categorized" value="yes"/>
   </config>
 
- <AS  id="AS0"  routing="Full">
-   <!-- ljlkj -->
+ <AS id="AS0" routing="Full">
    <host id="Tremblay" speed="98.095Mf"/>
    <host id="Jupiter" speed="76.296Mf"/>
    <host id="Fafard" speed="76.296Mf"/>
    <link id="10" bandwidth="4.67975MBps" latency="848.712us"/>
    <link id="5" bandwidth="27.94625MBps" latency="278.066us"/>
    <link id="loopback" bandwidth="498MBps" latency="15us" sharing_policy="FATPIPE"/>
+
    <route src="Tremblay" dst="Tremblay"><link_ctn id="loopback"/></route>
    <route src="Jupiter" dst="Jupiter"><link_ctn id="loopback"/></route>
    <route src="Fafard" dst="Fafard"><link_ctn id="loopback"/></route>
    <route src="Ginette" dst="Ginette"><link_ctn id="loopback"/></route>
    <route src="Bourassa" dst="Bourassa"><link_ctn id="loopback"/></route>
-   <route src="Tremblay" dst="Jupiter">
-     <link_ctn id="9"/>
-   </route>
-   <route src="Tremblay" dst="Fafard">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Tremblay" dst="Ginette">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Tremblay" dst="Bourassa">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Jupiter" dst="Fafard">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Jupiter" dst="Ginette">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Jupiter" dst="Bourassa">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Fafard" dst="Ginette">
-     <link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/>
-   </route>
-   <route src="Fafard" dst="Bourassa">
-     <link_ctn id="8"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Ginette" dst="Bourassa">
-     <link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
+   <route src="Tremblay" dst="Jupiter"><link_ctn id="9"/></route>
+   <route src="Tremblay" dst="Fafard"><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/></route>
+   <route src="Tremblay" dst="Ginette"><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/></route>
+   <route src="Tremblay" dst="Bourassa"><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/></route>
+   <route src="Jupiter" dst="Fafard"><link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/></route>
+   <route src="Jupiter" dst="Ginette"><link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/></route>
+   <route src="Jupiter" dst="Bourassa"><link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/></route>
+   <route src="Fafard" dst="Ginette"><link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/></route>
+   <route src="Fafard" dst="Bourassa"><link_ctn id="8"/><link_ctn id="6"/><link_ctn id="7"/></route>
+   <route src="Ginette" dst="Bourassa"><link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/></route>
  </AS>
-
 </platform>
index 385b1ce..ef00680 100644 (file)
@@ -1,25 +1,16 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-<!--- 
-   S1  _________ C1
-        link 1
-        100MB, 5ms
--->
-
+<!-- S1 _________ C1
+         link 1
+       10kB, 10ms    -->
 <AS id="1" routing="Full">
   <host id="S1" speed="1Gf"/>
   <host id="C1" speed="1Gf"/>
 
   <link id="1" bandwidth="10kBps" latency="10ms" sharing_policy="FULLDUPLEX"/>
 
-  <route src="S1" dst="C1" symmetrical="NO">
-     <link_ctn id="1" direction="DOWN"/>
-  </route>
-
-  <route src="C1" dst="S1" symmetrical="NO">
-     <link_ctn id="1" direction="UP"/>
-  </route>
-
+  <route src="S1" dst="C1" symmetrical="NO"><link_ctn id="1" direction="DOWN"/></route>
+  <route src="C1" dst="S1" symmetrical="NO"><link_ctn id="1" direction="UP"/></route>
 </AS>
 </platform>
index 8c5dfe1..2be1246 100644 (file)
@@ -2,19 +2,21 @@
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
 <config id="General">
-    <prop id="network/coordinates" value="yes"/>
+  <prop id="network/coordinates" value="yes"/>
 </config>
-
 <AS id="AS0" routing="Vivaldi">
-    <AS id="dataCenter1" routing="Full">
-      
-    <!-- 3 cabinets, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted because not a part of the production platform  -->
+  <AS id="dataCenter1" routing="Full">
+    <!-- 3 cabinets, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted -->
     <!-- cabinets -->
-    <cluster id="cabinet1" prefix="cb1-" suffix=".dc1.acloud.com" radical="1-40" speed="5.2297Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="cabinet1" prefix="cb1-" suffix=".dc1.acloud.com" radical="1-40" speed="5.2297Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="cabinet2" prefix="cb2-" suffix=".dc1.acloud.com" radical="1-50" speed="8.8925Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+    <cluster id="cabinet3" prefix="cb3-" suffix=".dc1.acloud.com" radical="1-30" speed="13.357Gf"
+             bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
+
     <link id="link_dc1_cb1" bandwidth="1.25GBps" latency="100us"/>
-    <cluster id="cabinet2" prefix="cb2-" suffix=".dc1.acloud.com" radical="1-50" speed="8.8925Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
     <link id="link_dc1_cb2" bandwidth="1.25GBps" latency="100us"/>
-    <cluster id="cabinet3" prefix="cb3-" suffix=".dc1.acloud.com" radical="1-30" speed="13.357Gf" bw="125MBps" lat="100us" bb_bw="1.25GBps" bb_lat="100us"/>
     <link id="link_dc1_cb3" bandwidth="1.25GBps" latency="100us"/>
  
     <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
         <router id="gw_dc1_horizdist"/>
         <router id="gw_dc1_maindist"/>
         <router id="gw_dc1_entranceroom"/>
-                    
+
         <!-- ISP end point, entering the cloud, so it has coordinates -->
         <router id="router_dataCenter1" coordinates="25.5 9.4 1.4"/>
-                    
+
         <!-- links -->
         <link id="dc1_horizdist_maindist" bandwidth="1.25GBps" latency="100us"/>        
         <link id="dc1_maindist_entranceroom" bandwidth="1.25GBps" latency="100us"/>  
         <link id="dc1_entranceroom_ISP" bandwidth="1.25GBps" latency="100us"/> 
-                     
+
         <!-- links to router relationships -->
         <route src="gw_dc1_horizdist" dst="gw_dc1_maindist"><link_ctn id="dc1_horizdist_maindist"/></route>
         <route src="gw_dc1_maindist" dst="gw_dc1_entranceroom"><link_ctn id="dc1_maindist_entranceroom"/></route>
         <route src="gw_dc1_entranceroom" dst="router_dataCenter1"><link_ctn id="dc1_entranceroom_ISP"/></route>
     </AS>
-           
+
     <!-- internal routes between cabinets -->
-    <ASroute src="cabinet3" dst="cabinet3" gw_src="cb3-cabinet3_router.dc1.acloud.com" gw_dst="cb3-cabinet3_router.dc1.acloud.com" symmetrical="YES">
-        <link_ctn id="link_dc1_cb3"/>
-        <link_ctn id="link_dc1_cb3"/>
-    </ASroute><ASroute src="cabinet2" dst="cabinet3" gw_src="cb2-cabinet2_router.dc1.acloud.com" gw_dst="cb3-cabinet3_router.dc1.acloud.com" symmetrical="YES">
-        <link_ctn id="link_dc1_cb2"/>
-        <link_ctn id="link_dc1_cb3"/>
-    </ASroute><ASroute src="cabinet2" dst="cabinet2" gw_src="cb2-cabinet2_router.dc1.acloud.com" gw_dst="cb2-cabinet2_router.dc1.acloud.com" symmetrical="YES">
-        <link_ctn id="link_dc1_cb2"/>
-        <link_ctn id="link_dc1_cb2"/>
-    </ASroute><ASroute src="cabinet1" dst="cabinet3" gw_src="cb1-cabinet1_router.dc1.acloud.com" gw_dst="cb3-cabinet3_router.dc1.acloud.com" symmetrical="YES">
-        <link_ctn id="link_dc1_cb1"/>
-        <link_ctn id="link_dc1_cb3"/>
-    </ASroute><ASroute src="cabinet1" dst="cabinet2" gw_src="cb1-cabinet1_router.dc1.acloud.com" gw_dst="cb2-cabinet2_router.dc1.acloud.com" symmetrical="YES">
-        <link_ctn id="link_dc1_cb1"/>
-        <link_ctn id="link_dc1_cb2"/>
-    </ASroute><ASroute src="cabinet1" dst="cabinet1" gw_src="cb1-cabinet1_router.dc1.acloud.com" gw_dst="cb1-cabinet1_router.dc1.acloud.com" symmetrical="YES">
-        <link_ctn id="link_dc1_cb1"/>
-        <link_ctn id="link_dc1_cb1"/>
+    <ASroute src="cabinet3" dst="cabinet3" gw_src="cb3-cabinet3_router.dc1.acloud.com"
+             gw_dst="cb3-cabinet3_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb3"/><link_ctn id="link_dc1_cb3"/>
     </ASroute>
-    <!-- cabinets to exit AS -->
-    </AS>
-
+    <ASroute src="cabinet2" dst="cabinet3" gw_src="cb2-cabinet2_router.dc1.acloud.com"
+             gw_dst="cb3-cabinet3_router.dc1.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc1_cb2"/><link_ctn id="link_dc1_cb3"/>
+    </ASroute>
+    <ASroute src="cabinet2" dst="cabinet2" gw_src="cb2-cabinet2_router.dc1.acloud.com"
+             gw_dst="cb2-cabinet2_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb2"/><link_ctn id="link_dc1_cb2"/>
+    </ASroute>
+    <ASroute src="cabinet1" dst="cabinet3" gw_src="cb1-cabinet1_router.dc1.acloud.com"
+             gw_dst="cb3-cabinet3_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb1"/><link_ctn id="link_dc1_cb3"/>
+    </ASroute>
+    <ASroute src="cabinet1" dst="cabinet2" gw_src="cb1-cabinet1_router.dc1.acloud.com"
+             gw_dst="cb2-cabinet2_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb1"/><link_ctn id="link_dc1_cb2"/>
+    </ASroute>
+    <ASroute src="cabinet1" dst="cabinet1" gw_src="cb1-cabinet1_router.dc1.acloud.com"
+             gw_dst="cb1-cabinet1_router.dc1.acloud.com" symmetrical="YES">
+      <link_ctn id="link_dc1_cb1"/><link_ctn id="link_dc1_cb1"/>
+    </ASroute>
+  </AS>
 </AS>
 </platform>
index 7f7ddb0..adc1353 100644 (file)
@@ -1,28 +1,29 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-<AS  id="AS0"  routing="Full">
+<AS id="AS0" routing="Full">
   <!-- Multiple pstate processor capacities can be defined as a list of powers specified for a given host -->
-  <!-- Attribute 'pstate' specifies the initialy selected pstate (here, the lowest pstate corresponds to the highest processor speed) -->
+  <!-- Attribute 'pstate' specifies the initialy selected pstate (here, the lowest pstate corresponds to the highest
+       processor speed) -->
   <host id="MyHost1" speed="100.0Mf,50.0Mf,20.0Mf" pstate="0" >
-        <!--  List of min_power:max_power pairs (in Watts) corresponding to the speed consumed when the processor is idle and when it is fully loaded -->
-        <!--  The list must contain one speed pair for each previously defined pstate-->
-        <prop id="watt_per_state" value="100.0:200.0, 93.0:170.0, 90.0:150.0" />
-        <prop id="watt_off" value="10" />
+    <!--  List of min_power:max_power pairs (in Watts) corresponding to the speed consumed when the processor is idle
+          and when it is fully loaded -->
+    <!--  The list must contain one speed pair for each previously defined pstate-->
+    <prop id="watt_per_state" value="100.0:200.0, 93.0:170.0, 90.0:150.0" />
+    <prop id="watt_off" value="10" />
   </host>
   <host id="MyHost2" speed="100.0Mf,50.0Mf,20.0Mf" pstate="0" >
-        <prop id="watt_per_state" value="100.0:200.0, 93.0:170.0, 90.0:150.0" />
-        <prop id="watt_off" value="10" />
+    <prop id="watt_per_state" value="100.0:200.0, 93.0:170.0, 90.0:150.0" />
+    <prop id="watt_off" value="10" />
   </host>
   <host id="MyHost3" speed="100.0Mf,50.0Mf,20.0Mf" pstate="0" >
-        <prop id="watt_per_state" value="100.0:200.0, 93.0:170.0, 90.0:150.0" />
-        <prop id="watt_off" value="10" />
+    <prop id="watt_per_state" value="100.0:200.0, 93.0:170.0, 90.0:150.0" />
+    <prop id="watt_off" value="10" />
   </host>
 
   <link id="bus" bandwidth="100kBps" latency="0"/>
   <route src="MyHost1" dst="MyHost2"><link_ctn id="bus"/></route>
   <route src="MyHost1" dst="MyHost3"><link_ctn id="bus"/></route>
   <route src="MyHost2" dst="MyHost3"><link_ctn id="bus"/></route>
-  
 </AS>
 </platform>
index e15071f..7ab17e7 100644 (file)
@@ -1,18 +1,14 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
 <!-- This is an example for a fat tree cluster. 
-This is taken from figure 1/ b/ of the paper "D-Mod-K Routing Providing 
-Non-Blocking Traffic for Shift Permutations on Real Life Fat Trees"  
-available at webee.technion.ac.il/publication-link/index/id/574
-This defines a two levels fat-tree, with 4 leaf switches connected to 4 nodes each
-and 2 core switches connected to each leaf switch by two cables
--->
+This is taken from figure 1/ b/ of the paper "D-Mod-K Routing Providing on-Blocking Traffic for Shift Permutations on 
+Real Life Fat Trees" available at webee.technion.ac.il/publication-link/index/id/574
+This defines a two levels fat-tree, with 4 leaf switches connected to 4 nodes each and 2 core switches connected to 
+each leaf switch by two cables -->
 
 <AS id="AS0" routing="Full">
-<cluster id="bob_cluster" prefix="node-" suffix=".acme.org"
-  radical="0-15" speed="1Gf" bw="125MBps" lat="50us" topology="FAT_TREE" topo_parameters="2;4,4;1,2;1,2" 
-  loopback_bw="100000000Bps" loopback_lat="0"/>
+<cluster id="bob_cluster" prefix="node-" suffix=".acme.org" radical="0-15" speed="1Gf" bw="125MBps" lat="50us" 
+         topology="FAT_TREE" topo_parameters="2;4,4;1,2;1,2" loopback_bw="100MBps" loopback_lat="0"/>
 </AS>
 </platform>
index 3e0d348..45dfdd3 100644 (file)
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-       <AS id="AS_grid5000" routing="Floyd">
-               <AS id="AS_interne" routing="Floyd">
-                       <router id="lille"/>
-                       <router id="paris"/>
-                       <router id="nancy"/>
-                       <router id="rennes"/>
-                       <router id="lyon"/>
-                       <router id="bordeaux"/>
-                       <router id="grenoble"/>
-                       <router id="marseille"/>
-                       <router id="toulouse"/>
-                       <router id="sophia"/>
-
-                       <link id="Lille_Paris" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-                       <link id="Paris_Nancy" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-                       <link id="Paris_Rennes" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-                       <link id="Paris_Lyon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-                       <link id="Bordeaux_Lyon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-                       <link id="Lyon_Grenoble" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-                       <link id="Lyon_Marseille" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-                       <link id="Marseille_Sophia" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-                       <link id="Marseille_Toulouse" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-               <route src="lille" dst="paris"><link_ctn id="Lille_Paris"/></route>
-               <route src="paris" dst="nancy"><link_ctn id="Paris_Nancy"/></route>
-               <route src="paris" dst="rennes"><link_ctn id="Paris_Rennes"/></route>
-               <route src="paris" dst="lyon"><link_ctn id="Paris_Lyon"/></route>
-               <route src="bordeaux" dst="lyon"><link_ctn id="Bordeaux_Lyon"/></route>
-               <route src="lyon" dst="grenoble"><link_ctn id="Lyon_Grenoble"/></route>
-               <route src="lyon" dst="marseille"><link_ctn id="Lyon_Marseille"/></route>
-               <route src="marseille" dst="sophia"><link_ctn id="Marseille_Sophia"/></route>
-               <route src="marseille" dst="toulouse"><link_ctn id="Marseille_Toulouse"/></route>
-               </AS>
-               <AS id="AS_bordeaux" routing="Full">
-                       <cluster id="AS_bordeplage" prefix="bordeplage-" suffix=".bordeaux.grid5000.fr" radical="1-51" speed="5.2297E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_bordeplage" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_bordereau" prefix="bordereau-" suffix=".bordeaux.grid5000.fr" radical="1-93" speed="8.8925E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_bordereau" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_borderline" prefix="borderline-" suffix=".bordeaux.grid5000.fr" radical="1-10" speed="13.357E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_borderline" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="gw_AS_bordeaux" routing="Full">
-                               <router id="gw_bordeaux"/>
-                       </AS>
-                       <link id="link_gw_bordeaux" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <ASroute src="AS_bordereau" dst="AS_bordereau" gw_src="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" gw_dst="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_bordereau"/>
-                                       <link_ctn id="link_bordereau"/>
-                       </ASroute><ASroute src="AS_bordeplage" dst="AS_bordereau" gw_src="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" gw_dst="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_bordeplage"/>
-                                       <link_ctn id="link_bordereau"/>
-                       </ASroute><ASroute src="AS_bordeplage" dst="AS_bordeplage" gw_src="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" gw_dst="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_bordeplage"/>
-                                       <link_ctn id="link_bordeplage"/>
-                       </ASroute><ASroute src="AS_borderline" dst="AS_bordereau" gw_src="borderline-AS_borderline_router.bordeaux.grid5000.fr" gw_dst="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_borderline"/>
-                                       <link_ctn id="link_bordereau"/>
-                       </ASroute><ASroute src="AS_borderline" dst="AS_bordeplage" gw_src="borderline-AS_borderline_router.bordeaux.grid5000.fr" gw_dst="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_borderline"/>
-                                       <link_ctn id="link_bordeplage"/>
-                       </ASroute><ASroute src="AS_borderline" dst="AS_borderline" gw_src="borderline-AS_borderline_router.bordeaux.grid5000.fr" gw_dst="borderline-AS_borderline_router.bordeaux.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_borderline"/>
-                                       <link_ctn id="link_borderline"/>
-                       </ASroute>
-
-                       <ASroute src="AS_bordereau" dst="gw_AS_bordeaux" gw_src="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" gw_dst="gw_bordeaux" symmetrical="NO">
-                                       <link_ctn id="link_bordereau"/>
-                       </ASroute><ASroute src="AS_bordeplage" dst="gw_AS_bordeaux" gw_src="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" gw_dst="gw_bordeaux" symmetrical="NO">
-                                       <link_ctn id="link_bordeplage"/>
-                       </ASroute><ASroute src="AS_borderline" dst="gw_AS_bordeaux" gw_src="borderline-AS_borderline_router.bordeaux.grid5000.fr" gw_dst="gw_bordeaux" symmetrical="NO">
-                                       <link_ctn id="link_borderline"/>
-                       </ASroute>
-
-                       <ASroute src="gw_AS_bordeaux" dst="AS_bordereau" gw_src="gw_bordeaux" gw_dst="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_bordereau"/>
-                       </ASroute><ASroute src="gw_AS_bordeaux" dst="AS_bordeplage" gw_src="gw_bordeaux" gw_dst="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_bordeplage"/>
-                       </ASroute><ASroute src="gw_AS_bordeaux" dst="AS_borderline" gw_src="gw_bordeaux" gw_dst="borderline-AS_borderline_router.bordeaux.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_borderline"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_grenoble" routing="Full">
-                       <cluster id="AS_adonis" prefix="adonis-" suffix=".grenoble.grid5000.fr" radical="1-12" speed="23.681E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_adonis" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_edel" prefix="edel-" suffix=".grenoble.grid5000.fr" radical="1-72" speed="23.492E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_edel" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_genepi" prefix="genepi-" suffix=".grenoble.grid5000.fr" radical="1-34" speed="21.175E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_genepi" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="gw_AS_grenoble" routing="Full">
-                               <router id="gw_grenoble"/>
-                       </AS>
-                       <link id="link_gw_grenoble" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <ASroute src="AS_adonis" dst="AS_adonis" gw_src="adonis-AS_adonis_router.grenoble.grid5000.fr" gw_dst="adonis-AS_adonis_router.grenoble.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_adonis"/>
-                                       <link_ctn id="link_adonis"/>
-                       </ASroute><ASroute src="AS_genepi" dst="AS_adonis" gw_src="genepi-AS_genepi_router.grenoble.grid5000.fr" gw_dst="adonis-AS_adonis_router.grenoble.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_genepi"/>
-                                       <link_ctn id="link_adonis"/>
-                       </ASroute><ASroute src="AS_genepi" dst="AS_genepi" gw_src="genepi-AS_genepi_router.grenoble.grid5000.fr" gw_dst="genepi-AS_genepi_router.grenoble.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_genepi"/>
-                                       <link_ctn id="link_genepi"/>
-                       </ASroute><ASroute src="AS_edel" dst="AS_adonis" gw_src="edel-AS_edel_router.grenoble.grid5000.fr" gw_dst="adonis-AS_adonis_router.grenoble.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_edel"/>
-                                       <link_ctn id="link_adonis"/>
-                       </ASroute><ASroute src="AS_edel" dst="AS_genepi" gw_src="edel-AS_edel_router.grenoble.grid5000.fr" gw_dst="genepi-AS_genepi_router.grenoble.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_edel"/>
-                                       <link_ctn id="link_genepi"/>
-                       </ASroute><ASroute src="AS_edel" dst="AS_edel" gw_src="edel-AS_edel_router.grenoble.grid5000.fr" gw_dst="edel-AS_edel_router.grenoble.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_edel"/>
-                                       <link_ctn id="link_edel"/>
-                       </ASroute>
-
-                       <ASroute src="AS_adonis" dst="gw_AS_grenoble" gw_src="adonis-AS_adonis_router.grenoble.grid5000.fr" gw_dst="gw_grenoble" symmetrical="NO">
-                                       <link_ctn id="link_adonis"/>
-                       </ASroute><ASroute src="AS_genepi" dst="gw_AS_grenoble" gw_src="genepi-AS_genepi_router.grenoble.grid5000.fr" gw_dst="gw_grenoble" symmetrical="NO">
-                                       <link_ctn id="link_genepi"/>
-                       </ASroute><ASroute src="AS_edel" dst="gw_AS_grenoble" gw_src="edel-AS_edel_router.grenoble.grid5000.fr" gw_dst="gw_grenoble" symmetrical="NO">
-                                       <link_ctn id="link_edel"/>
-                       </ASroute>
-
-                       <ASroute src="gw_AS_grenoble" dst="AS_adonis" gw_src="gw_grenoble" gw_dst="adonis-AS_adonis_router.grenoble.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_adonis"/>
-                       </ASroute><ASroute src="gw_AS_grenoble" dst="AS_genepi" gw_src="gw_grenoble" gw_dst="genepi-AS_genepi_router.grenoble.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_genepi"/>
-                       </ASroute><ASroute src="gw_AS_grenoble" dst="AS_edel" gw_src="gw_grenoble" gw_dst="edel-AS_edel_router.grenoble.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_edel"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_lille" routing="Full">
-                       <cluster id="AS_chicon" prefix="chicon-" suffix=".lille.grid5000.fr" radical="1-26" speed="8.9618E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_chicon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_chimint" prefix="chimint-" suffix=".lille.grid5000.fr" radical="1-20" speed="23.531E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_chimint" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_chinqchint" prefix="chinqchint-" suffix=".lille.grid5000.fr" radical="1-46" speed="22.270E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_chinqchint" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_chirloute" prefix="chirloute-" suffix=".lille.grid5000.fr" radical="1-8" speed="24.473E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_chirloute" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="gw_AS_lille" routing="Full">
-                               <router id="gw_lille"/>
-                       </AS>
-                       <link id="link_gw_lille" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <ASroute src="AS_chinqchint" dst="AS_chinqchint" gw_src="chinqchint-AS_chinqchint_router.lille.grid5000.fr" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chinqchint"/>
-                                       <link_ctn id="link_chinqchint"/>
-                       </ASroute><ASroute src="AS_chirloute" dst="AS_chinqchint" gw_src="chirloute-AS_chirloute_router.lille.grid5000.fr" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chirloute"/>
-                                       <link_ctn id="link_chinqchint"/>
-                       </ASroute><ASroute src="AS_chirloute" dst="AS_chirloute" gw_src="chirloute-AS_chirloute_router.lille.grid5000.fr" gw_dst="chirloute-AS_chirloute_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chirloute"/>
-                                       <link_ctn id="link_chirloute"/>
-                       </ASroute><ASroute src="AS_chimint" dst="AS_chinqchint" gw_src="chimint-AS_chimint_router.lille.grid5000.fr" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chimint"/>
-                                       <link_ctn id="link_chinqchint"/>
-                       </ASroute><ASroute src="AS_chimint" dst="AS_chirloute" gw_src="chimint-AS_chimint_router.lille.grid5000.fr" gw_dst="chirloute-AS_chirloute_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chimint"/>
-                                       <link_ctn id="link_chirloute"/>
-                       </ASroute><ASroute src="AS_chimint" dst="AS_chimint" gw_src="chimint-AS_chimint_router.lille.grid5000.fr" gw_dst="chimint-AS_chimint_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chimint"/>
-                                       <link_ctn id="link_chimint"/>
-                       </ASroute><ASroute src="AS_chicon" dst="AS_chinqchint" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chicon"/>
-                                       <link_ctn id="link_chinqchint"/>
-                       </ASroute><ASroute src="AS_chicon" dst="AS_chirloute" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="chirloute-AS_chirloute_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chicon"/>
-                                       <link_ctn id="link_chirloute"/>
-                       </ASroute><ASroute src="AS_chicon" dst="AS_chimint" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="chimint-AS_chimint_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chicon"/>
-                                       <link_ctn id="link_chimint"/>
-                       </ASroute><ASroute src="AS_chicon" dst="AS_chicon" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="chicon-AS_chicon_router.lille.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_chicon"/>
-                                       <link_ctn id="link_chicon"/>
-                       </ASroute>
-
-                       <ASroute src="AS_chinqchint" dst="gw_AS_lille" gw_src="chinqchint-AS_chinqchint_router.lille.grid5000.fr" gw_dst="gw_lille" symmetrical="NO">
-                                       <link_ctn id="link_chinqchint"/>
-                       </ASroute><ASroute src="AS_chirloute" dst="gw_AS_lille" gw_src="chirloute-AS_chirloute_router.lille.grid5000.fr" gw_dst="gw_lille" symmetrical="NO">
-                                       <link_ctn id="link_chirloute"/>
-                       </ASroute><ASroute src="AS_chimint" dst="gw_AS_lille" gw_src="chimint-AS_chimint_router.lille.grid5000.fr" gw_dst="gw_lille" symmetrical="NO">
-                                       <link_ctn id="link_chimint"/>
-                       </ASroute><ASroute src="AS_chicon" dst="gw_AS_lille" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="gw_lille" symmetrical="NO">
-                                       <link_ctn id="link_chicon"/>
-                       </ASroute>
-
-                       <ASroute src="gw_AS_lille" dst="AS_chinqchint" gw_src="gw_lille" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_chinqchint"/>
-                       </ASroute><ASroute src="gw_AS_lille" dst="AS_chirloute" gw_src="gw_lille" gw_dst="chirloute-AS_chirloute_router.lille.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_chirloute"/>
-                       </ASroute><ASroute src="gw_AS_lille" dst="AS_chimint" gw_src="gw_lille" gw_dst="chimint-AS_chimint_router.lille.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_chimint"/>
-                       </ASroute><ASroute src="gw_AS_lille" dst="AS_chicon" gw_src="gw_lille" gw_dst="chicon-AS_chicon_router.lille.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_chicon"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_lyon" routing="Full">
-                       <cluster id="AS_capricorne" prefix="capricorne-" suffix=".lyon.grid5000.fr" radical="1-56" speed="4.7233E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_capricorne" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_sagittaire" prefix="sagittaire-" suffix=".lyon.grid5000.fr" radical="1-79" speed="5.6693E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_sagittaire" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="gw_AS_lyon" routing="Full">
-                               <router id="gw_lyon"/>
-                       </AS>
-                       <link id="link_gw_lyon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <ASroute src="AS_sagittaire" dst="AS_sagittaire" gw_src="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" gw_dst="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_sagittaire"/>
-                                       <link_ctn id="link_sagittaire"/>
-                       </ASroute><ASroute src="AS_capricorne" dst="AS_sagittaire" gw_src="capricorne-AS_capricorne_router.lyon.grid5000.fr" gw_dst="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_capricorne"/>
-                                       <link_ctn id="link_sagittaire"/>
-                       </ASroute><ASroute src="AS_capricorne" dst="AS_capricorne" gw_src="capricorne-AS_capricorne_router.lyon.grid5000.fr" gw_dst="capricorne-AS_capricorne_router.lyon.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_capricorne"/>
-                                       <link_ctn id="link_capricorne"/>
-                       </ASroute>
-
-                       <ASroute src="AS_sagittaire" dst="gw_AS_lyon" gw_src="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" gw_dst="gw_lyon" symmetrical="NO">
-                                       <link_ctn id="link_sagittaire"/>
-                       </ASroute><ASroute src="AS_capricorne" dst="gw_AS_lyon" gw_src="capricorne-AS_capricorne_router.lyon.grid5000.fr" gw_dst="gw_lyon" symmetrical="NO">
-                                       <link_ctn id="link_capricorne"/>
-                       </ASroute>
-
-                       <ASroute src="gw_AS_lyon" dst="AS_sagittaire" gw_src="gw_lyon" gw_dst="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_sagittaire"/>
-                       </ASroute><ASroute src="gw_AS_lyon" dst="AS_capricorne" gw_src="gw_lyon" gw_dst="capricorne-AS_capricorne_router.lyon.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_capricorne"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_nancy" routing="Full">
-                       <AS id="AS_graphene" routing="Full">
-                               <cluster id="AS_sgraphene1" prefix="graphene-" suffix=".nancy.grid5000.fr" radical="1-39" speed="16.673E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_sgraphene2" prefix="graphene-" suffix=".nancy.grid5000.fr" radical="40-74" speed="16.673E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_sgraphene3" prefix="graphene-" suffix=".nancy.grid5000.fr" radical="75-104" speed="16.673E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_sgraphene4" prefix="graphene-" suffix=".nancy.grid5000.fr" radical="105-144" speed="16.673E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-
-                               <AS id="gw_AS_graphene" routing="Full">
-                                       <router id="graphene-AS_graphene_router.nancy.grid5000.fr"/>
-                               </AS>
-                               <link id="switch-graphene" bandwidth="1250000000Bps" latency="5E-4s"/>
-
-                               <ASroute src="AS_sgraphene4" dst="AS_sgraphene4" gw_src="graphene-AS_sgraphene4_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene4_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene2" dst="AS_sgraphene4" gw_src="graphene-AS_sgraphene2_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene4_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene2" dst="AS_sgraphene2" gw_src="graphene-AS_sgraphene2_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene2_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene3" dst="AS_sgraphene4" gw_src="graphene-AS_sgraphene3_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene4_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene3" dst="AS_sgraphene2" gw_src="graphene-AS_sgraphene3_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene2_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene3" dst="AS_sgraphene3" gw_src="graphene-AS_sgraphene3_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene3_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene1" dst="AS_sgraphene4" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene4_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene1" dst="AS_sgraphene2" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene2_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene1" dst="AS_sgraphene3" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene3_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene1" dst="AS_sgraphene1" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene1_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute>
-                               <ASroute src="AS_sgraphene4" dst="gw_AS_graphene" gw_src="graphene-AS_sgraphene4_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene2" dst="gw_AS_graphene" gw_src="graphene-AS_sgraphene2_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene3" dst="gw_AS_graphene" gw_src="graphene-AS_sgraphene3_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute><ASroute src="AS_sgraphene1" dst="gw_AS_graphene" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-graphene"/>
-                               </ASroute>
-                               </AS>
-                       <link id="link_graphene" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="AS_griffon" routing="Full">
-                               <cluster id="AS_sgriffon1" prefix="griffon-" suffix=".nancy.grid5000.fr" radical="1-29,58-60" speed="20.678E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_sgriffon2" prefix="griffon-" suffix=".nancy.grid5000.fr" radical="30-57" speed="20.678E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_sgriffon3" prefix="griffon-" suffix=".nancy.grid5000.fr" radical="61-92" speed="20.678E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-
-                               <AS id="gw_AS_griffon" routing="Full">
-                                       <router id="griffon-AS_griffon_router.nancy.grid5000.fr"/>
-                               </AS>
-                               <link id="switch-griffon" bandwidth="1250000000Bps" latency="5E-4s"/>
-
-                               <ASroute src="AS_sgriffon1" dst="AS_sgriffon1" gw_src="griffon-AS_sgriffon1_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon1_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-griffon"/>
-                               </ASroute><ASroute src="AS_sgriffon2" dst="AS_sgriffon1" gw_src="griffon-AS_sgriffon2_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon1_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-griffon"/>
-                               </ASroute><ASroute src="AS_sgriffon2" dst="AS_sgriffon2" gw_src="griffon-AS_sgriffon2_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon2_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-griffon"/>
-                               </ASroute><ASroute src="AS_sgriffon3" dst="AS_sgriffon1" gw_src="griffon-AS_sgriffon3_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon1_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-griffon"/>
-                               </ASroute><ASroute src="AS_sgriffon3" dst="AS_sgriffon2" gw_src="griffon-AS_sgriffon3_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon2_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-griffon"/>
-                               </ASroute><ASroute src="AS_sgriffon3" dst="AS_sgriffon3" gw_src="griffon-AS_sgriffon3_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon3_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-griffon"/>
-                               </ASroute>
-                               <ASroute src="AS_sgriffon1" dst="gw_AS_griffon" gw_src="griffon-AS_sgriffon1_router.nancy.grid5000.fr" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-griffon"/>
-                               </ASroute><ASroute src="AS_sgriffon2" dst="gw_AS_griffon" gw_src="griffon-AS_sgriffon2_router.nancy.grid5000.fr" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-griffon"/>
-                               </ASroute><ASroute src="AS_sgriffon3" dst="gw_AS_griffon" gw_src="griffon-AS_sgriffon3_router.nancy.grid5000.fr" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr">
-                                       <link_ctn id="switch-griffon"/>
-                               </ASroute>
-                               </AS>
-                       <link id="link_griffon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="gw_AS_nancy" routing="Full">
-                               <router id="gw_nancy"/>
-                       </AS>
-                       <link id="link_gw_nancy" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <ASroute src="AS_graphene" dst="AS_graphene" gw_src="graphene-AS_graphene_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_graphene"/>
-                                       <link_ctn id="link_graphene"/>
-                       </ASroute><ASroute src="AS_griffon" dst="AS_graphene" gw_src="griffon-AS_griffon_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_griffon"/>
-                                       <link_ctn id="link_graphene"/>
-                       </ASroute><ASroute src="AS_griffon" dst="AS_griffon" gw_src="griffon-AS_griffon_router.nancy.grid5000.fr" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_griffon"/>
-                                       <link_ctn id="link_griffon"/>
-                       </ASroute>
-
-                       <ASroute src="AS_graphene" dst="gw_AS_nancy" gw_src="graphene-AS_graphene_router.nancy.grid5000.fr" gw_dst="gw_nancy" symmetrical="NO">
-                                       <link_ctn id="link_graphene"/>
-                       </ASroute><ASroute src="AS_griffon" dst="gw_AS_nancy" gw_src="griffon-AS_griffon_router.nancy.grid5000.fr" gw_dst="gw_nancy" symmetrical="NO">
-                                       <link_ctn id="link_griffon"/>
-                       </ASroute>
-
-                       <ASroute src="gw_AS_nancy" dst="AS_graphene" gw_src="gw_nancy" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_graphene"/>
-                       </ASroute><ASroute src="gw_AS_nancy" dst="AS_griffon" gw_src="gw_nancy" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_griffon"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_orsay" routing="Full">
-                       <AS id="AS_gdx" routing="Full">
-                               <cluster id="AS_netgear01.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="1-36" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_netgear02.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="37-72" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_netgear03.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="73-108" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_netgear04.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="109-144" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_netgear05.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="145-180" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_netgear06.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="193-216" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_netgear07.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="217-252" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_netgear08.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="253-288" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_procurve-bmc-09.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="289-310" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_switch14.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="181-186" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                               <cluster id="AS_switch15.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="187-192" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-
-                               <AS id="gw_AS_gdx" routing="Full">
-                                       <router id="gdx-AS_gdx_router.orsay.grid5000.fr"/>
-                               </AS>
-                               <link id="switch-gdx" bandwidth="1250000000Bps" latency="5E-4s"/>
-
-                               <ASroute src="AS_procurve-bmc-09.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear06.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear06.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear08.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear08.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear08.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear01.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear01.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_switch15.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear01.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_switch15.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear02.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear01.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_switch15.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear02.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear04.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute>
-                               <ASroute src="AS_procurve-bmc-09.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear06.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear08.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
-                                       <link_ctn id="switch-gdx"/>
-                               </ASroute>
-                               </AS>
-                       <link id="link_gdx" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_netgdx" prefix="netgdx-" suffix=".orsay.grid5000.fr" radical="1-30" speed="4.7144E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_netgdx" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="gw_AS_orsay" routing="Full">
-                               <router id="gw_orsay"/>
-                       </AS>
-                       <link id="link_gw_orsay" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <ASroute src="AS_netgdx" dst="AS_netgdx" gw_src="netgdx-AS_netgdx_router.orsay.grid5000.fr" gw_dst="netgdx-AS_netgdx_router.orsay.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_netgdx"/>
-                                       <link_ctn id="link_netgdx"/>
-                       </ASroute><ASroute src="AS_gdx" dst="AS_netgdx" gw_src="gdx-AS_gdx_router.orsay.grid5000.fr" gw_dst="netgdx-AS_netgdx_router.orsay.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_gdx"/>
-                                       <link_ctn id="link_netgdx"/>
-                       </ASroute><ASroute src="AS_gdx" dst="AS_gdx" gw_src="gdx-AS_gdx_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_gdx"/>
-                                       <link_ctn id="link_gdx"/>
-                       </ASroute>
-
-                       <ASroute src="AS_netgdx" dst="gw_AS_orsay" gw_src="netgdx-AS_netgdx_router.orsay.grid5000.fr" gw_dst="gw_orsay" symmetrical="NO">
-                                       <link_ctn id="link_netgdx"/>
-                       </ASroute><ASroute src="AS_gdx" dst="gw_AS_orsay" gw_src="gdx-AS_gdx_router.orsay.grid5000.fr" gw_dst="gw_orsay" symmetrical="NO">
-                                       <link_ctn id="link_gdx"/>
-                       </ASroute>
-
-                       <ASroute src="gw_AS_orsay" dst="AS_netgdx" gw_src="gw_orsay" gw_dst="netgdx-AS_netgdx_router.orsay.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_netgdx"/>
-                       </ASroute><ASroute src="gw_AS_orsay" dst="AS_gdx" gw_src="gw_orsay" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_gdx"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_rennes" routing="Full">
-                       <cluster id="AS_paradent" prefix="paradent-" suffix=".rennes.grid5000.fr" radical="1-64" speed="21.496E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_paradent" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_paramount" prefix="paramount-" suffix=".rennes.grid5000.fr" radical="1-33" speed="12.910E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_paramount" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_parapide" prefix="parapide-" suffix=".rennes.grid5000.fr" radical="1-25" speed="30.130E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_parapide" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_parapluie" prefix="parapluie-" suffix=".rennes.grid5000.fr" radical="1-40" speed="27.391E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_parapluie" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="gw_AS_rennes" routing="Full">
-                               <router id="gw_rennes"/>
-                       </AS>
-                       <link id="link_gw_rennes" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <ASroute src="AS_paradent" dst="AS_paradent" gw_src="paradent-AS_paradent_router.rennes.grid5000.fr" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_paradent"/>
-                                       <link_ctn id="link_paradent"/>
-                       </ASroute><ASroute src="AS_parapluie" dst="AS_paradent" gw_src="parapluie-AS_parapluie_router.rennes.grid5000.fr" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_parapluie"/>
-                                       <link_ctn id="link_paradent"/>
-                       </ASroute><ASroute src="AS_parapluie" dst="AS_parapluie" gw_src="parapluie-AS_parapluie_router.rennes.grid5000.fr" gw_dst="parapluie-AS_parapluie_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_parapluie"/>
-                                       <link_ctn id="link_parapluie"/>
-                       </ASroute><ASroute src="AS_parapide" dst="AS_paradent" gw_src="parapide-AS_parapide_router.rennes.grid5000.fr" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_parapide"/>
-                                       <link_ctn id="link_paradent"/>
-                       </ASroute><ASroute src="AS_parapide" dst="AS_parapluie" gw_src="parapide-AS_parapide_router.rennes.grid5000.fr" gw_dst="parapluie-AS_parapluie_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_parapide"/>
-                                       <link_ctn id="link_parapluie"/>
-                       </ASroute><ASroute src="AS_parapide" dst="AS_parapide" gw_src="parapide-AS_parapide_router.rennes.grid5000.fr" gw_dst="parapide-AS_parapide_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_parapide"/>
-                                       <link_ctn id="link_parapide"/>
-                       </ASroute><ASroute src="AS_paramount" dst="AS_paradent" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_paramount"/>
-                                       <link_ctn id="link_paradent"/>
-                       </ASroute><ASroute src="AS_paramount" dst="AS_parapluie" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="parapluie-AS_parapluie_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_paramount"/>
-                                       <link_ctn id="link_parapluie"/>
-                       </ASroute><ASroute src="AS_paramount" dst="AS_parapide" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="parapide-AS_parapide_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_paramount"/>
-                                       <link_ctn id="link_parapide"/>
-                       </ASroute><ASroute src="AS_paramount" dst="AS_paramount" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="paramount-AS_paramount_router.rennes.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_paramount"/>
-                                       <link_ctn id="link_paramount"/>
-                       </ASroute>
-
-                       <ASroute src="AS_paradent" dst="gw_AS_rennes" gw_src="paradent-AS_paradent_router.rennes.grid5000.fr" gw_dst="gw_rennes" symmetrical="NO">
-                                       <link_ctn id="link_paradent"/>
-                       </ASroute><ASroute src="AS_parapluie" dst="gw_AS_rennes" gw_src="parapluie-AS_parapluie_router.rennes.grid5000.fr" gw_dst="gw_rennes" symmetrical="NO">
-                                       <link_ctn id="link_parapluie"/>
-                       </ASroute><ASroute src="AS_parapide" dst="gw_AS_rennes" gw_src="parapide-AS_parapide_router.rennes.grid5000.fr" gw_dst="gw_rennes" symmetrical="NO">
-                                       <link_ctn id="link_parapide"/>
-                       </ASroute><ASroute src="AS_paramount" dst="gw_AS_rennes" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="gw_rennes" symmetrical="NO">
-                                       <link_ctn id="link_paramount"/>
-                       </ASroute>
-
-                       <ASroute src="gw_AS_rennes" dst="AS_paradent" gw_src="gw_rennes" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_paradent"/>
-                       </ASroute><ASroute src="gw_AS_rennes" dst="AS_parapluie" gw_src="gw_rennes" gw_dst="parapluie-AS_parapluie_router.rennes.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_parapluie"/>
-                       </ASroute><ASroute src="gw_AS_rennes" dst="AS_parapide" gw_src="gw_rennes" gw_dst="parapide-AS_parapide_router.rennes.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_parapide"/>
-                       </ASroute><ASroute src="gw_AS_rennes" dst="AS_paramount" gw_src="gw_rennes" gw_dst="paramount-AS_paramount_router.rennes.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_paramount"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_sophia" routing="Full">
-                       <cluster id="AS_helios" prefix="helios-" suffix=".sophia.grid5000.fr" radical="1-56" speed="7.7318E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_helios" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_sol" prefix="sol-" suffix=".sophia.grid5000.fr" radical="1-50" speed="8.9388E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_sol" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_suno" prefix="suno-" suffix=".sophia.grid5000.fr" radical="1-45" speed="23.530E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_suno" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="gw_AS_sophia" routing="Full">
-                               <router id="gw_sophia"/>
-                       </AS>
-                       <link id="link_gw_sophia" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <ASroute src="AS_sol" dst="AS_sol" gw_src="sol-AS_sol_router.sophia.grid5000.fr" gw_dst="sol-AS_sol_router.sophia.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_sol"/>
-                                       <link_ctn id="link_sol"/>
-                       </ASroute><ASroute src="AS_helios" dst="AS_sol" gw_src="helios-AS_helios_router.sophia.grid5000.fr" gw_dst="sol-AS_sol_router.sophia.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_helios"/>
-                                       <link_ctn id="link_sol"/>
-                       </ASroute><ASroute src="AS_helios" dst="AS_helios" gw_src="helios-AS_helios_router.sophia.grid5000.fr" gw_dst="helios-AS_helios_router.sophia.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_helios"/>
-                                       <link_ctn id="link_helios"/>
-                       </ASroute><ASroute src="AS_suno" dst="AS_sol" gw_src="suno-AS_suno_router.sophia.grid5000.fr" gw_dst="sol-AS_sol_router.sophia.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_suno"/>
-                                       <link_ctn id="link_sol"/>
-                       </ASroute><ASroute src="AS_suno" dst="AS_helios" gw_src="suno-AS_suno_router.sophia.grid5000.fr" gw_dst="helios-AS_helios_router.sophia.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_suno"/>
-                                       <link_ctn id="link_helios"/>
-                       </ASroute><ASroute src="AS_suno" dst="AS_suno" gw_src="suno-AS_suno_router.sophia.grid5000.fr" gw_dst="suno-AS_suno_router.sophia.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_suno"/>
-                                       <link_ctn id="link_suno"/>
-                       </ASroute>
-
-                       <ASroute src="AS_sol" dst="gw_AS_sophia" gw_src="sol-AS_sol_router.sophia.grid5000.fr" gw_dst="gw_sophia" symmetrical="NO">
-                                       <link_ctn id="link_sol"/>
-                       </ASroute><ASroute src="AS_helios" dst="gw_AS_sophia" gw_src="helios-AS_helios_router.sophia.grid5000.fr" gw_dst="gw_sophia" symmetrical="NO">
-                                       <link_ctn id="link_helios"/>
-                       </ASroute><ASroute src="AS_suno" dst="gw_AS_sophia" gw_src="suno-AS_suno_router.sophia.grid5000.fr" gw_dst="gw_sophia" symmetrical="NO">
-                                       <link_ctn id="link_suno"/>
-                       </ASroute>
-
-                       <ASroute src="gw_AS_sophia" dst="AS_sol" gw_src="gw_sophia" gw_dst="sol-AS_sol_router.sophia.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_sol"/>
-                       </ASroute><ASroute src="gw_AS_sophia" dst="AS_helios" gw_src="gw_sophia" gw_dst="helios-AS_helios_router.sophia.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_helios"/>
-                       </ASroute><ASroute src="gw_AS_sophia" dst="AS_suno" gw_src="gw_sophia" gw_dst="suno-AS_suno_router.sophia.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_suno"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_toulouse" routing="Full">
-                       <cluster id="AS_pastel" prefix="pastel-" suffix=".toulouse.grid5000.fr" radical="1-80" speed="9.5674E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_pastel" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <cluster id="AS_violette" prefix="violette-" suffix=".toulouse.grid5000.fr" radical="1-52" speed="5.1143E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
-                       <link id="link_violette" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <AS id="gw_AS_toulouse" routing="Full">
-                               <router id="gw_toulouse"/>
-                       </AS>
-                       <link id="link_gw_toulouse" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
-
-                       <ASroute src="AS_pastel" dst="AS_pastel" gw_src="pastel-AS_pastel_router.toulouse.grid5000.fr" gw_dst="pastel-AS_pastel_router.toulouse.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_pastel"/>
-                                       <link_ctn id="link_pastel"/>
-                       </ASroute><ASroute src="AS_violette" dst="AS_pastel" gw_src="violette-AS_violette_router.toulouse.grid5000.fr" gw_dst="pastel-AS_pastel_router.toulouse.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_violette"/>
-                                       <link_ctn id="link_pastel"/>
-                       </ASroute><ASroute src="AS_violette" dst="AS_violette" gw_src="violette-AS_violette_router.toulouse.grid5000.fr" gw_dst="violette-AS_violette_router.toulouse.grid5000.fr" symmetrical="YES">
-                                       <link_ctn id="link_violette"/>
-                                       <link_ctn id="link_violette"/>
-                       </ASroute>
-
-                       <ASroute src="AS_pastel" dst="gw_AS_toulouse" gw_src="pastel-AS_pastel_router.toulouse.grid5000.fr" gw_dst="gw_toulouse" symmetrical="NO">
-                                       <link_ctn id="link_pastel"/>
-                       </ASroute><ASroute src="AS_violette" dst="gw_AS_toulouse" gw_src="violette-AS_violette_router.toulouse.grid5000.fr" gw_dst="gw_toulouse" symmetrical="NO">
-                                       <link_ctn id="link_violette"/>
-                       </ASroute>
-
-                       <ASroute src="gw_AS_toulouse" dst="AS_pastel" gw_src="gw_toulouse" gw_dst="pastel-AS_pastel_router.toulouse.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_pastel"/>
-                       </ASroute><ASroute src="gw_AS_toulouse" dst="AS_violette" gw_src="gw_toulouse" gw_dst="violette-AS_violette_router.toulouse.grid5000.fr" symmetrical="NO">
-                                       <link_ctn id="link_violette"/>
-                       </ASroute>
-
-               </AS>
-               <ASroute src="AS_toulouse" dst="AS_interne" gw_src="gw_toulouse" gw_dst="toulouse" symmetrical="YES">
-                       <link_ctn id="link_gw_toulouse"/>
-               </ASroute>
-               <ASroute src="AS_sophia" dst="AS_interne" gw_src="gw_sophia" gw_dst="sophia" symmetrical="YES">
-                       <link_ctn id="link_gw_sophia"/>
-               </ASroute>
-               <ASroute src="AS_rennes" dst="AS_interne" gw_src="gw_rennes" gw_dst="rennes" symmetrical="YES">
-                       <link_ctn id="link_gw_rennes"/>
-               </ASroute>
-               <ASroute src="AS_orsay" dst="AS_interne" gw_src="gw_orsay" gw_dst="paris" symmetrical="YES">
-                       <link_ctn id="link_gw_orsay"/>
-               </ASroute>
-               <ASroute src="AS_nancy" dst="AS_interne" gw_src="gw_nancy" gw_dst="nancy" symmetrical="YES">
-                       <link_ctn id="link_gw_nancy"/>
-               </ASroute>
-               <ASroute src="AS_lyon" dst="AS_interne" gw_src="gw_lyon" gw_dst="lyon" symmetrical="YES">
-                       <link_ctn id="link_gw_lyon"/>
-               </ASroute>
-               <ASroute src="AS_lille" dst="AS_interne" gw_src="gw_lille" gw_dst="lille" symmetrical="YES">
-                       <link_ctn id="link_gw_lille"/>
-               </ASroute>
-               <ASroute src="AS_grenoble" dst="AS_interne" gw_src="gw_grenoble" gw_dst="grenoble" symmetrical="YES">
-                       <link_ctn id="link_gw_grenoble"/>
-               </ASroute>
-               <ASroute src="AS_bordeaux" dst="AS_interne" gw_src="gw_bordeaux" gw_dst="bordeaux" symmetrical="YES">
-                       <link_ctn id="link_gw_bordeaux"/>
-               </ASroute>
-       </AS>
+  <AS id="AS_grid5000" routing="Floyd">
+    <AS id="AS_interne" routing="Floyd">
+      <router id="lille"/>
+      <router id="paris"/>
+      <router id="nancy"/>
+      <router id="rennes"/>
+      <router id="lyon"/>
+      <router id="bordeaux"/>
+      <router id="grenoble"/>
+      <router id="marseille"/>
+      <router id="toulouse"/>
+      <router id="sophia"/>
+
+      <link id="Lille_Paris" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+      <link id="Paris_Nancy" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+      <link id="Paris_Rennes" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+      <link id="Paris_Lyon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+      <link id="Bordeaux_Lyon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+      <link id="Lyon_Grenoble" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+      <link id="Lyon_Marseille" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+      <link id="Marseille_Sophia" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+      <link id="Marseille_Toulouse" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <route src="lille" dst="paris"><link_ctn id="Lille_Paris"/></route>
+      <route src="paris" dst="nancy"><link_ctn id="Paris_Nancy"/></route>
+      <route src="paris" dst="rennes"><link_ctn id="Paris_Rennes"/></route>
+      <route src="paris" dst="lyon"><link_ctn id="Paris_Lyon"/></route>
+      <route src="bordeaux" dst="lyon"><link_ctn id="Bordeaux_Lyon"/></route>
+      <route src="lyon" dst="grenoble"><link_ctn id="Lyon_Grenoble"/></route>
+      <route src="lyon" dst="marseille"><link_ctn id="Lyon_Marseille"/></route>
+      <route src="marseille" dst="sophia"><link_ctn id="Marseille_Sophia"/></route>
+      <route src="marseille" dst="toulouse"><link_ctn id="Marseille_Toulouse"/></route>
+    </AS>
+    <AS id="AS_bordeaux" routing="Full">
+      <cluster id="AS_bordeplage" prefix="bordeplage-" suffix=".bordeaux.grid5000.fr" radical="1-51" speed="5.2297E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_bordeplage" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_bordereau" prefix="bordereau-" suffix=".bordeaux.grid5000.fr" radical="1-93" speed="8.8925E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_bordereau" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_borderline" prefix="borderline-" suffix=".bordeaux.grid5000.fr" radical="1-10" speed="13.357E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_borderline" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="gw_AS_bordeaux" routing="Full">
+        <router id="gw_bordeaux"/>
+      </AS>
+      <link id="link_gw_bordeaux" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <ASroute src="AS_bordereau" dst="AS_bordereau" gw_src="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" gw_dst="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_bordereau"/>
+          <link_ctn id="link_bordereau"/>
+      </ASroute><ASroute src="AS_bordeplage" dst="AS_bordereau" gw_src="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" gw_dst="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_bordeplage"/>
+          <link_ctn id="link_bordereau"/>
+      </ASroute><ASroute src="AS_bordeplage" dst="AS_bordeplage" gw_src="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" gw_dst="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_bordeplage"/>
+          <link_ctn id="link_bordeplage"/>
+      </ASroute><ASroute src="AS_borderline" dst="AS_bordereau" gw_src="borderline-AS_borderline_router.bordeaux.grid5000.fr" gw_dst="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_borderline"/>
+          <link_ctn id="link_bordereau"/>
+      </ASroute><ASroute src="AS_borderline" dst="AS_bordeplage" gw_src="borderline-AS_borderline_router.bordeaux.grid5000.fr" gw_dst="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_borderline"/>
+          <link_ctn id="link_bordeplage"/>
+      </ASroute><ASroute src="AS_borderline" dst="AS_borderline" gw_src="borderline-AS_borderline_router.bordeaux.grid5000.fr" gw_dst="borderline-AS_borderline_router.bordeaux.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_borderline"/>
+          <link_ctn id="link_borderline"/>
+      </ASroute>
+
+      <ASroute src="AS_bordereau" dst="gw_AS_bordeaux" gw_src="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" gw_dst="gw_bordeaux" symmetrical="NO">
+          <link_ctn id="link_bordereau"/>
+      </ASroute><ASroute src="AS_bordeplage" dst="gw_AS_bordeaux" gw_src="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" gw_dst="gw_bordeaux" symmetrical="NO">
+          <link_ctn id="link_bordeplage"/>
+      </ASroute><ASroute src="AS_borderline" dst="gw_AS_bordeaux" gw_src="borderline-AS_borderline_router.bordeaux.grid5000.fr" gw_dst="gw_bordeaux" symmetrical="NO">
+          <link_ctn id="link_borderline"/>
+      </ASroute>
+
+      <ASroute src="gw_AS_bordeaux" dst="AS_bordereau" gw_src="gw_bordeaux" gw_dst="bordereau-AS_bordereau_router.bordeaux.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_bordereau"/>
+      </ASroute><ASroute src="gw_AS_bordeaux" dst="AS_bordeplage" gw_src="gw_bordeaux" gw_dst="bordeplage-AS_bordeplage_router.bordeaux.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_bordeplage"/>
+      </ASroute><ASroute src="gw_AS_bordeaux" dst="AS_borderline" gw_src="gw_bordeaux" gw_dst="borderline-AS_borderline_router.bordeaux.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_borderline"/>
+      </ASroute>
+
+    </AS>
+    <AS id="AS_grenoble" routing="Full">
+      <cluster id="AS_adonis" prefix="adonis-" suffix=".grenoble.grid5000.fr" radical="1-12" speed="23.681E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_adonis" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_edel" prefix="edel-" suffix=".grenoble.grid5000.fr" radical="1-72" speed="23.492E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_edel" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_genepi" prefix="genepi-" suffix=".grenoble.grid5000.fr" radical="1-34" speed="21.175E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_genepi" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="gw_AS_grenoble" routing="Full">
+        <router id="gw_grenoble"/>
+      </AS>
+      <link id="link_gw_grenoble" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <ASroute src="AS_adonis" dst="AS_adonis" gw_src="adonis-AS_adonis_router.grenoble.grid5000.fr" gw_dst="adonis-AS_adonis_router.grenoble.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_adonis"/>
+          <link_ctn id="link_adonis"/>
+      </ASroute><ASroute src="AS_genepi" dst="AS_adonis" gw_src="genepi-AS_genepi_router.grenoble.grid5000.fr" gw_dst="adonis-AS_adonis_router.grenoble.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_genepi"/>
+          <link_ctn id="link_adonis"/>
+      </ASroute><ASroute src="AS_genepi" dst="AS_genepi" gw_src="genepi-AS_genepi_router.grenoble.grid5000.fr" gw_dst="genepi-AS_genepi_router.grenoble.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_genepi"/>
+          <link_ctn id="link_genepi"/>
+      </ASroute><ASroute src="AS_edel" dst="AS_adonis" gw_src="edel-AS_edel_router.grenoble.grid5000.fr" gw_dst="adonis-AS_adonis_router.grenoble.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_edel"/>
+          <link_ctn id="link_adonis"/>
+      </ASroute><ASroute src="AS_edel" dst="AS_genepi" gw_src="edel-AS_edel_router.grenoble.grid5000.fr" gw_dst="genepi-AS_genepi_router.grenoble.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_edel"/>
+          <link_ctn id="link_genepi"/>
+      </ASroute><ASroute src="AS_edel" dst="AS_edel" gw_src="edel-AS_edel_router.grenoble.grid5000.fr" gw_dst="edel-AS_edel_router.grenoble.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_edel"/>
+          <link_ctn id="link_edel"/>
+      </ASroute>
+
+      <ASroute src="AS_adonis" dst="gw_AS_grenoble" gw_src="adonis-AS_adonis_router.grenoble.grid5000.fr" gw_dst="gw_grenoble" symmetrical="NO">
+          <link_ctn id="link_adonis"/>
+      </ASroute><ASroute src="AS_genepi" dst="gw_AS_grenoble" gw_src="genepi-AS_genepi_router.grenoble.grid5000.fr" gw_dst="gw_grenoble" symmetrical="NO">
+          <link_ctn id="link_genepi"/>
+      </ASroute><ASroute src="AS_edel" dst="gw_AS_grenoble" gw_src="edel-AS_edel_router.grenoble.grid5000.fr" gw_dst="gw_grenoble" symmetrical="NO">
+          <link_ctn id="link_edel"/>
+      </ASroute>
+
+      <ASroute src="gw_AS_grenoble" dst="AS_adonis" gw_src="gw_grenoble" gw_dst="adonis-AS_adonis_router.grenoble.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_adonis"/>
+      </ASroute><ASroute src="gw_AS_grenoble" dst="AS_genepi" gw_src="gw_grenoble" gw_dst="genepi-AS_genepi_router.grenoble.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_genepi"/>
+      </ASroute><ASroute src="gw_AS_grenoble" dst="AS_edel" gw_src="gw_grenoble" gw_dst="edel-AS_edel_router.grenoble.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_edel"/>
+      </ASroute>
+
+    </AS>
+    <AS id="AS_lille" routing="Full">
+      <cluster id="AS_chicon" prefix="chicon-" suffix=".lille.grid5000.fr" radical="1-26" speed="8.9618E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_chicon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_chimint" prefix="chimint-" suffix=".lille.grid5000.fr" radical="1-20" speed="23.531E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_chimint" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_chinqchint" prefix="chinqchint-" suffix=".lille.grid5000.fr" radical="1-46" speed="22.270E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_chinqchint" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_chirloute" prefix="chirloute-" suffix=".lille.grid5000.fr" radical="1-8" speed="24.473E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_chirloute" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="gw_AS_lille" routing="Full">
+        <router id="gw_lille"/>
+      </AS>
+      <link id="link_gw_lille" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <ASroute src="AS_chinqchint" dst="AS_chinqchint" gw_src="chinqchint-AS_chinqchint_router.lille.grid5000.fr" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chinqchint"/>
+          <link_ctn id="link_chinqchint"/>
+      </ASroute><ASroute src="AS_chirloute" dst="AS_chinqchint" gw_src="chirloute-AS_chirloute_router.lille.grid5000.fr" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chirloute"/>
+          <link_ctn id="link_chinqchint"/>
+      </ASroute><ASroute src="AS_chirloute" dst="AS_chirloute" gw_src="chirloute-AS_chirloute_router.lille.grid5000.fr" gw_dst="chirloute-AS_chirloute_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chirloute"/>
+          <link_ctn id="link_chirloute"/>
+      </ASroute><ASroute src="AS_chimint" dst="AS_chinqchint" gw_src="chimint-AS_chimint_router.lille.grid5000.fr" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chimint"/>
+          <link_ctn id="link_chinqchint"/>
+      </ASroute><ASroute src="AS_chimint" dst="AS_chirloute" gw_src="chimint-AS_chimint_router.lille.grid5000.fr" gw_dst="chirloute-AS_chirloute_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chimint"/>
+          <link_ctn id="link_chirloute"/>
+      </ASroute><ASroute src="AS_chimint" dst="AS_chimint" gw_src="chimint-AS_chimint_router.lille.grid5000.fr" gw_dst="chimint-AS_chimint_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chimint"/>
+          <link_ctn id="link_chimint"/>
+      </ASroute><ASroute src="AS_chicon" dst="AS_chinqchint" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chicon"/>
+          <link_ctn id="link_chinqchint"/>
+      </ASroute><ASroute src="AS_chicon" dst="AS_chirloute" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="chirloute-AS_chirloute_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chicon"/>
+          <link_ctn id="link_chirloute"/>
+      </ASroute><ASroute src="AS_chicon" dst="AS_chimint" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="chimint-AS_chimint_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chicon"/>
+          <link_ctn id="link_chimint"/>
+      </ASroute><ASroute src="AS_chicon" dst="AS_chicon" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="chicon-AS_chicon_router.lille.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_chicon"/>
+          <link_ctn id="link_chicon"/>
+      </ASroute>
+
+      <ASroute src="AS_chinqchint" dst="gw_AS_lille" gw_src="chinqchint-AS_chinqchint_router.lille.grid5000.fr" gw_dst="gw_lille" symmetrical="NO">
+          <link_ctn id="link_chinqchint"/>
+      </ASroute><ASroute src="AS_chirloute" dst="gw_AS_lille" gw_src="chirloute-AS_chirloute_router.lille.grid5000.fr" gw_dst="gw_lille" symmetrical="NO">
+          <link_ctn id="link_chirloute"/>
+      </ASroute><ASroute src="AS_chimint" dst="gw_AS_lille" gw_src="chimint-AS_chimint_router.lille.grid5000.fr" gw_dst="gw_lille" symmetrical="NO">
+          <link_ctn id="link_chimint"/>
+      </ASroute><ASroute src="AS_chicon" dst="gw_AS_lille" gw_src="chicon-AS_chicon_router.lille.grid5000.fr" gw_dst="gw_lille" symmetrical="NO">
+          <link_ctn id="link_chicon"/>
+      </ASroute>
+
+      <ASroute src="gw_AS_lille" dst="AS_chinqchint" gw_src="gw_lille" gw_dst="chinqchint-AS_chinqchint_router.lille.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_chinqchint"/>
+      </ASroute><ASroute src="gw_AS_lille" dst="AS_chirloute" gw_src="gw_lille" gw_dst="chirloute-AS_chirloute_router.lille.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_chirloute"/>
+      </ASroute><ASroute src="gw_AS_lille" dst="AS_chimint" gw_src="gw_lille" gw_dst="chimint-AS_chimint_router.lille.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_chimint"/>
+      </ASroute><ASroute src="gw_AS_lille" dst="AS_chicon" gw_src="gw_lille" gw_dst="chicon-AS_chicon_router.lille.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_chicon"/>
+      </ASroute>
+
+    </AS>
+    <AS id="AS_lyon" routing="Full">
+      <cluster id="AS_capricorne" prefix="capricorne-" suffix=".lyon.grid5000.fr" radical="1-56" speed="4.7233E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_capricorne" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_sagittaire" prefix="sagittaire-" suffix=".lyon.grid5000.fr" radical="1-79" speed="5.6693E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_sagittaire" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="gw_AS_lyon" routing="Full">
+        <router id="gw_lyon"/>
+      </AS>
+      <link id="link_gw_lyon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <ASroute src="AS_sagittaire" dst="AS_sagittaire" gw_src="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" gw_dst="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_sagittaire"/>
+          <link_ctn id="link_sagittaire"/>
+      </ASroute><ASroute src="AS_capricorne" dst="AS_sagittaire" gw_src="capricorne-AS_capricorne_router.lyon.grid5000.fr" gw_dst="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_capricorne"/>
+          <link_ctn id="link_sagittaire"/>
+      </ASroute><ASroute src="AS_capricorne" dst="AS_capricorne" gw_src="capricorne-AS_capricorne_router.lyon.grid5000.fr" gw_dst="capricorne-AS_capricorne_router.lyon.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_capricorne"/>
+          <link_ctn id="link_capricorne"/>
+      </ASroute>
+
+      <ASroute src="AS_sagittaire" dst="gw_AS_lyon" gw_src="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" gw_dst="gw_lyon" symmetrical="NO">
+          <link_ctn id="link_sagittaire"/>
+      </ASroute><ASroute src="AS_capricorne" dst="gw_AS_lyon" gw_src="capricorne-AS_capricorne_router.lyon.grid5000.fr" gw_dst="gw_lyon" symmetrical="NO">
+          <link_ctn id="link_capricorne"/>
+      </ASroute>
+
+      <ASroute src="gw_AS_lyon" dst="AS_sagittaire" gw_src="gw_lyon" gw_dst="sagittaire-AS_sagittaire_router.lyon.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_sagittaire"/>
+      </ASroute><ASroute src="gw_AS_lyon" dst="AS_capricorne" gw_src="gw_lyon" gw_dst="capricorne-AS_capricorne_router.lyon.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_capricorne"/>
+      </ASroute>
+
+    </AS>
+    <AS id="AS_nancy" routing="Full">
+      <AS id="AS_graphene" routing="Full">
+        <cluster id="AS_sgraphene1" prefix="graphene-" suffix=".nancy.grid5000.fr" radical="1-39" speed="16.673E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_sgraphene2" prefix="graphene-" suffix=".nancy.grid5000.fr" radical="40-74" speed="16.673E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_sgraphene3" prefix="graphene-" suffix=".nancy.grid5000.fr" radical="75-104" speed="16.673E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_sgraphene4" prefix="graphene-" suffix=".nancy.grid5000.fr" radical="105-144" speed="16.673E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+
+        <AS id="gw_AS_graphene" routing="Full">
+          <router id="graphene-AS_graphene_router.nancy.grid5000.fr"/>
+        </AS>
+        <link id="switch-graphene" bandwidth="1250000000Bps" latency="5E-4s"/>
+
+        <ASroute src="AS_sgraphene4" dst="AS_sgraphene4" gw_src="graphene-AS_sgraphene4_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene4_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene2" dst="AS_sgraphene4" gw_src="graphene-AS_sgraphene2_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene4_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene2" dst="AS_sgraphene2" gw_src="graphene-AS_sgraphene2_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene2_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene3" dst="AS_sgraphene4" gw_src="graphene-AS_sgraphene3_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene4_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene3" dst="AS_sgraphene2" gw_src="graphene-AS_sgraphene3_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene2_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene3" dst="AS_sgraphene3" gw_src="graphene-AS_sgraphene3_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene3_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene1" dst="AS_sgraphene4" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene4_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene1" dst="AS_sgraphene2" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene2_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene1" dst="AS_sgraphene3" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene3_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene1" dst="AS_sgraphene1" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_sgraphene1_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute>
+        <ASroute src="AS_sgraphene4" dst="gw_AS_graphene" gw_src="graphene-AS_sgraphene4_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene2" dst="gw_AS_graphene" gw_src="graphene-AS_sgraphene2_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene3" dst="gw_AS_graphene" gw_src="graphene-AS_sgraphene3_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute><ASroute src="AS_sgraphene1" dst="gw_AS_graphene" gw_src="graphene-AS_sgraphene1_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr">
+          <link_ctn id="switch-graphene"/>
+        </ASroute>
+        </AS>
+      <link id="link_graphene" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="AS_griffon" routing="Full">
+        <cluster id="AS_sgriffon1" prefix="griffon-" suffix=".nancy.grid5000.fr" radical="1-29,58-60" speed="20.678E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_sgriffon2" prefix="griffon-" suffix=".nancy.grid5000.fr" radical="30-57" speed="20.678E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_sgriffon3" prefix="griffon-" suffix=".nancy.grid5000.fr" radical="61-92" speed="20.678E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+
+        <AS id="gw_AS_griffon" routing="Full">
+          <router id="griffon-AS_griffon_router.nancy.grid5000.fr"/>
+        </AS>
+        <link id="switch-griffon" bandwidth="1250000000Bps" latency="5E-4s"/>
+
+        <ASroute src="AS_sgriffon1" dst="AS_sgriffon1" gw_src="griffon-AS_sgriffon1_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon1_router.nancy.grid5000.fr">
+          <link_ctn id="switch-griffon"/>
+        </ASroute><ASroute src="AS_sgriffon2" dst="AS_sgriffon1" gw_src="griffon-AS_sgriffon2_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon1_router.nancy.grid5000.fr">
+          <link_ctn id="switch-griffon"/>
+        </ASroute><ASroute src="AS_sgriffon2" dst="AS_sgriffon2" gw_src="griffon-AS_sgriffon2_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon2_router.nancy.grid5000.fr">
+          <link_ctn id="switch-griffon"/>
+        </ASroute><ASroute src="AS_sgriffon3" dst="AS_sgriffon1" gw_src="griffon-AS_sgriffon3_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon1_router.nancy.grid5000.fr">
+          <link_ctn id="switch-griffon"/>
+        </ASroute><ASroute src="AS_sgriffon3" dst="AS_sgriffon2" gw_src="griffon-AS_sgriffon3_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon2_router.nancy.grid5000.fr">
+          <link_ctn id="switch-griffon"/>
+        </ASroute><ASroute src="AS_sgriffon3" dst="AS_sgriffon3" gw_src="griffon-AS_sgriffon3_router.nancy.grid5000.fr" gw_dst="griffon-AS_sgriffon3_router.nancy.grid5000.fr">
+          <link_ctn id="switch-griffon"/>
+        </ASroute>
+        <ASroute src="AS_sgriffon1" dst="gw_AS_griffon" gw_src="griffon-AS_sgriffon1_router.nancy.grid5000.fr" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr">
+          <link_ctn id="switch-griffon"/>
+        </ASroute><ASroute src="AS_sgriffon2" dst="gw_AS_griffon" gw_src="griffon-AS_sgriffon2_router.nancy.grid5000.fr" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr">
+          <link_ctn id="switch-griffon"/>
+        </ASroute><ASroute src="AS_sgriffon3" dst="gw_AS_griffon" gw_src="griffon-AS_sgriffon3_router.nancy.grid5000.fr" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr">
+          <link_ctn id="switch-griffon"/>
+        </ASroute>
+        </AS>
+      <link id="link_griffon" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="gw_AS_nancy" routing="Full">
+        <router id="gw_nancy"/>
+      </AS>
+      <link id="link_gw_nancy" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <ASroute src="AS_graphene" dst="AS_graphene" gw_src="graphene-AS_graphene_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_graphene"/>
+          <link_ctn id="link_graphene"/>
+      </ASroute><ASroute src="AS_griffon" dst="AS_graphene" gw_src="griffon-AS_griffon_router.nancy.grid5000.fr" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_griffon"/>
+          <link_ctn id="link_graphene"/>
+      </ASroute><ASroute src="AS_griffon" dst="AS_griffon" gw_src="griffon-AS_griffon_router.nancy.grid5000.fr" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_griffon"/>
+          <link_ctn id="link_griffon"/>
+      </ASroute>
+
+      <ASroute src="AS_graphene" dst="gw_AS_nancy" gw_src="graphene-AS_graphene_router.nancy.grid5000.fr" gw_dst="gw_nancy" symmetrical="NO">
+          <link_ctn id="link_graphene"/>
+      </ASroute><ASroute src="AS_griffon" dst="gw_AS_nancy" gw_src="griffon-AS_griffon_router.nancy.grid5000.fr" gw_dst="gw_nancy" symmetrical="NO">
+          <link_ctn id="link_griffon"/>
+      </ASroute>
+
+      <ASroute src="gw_AS_nancy" dst="AS_graphene" gw_src="gw_nancy" gw_dst="graphene-AS_graphene_router.nancy.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_graphene"/>
+      </ASroute><ASroute src="gw_AS_nancy" dst="AS_griffon" gw_src="gw_nancy" gw_dst="griffon-AS_griffon_router.nancy.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_griffon"/>
+      </ASroute>
+
+    </AS>
+    <AS id="AS_orsay" routing="Full">
+      <AS id="AS_gdx" routing="Full">
+        <cluster id="AS_netgear01.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="1-36" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_netgear02.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="37-72" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_netgear03.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="73-108" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_netgear04.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="109-144" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_netgear05.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="145-180" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_netgear06.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="193-216" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_netgear07.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="217-252" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_netgear08.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="253-288" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_procurve-bmc-09.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="289-310" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_switch14.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="181-186" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+        <cluster id="AS_switch15.orsay.grid5000.fr" prefix="gdx-" suffix=".orsay.grid5000.fr" radical="187-192" speed="4.7153E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+
+        <AS id="gw_AS_gdx" routing="Full">
+          <router id="gdx-AS_gdx_router.orsay.grid5000.fr"/>
+        </AS>
+        <link id="switch-gdx" bandwidth="1250000000Bps" latency="5E-4s"/>
+
+        <ASroute src="AS_procurve-bmc-09.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear06.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear06.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear08.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear08.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear08.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="AS_netgear01.orsay.grid5000.fr" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_netgear01.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="AS_switch15.orsay.grid5000.fr" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear01.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_switch15.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="AS_netgear02.orsay.grid5000.fr" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_procurve-bmc-09.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear06.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear08.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_switch14.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear05.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear03.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear07.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear01.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_switch15.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear02.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="AS_netgear04.orsay.grid5000.fr" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute>
+        <ASroute src="AS_procurve-bmc-09.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_procurve-bmc-09.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear06.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear06.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear08.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear08.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch14.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_switch14.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear05.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear05.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear03.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear03.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear07.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear07.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear01.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear01.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_switch15.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_switch15.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear02.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear02.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute><ASroute src="AS_netgear04.orsay.grid5000.fr" dst="gw_AS_gdx" gw_src="gdx-AS_netgear04.orsay.grid5000.fr_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr">
+          <link_ctn id="switch-gdx"/>
+        </ASroute>
+        </AS>
+      <link id="link_gdx" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_netgdx" prefix="netgdx-" suffix=".orsay.grid5000.fr" radical="1-30" speed="4.7144E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_netgdx" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="gw_AS_orsay" routing="Full">
+        <router id="gw_orsay"/>
+      </AS>
+      <link id="link_gw_orsay" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <ASroute src="AS_netgdx" dst="AS_netgdx" gw_src="netgdx-AS_netgdx_router.orsay.grid5000.fr" gw_dst="netgdx-AS_netgdx_router.orsay.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_netgdx"/>
+          <link_ctn id="link_netgdx"/>
+      </ASroute><ASroute src="AS_gdx" dst="AS_netgdx" gw_src="gdx-AS_gdx_router.orsay.grid5000.fr" gw_dst="netgdx-AS_netgdx_router.orsay.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_gdx"/>
+          <link_ctn id="link_netgdx"/>
+      </ASroute><ASroute src="AS_gdx" dst="AS_gdx" gw_src="gdx-AS_gdx_router.orsay.grid5000.fr" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_gdx"/>
+          <link_ctn id="link_gdx"/>
+      </ASroute>
+
+      <ASroute src="AS_netgdx" dst="gw_AS_orsay" gw_src="netgdx-AS_netgdx_router.orsay.grid5000.fr" gw_dst="gw_orsay" symmetrical="NO">
+          <link_ctn id="link_netgdx"/>
+      </ASroute><ASroute src="AS_gdx" dst="gw_AS_orsay" gw_src="gdx-AS_gdx_router.orsay.grid5000.fr" gw_dst="gw_orsay" symmetrical="NO">
+          <link_ctn id="link_gdx"/>
+      </ASroute>
+
+      <ASroute src="gw_AS_orsay" dst="AS_netgdx" gw_src="gw_orsay" gw_dst="netgdx-AS_netgdx_router.orsay.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_netgdx"/>
+      </ASroute><ASroute src="gw_AS_orsay" dst="AS_gdx" gw_src="gw_orsay" gw_dst="gdx-AS_gdx_router.orsay.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_gdx"/>
+      </ASroute>
+
+    </AS>
+    <AS id="AS_rennes" routing="Full">
+      <cluster id="AS_paradent" prefix="paradent-" suffix=".rennes.grid5000.fr" radical="1-64" speed="21.496E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_paradent" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_paramount" prefix="paramount-" suffix=".rennes.grid5000.fr" radical="1-33" speed="12.910E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_paramount" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_parapide" prefix="parapide-" suffix=".rennes.grid5000.fr" radical="1-25" speed="30.130E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_parapide" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_parapluie" prefix="parapluie-" suffix=".rennes.grid5000.fr" radical="1-40" speed="27.391E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_parapluie" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="gw_AS_rennes" routing="Full">
+        <router id="gw_rennes"/>
+      </AS>
+      <link id="link_gw_rennes" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <ASroute src="AS_paradent" dst="AS_paradent" gw_src="paradent-AS_paradent_router.rennes.grid5000.fr" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_paradent"/>
+          <link_ctn id="link_paradent"/>
+      </ASroute><ASroute src="AS_parapluie" dst="AS_paradent" gw_src="parapluie-AS_parapluie_router.rennes.grid5000.fr" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_parapluie"/>
+          <link_ctn id="link_paradent"/>
+      </ASroute><ASroute src="AS_parapluie" dst="AS_parapluie" gw_src="parapluie-AS_parapluie_router.rennes.grid5000.fr" gw_dst="parapluie-AS_parapluie_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_parapluie"/>
+          <link_ctn id="link_parapluie"/>
+      </ASroute><ASroute src="AS_parapide" dst="AS_paradent" gw_src="parapide-AS_parapide_router.rennes.grid5000.fr" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_parapide"/>
+          <link_ctn id="link_paradent"/>
+      </ASroute><ASroute src="AS_parapide" dst="AS_parapluie" gw_src="parapide-AS_parapide_router.rennes.grid5000.fr" gw_dst="parapluie-AS_parapluie_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_parapide"/>
+          <link_ctn id="link_parapluie"/>
+      </ASroute><ASroute src="AS_parapide" dst="AS_parapide" gw_src="parapide-AS_parapide_router.rennes.grid5000.fr" gw_dst="parapide-AS_parapide_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_parapide"/>
+          <link_ctn id="link_parapide"/>
+      </ASroute><ASroute src="AS_paramount" dst="AS_paradent" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_paramount"/>
+          <link_ctn id="link_paradent"/>
+      </ASroute><ASroute src="AS_paramount" dst="AS_parapluie" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="parapluie-AS_parapluie_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_paramount"/>
+          <link_ctn id="link_parapluie"/>
+      </ASroute><ASroute src="AS_paramount" dst="AS_parapide" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="parapide-AS_parapide_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_paramount"/>
+          <link_ctn id="link_parapide"/>
+      </ASroute><ASroute src="AS_paramount" dst="AS_paramount" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="paramount-AS_paramount_router.rennes.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_paramount"/>
+          <link_ctn id="link_paramount"/>
+      </ASroute>
+
+      <ASroute src="AS_paradent" dst="gw_AS_rennes" gw_src="paradent-AS_paradent_router.rennes.grid5000.fr" gw_dst="gw_rennes" symmetrical="NO">
+          <link_ctn id="link_paradent"/>
+      </ASroute><ASroute src="AS_parapluie" dst="gw_AS_rennes" gw_src="parapluie-AS_parapluie_router.rennes.grid5000.fr" gw_dst="gw_rennes" symmetrical="NO">
+          <link_ctn id="link_parapluie"/>
+      </ASroute><ASroute src="AS_parapide" dst="gw_AS_rennes" gw_src="parapide-AS_parapide_router.rennes.grid5000.fr" gw_dst="gw_rennes" symmetrical="NO">
+          <link_ctn id="link_parapide"/>
+      </ASroute><ASroute src="AS_paramount" dst="gw_AS_rennes" gw_src="paramount-AS_paramount_router.rennes.grid5000.fr" gw_dst="gw_rennes" symmetrical="NO">
+          <link_ctn id="link_paramount"/>
+      </ASroute>
+
+      <ASroute src="gw_AS_rennes" dst="AS_paradent" gw_src="gw_rennes" gw_dst="paradent-AS_paradent_router.rennes.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_paradent"/>
+      </ASroute><ASroute src="gw_AS_rennes" dst="AS_parapluie" gw_src="gw_rennes" gw_dst="parapluie-AS_parapluie_router.rennes.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_parapluie"/>
+      </ASroute><ASroute src="gw_AS_rennes" dst="AS_parapide" gw_src="gw_rennes" gw_dst="parapide-AS_parapide_router.rennes.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_parapide"/>
+      </ASroute><ASroute src="gw_AS_rennes" dst="AS_paramount" gw_src="gw_rennes" gw_dst="paramount-AS_paramount_router.rennes.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_paramount"/>
+      </ASroute>
+
+    </AS>
+    <AS id="AS_sophia" routing="Full">
+      <cluster id="AS_helios" prefix="helios-" suffix=".sophia.grid5000.fr" radical="1-56" speed="7.7318E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_helios" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_sol" prefix="sol-" suffix=".sophia.grid5000.fr" radical="1-50" speed="8.9388E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_sol" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_suno" prefix="suno-" suffix=".sophia.grid5000.fr" radical="1-45" speed="23.530E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_suno" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="gw_AS_sophia" routing="Full">
+        <router id="gw_sophia"/>
+      </AS>
+      <link id="link_gw_sophia" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <ASroute src="AS_sol" dst="AS_sol" gw_src="sol-AS_sol_router.sophia.grid5000.fr" gw_dst="sol-AS_sol_router.sophia.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_sol"/>
+          <link_ctn id="link_sol"/>
+      </ASroute><ASroute src="AS_helios" dst="AS_sol" gw_src="helios-AS_helios_router.sophia.grid5000.fr" gw_dst="sol-AS_sol_router.sophia.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_helios"/>
+          <link_ctn id="link_sol"/>
+      </ASroute><ASroute src="AS_helios" dst="AS_helios" gw_src="helios-AS_helios_router.sophia.grid5000.fr" gw_dst="helios-AS_helios_router.sophia.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_helios"/>
+          <link_ctn id="link_helios"/>
+      </ASroute><ASroute src="AS_suno" dst="AS_sol" gw_src="suno-AS_suno_router.sophia.grid5000.fr" gw_dst="sol-AS_sol_router.sophia.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_suno"/>
+          <link_ctn id="link_sol"/>
+      </ASroute><ASroute src="AS_suno" dst="AS_helios" gw_src="suno-AS_suno_router.sophia.grid5000.fr" gw_dst="helios-AS_helios_router.sophia.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_suno"/>
+          <link_ctn id="link_helios"/>
+      </ASroute><ASroute src="AS_suno" dst="AS_suno" gw_src="suno-AS_suno_router.sophia.grid5000.fr" gw_dst="suno-AS_suno_router.sophia.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_suno"/>
+          <link_ctn id="link_suno"/>
+      </ASroute>
+
+      <ASroute src="AS_sol" dst="gw_AS_sophia" gw_src="sol-AS_sol_router.sophia.grid5000.fr" gw_dst="gw_sophia" symmetrical="NO">
+          <link_ctn id="link_sol"/>
+      </ASroute><ASroute src="AS_helios" dst="gw_AS_sophia" gw_src="helios-AS_helios_router.sophia.grid5000.fr" gw_dst="gw_sophia" symmetrical="NO">
+          <link_ctn id="link_helios"/>
+      </ASroute><ASroute src="AS_suno" dst="gw_AS_sophia" gw_src="suno-AS_suno_router.sophia.grid5000.fr" gw_dst="gw_sophia" symmetrical="NO">
+          <link_ctn id="link_suno"/>
+      </ASroute>
+
+      <ASroute src="gw_AS_sophia" dst="AS_sol" gw_src="gw_sophia" gw_dst="sol-AS_sol_router.sophia.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_sol"/>
+      </ASroute><ASroute src="gw_AS_sophia" dst="AS_helios" gw_src="gw_sophia" gw_dst="helios-AS_helios_router.sophia.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_helios"/>
+      </ASroute><ASroute src="gw_AS_sophia" dst="AS_suno" gw_src="gw_sophia" gw_dst="suno-AS_suno_router.sophia.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_suno"/>
+      </ASroute>
+
+    </AS>
+    <AS id="AS_toulouse" routing="Full">
+      <cluster id="AS_pastel" prefix="pastel-" suffix=".toulouse.grid5000.fr" radical="1-80" speed="9.5674E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_pastel" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <cluster id="AS_violette" prefix="violette-" suffix=".toulouse.grid5000.fr" radical="1-52" speed="5.1143E9f" bw="1.25E8Bps" lat="1.0E-4s" bb_bw="1.25E9Bps" bb_lat="1.0E-4s"/>
+      <link id="link_violette" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <AS id="gw_AS_toulouse" routing="Full">
+        <router id="gw_toulouse"/>
+      </AS>
+      <link id="link_gw_toulouse" bandwidth="1.25E9Bps" latency="1.0E-4s"/>
+
+      <ASroute src="AS_pastel" dst="AS_pastel" gw_src="pastel-AS_pastel_router.toulouse.grid5000.fr" gw_dst="pastel-AS_pastel_router.toulouse.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_pastel"/>
+          <link_ctn id="link_pastel"/>
+      </ASroute><ASroute src="AS_violette" dst="AS_pastel" gw_src="violette-AS_violette_router.toulouse.grid5000.fr" gw_dst="pastel-AS_pastel_router.toulouse.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_violette"/>
+          <link_ctn id="link_pastel"/>
+      </ASroute><ASroute src="AS_violette" dst="AS_violette" gw_src="violette-AS_violette_router.toulouse.grid5000.fr" gw_dst="violette-AS_violette_router.toulouse.grid5000.fr" symmetrical="YES">
+          <link_ctn id="link_violette"/>
+          <link_ctn id="link_violette"/>
+      </ASroute>
+
+      <ASroute src="AS_pastel" dst="gw_AS_toulouse" gw_src="pastel-AS_pastel_router.toulouse.grid5000.fr" gw_dst="gw_toulouse" symmetrical="NO">
+          <link_ctn id="link_pastel"/>
+      </ASroute><ASroute src="AS_violette" dst="gw_AS_toulouse" gw_src="violette-AS_violette_router.toulouse.grid5000.fr" gw_dst="gw_toulouse" symmetrical="NO">
+          <link_ctn id="link_violette"/>
+      </ASroute>
+
+      <ASroute src="gw_AS_toulouse" dst="AS_pastel" gw_src="gw_toulouse" gw_dst="pastel-AS_pastel_router.toulouse.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_pastel"/>
+      </ASroute><ASroute src="gw_AS_toulouse" dst="AS_violette" gw_src="gw_toulouse" gw_dst="violette-AS_violette_router.toulouse.grid5000.fr" symmetrical="NO">
+          <link_ctn id="link_violette"/>
+      </ASroute>
+
+    </AS>
+    <ASroute src="AS_toulouse" dst="AS_interne" gw_src="gw_toulouse" gw_dst="toulouse" symmetrical="YES">
+      <link_ctn id="link_gw_toulouse"/>
+    </ASroute>
+    <ASroute src="AS_sophia" dst="AS_interne" gw_src="gw_sophia" gw_dst="sophia" symmetrical="YES">
+      <link_ctn id="link_gw_sophia"/>
+    </ASroute>
+    <ASroute src="AS_rennes" dst="AS_interne" gw_src="gw_rennes" gw_dst="rennes" symmetrical="YES">
+      <link_ctn id="link_gw_rennes"/>
+    </ASroute>
+    <ASroute src="AS_orsay" dst="AS_interne" gw_src="gw_orsay" gw_dst="paris" symmetrical="YES">
+      <link_ctn id="link_gw_orsay"/>
+    </ASroute>
+    <ASroute src="AS_nancy" dst="AS_interne" gw_src="gw_nancy" gw_dst="nancy" symmetrical="YES">
+      <link_ctn id="link_gw_nancy"/>
+    </ASroute>
+    <ASroute src="AS_lyon" dst="AS_interne" gw_src="gw_lyon" gw_dst="lyon" symmetrical="YES">
+      <link_ctn id="link_gw_lyon"/>
+    </ASroute>
+    <ASroute src="AS_lille" dst="AS_interne" gw_src="gw_lille" gw_dst="lille" symmetrical="YES">
+      <link_ctn id="link_gw_lille"/>
+    </ASroute>
+    <ASroute src="AS_grenoble" dst="AS_interne" gw_src="gw_grenoble" gw_dst="grenoble" symmetrical="YES">
+      <link_ctn id="link_gw_grenoble"/>
+    </ASroute>
+    <ASroute src="AS_bordeaux" dst="AS_interne" gw_src="gw_bordeaux" gw_dst="bordeaux" symmetrical="YES">
+      <link_ctn id="link_gw_bordeaux"/>
+    </ASroute>
+  </AS>
 </platform>
index 9ea724a..2e94700 100644 (file)
@@ -1,39 +1,34 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-<AS  id="AS_griffon"  routing="Full">
-       
-     <cluster id="griffon_cluster_cabinet1" prefix="griffon-" suffix=".nancy.grid5000.fr"
-           radical="1-29,58,59,60" speed="286.087kf" bw="125MBps" lat="24us"
-           bb_bw="1.25GBps" bb_lat="0" sharing_policy="FULLDUPLEX" bb_sharing_policy="SHARED"/> 
-     <cluster id="griffon_cluster_cabinet2" prefix="griffon-" suffix=".nancy.grid5000.fr"
-           radical="30-57" speed="286.087kf" bw="125MBps" lat="24us" 
-           bb_bw="1.25GBps" bb_lat="0" sharing_policy="FULLDUPLEX" bb_sharing_policy="SHARED"/>    
-     <cluster id="griffon_cluster_cabinet3" prefix="griffon-" suffix=".nancy.grid5000.fr"
-           radical="61-92" speed="286.087kf" bw="125MBps" lat="24us" 
-           bb_bw="1.25GBps" bb_lat="0" sharing_policy="FULLDUPLEX" bb_sharing_policy="SHARED"/>
+<AS id="AS_griffon"  routing="Full">
+  <cluster id="griffon_cluster_cabinet1" prefix="griffon-" suffix=".nancy.grid5000.fr"
+           radical="1-29,58,59,60" speed="286.087kf" bw="125MBps" lat="24us"
+           bb_bw="1.25GBps" bb_lat="0" sharing_policy="FULLDUPLEX" bb_sharing_policy="SHARED"/>
+  <cluster id="griffon_cluster_cabinet2" prefix="griffon-" suffix=".nancy.grid5000.fr"
+           radical="30-57" speed="286.087kf" bw="125MBps" lat="24us" 
+           bb_bw="1.25GBps" bb_lat="0" sharing_policy="FULLDUPLEX" bb_sharing_policy="SHARED"/>
+  <cluster id="griffon_cluster_cabinet3" prefix="griffon-" suffix=".nancy.grid5000.fr"
+           radical="61-92" speed="286.087kf" bw="125MBps" lat="24us" 
+           bb_bw="1.25GBps" bb_lat="0" sharing_policy="FULLDUPLEX" bb_sharing_policy="SHARED"/>
 
-     <link id="backbone" bandwidth="1.25GBps" latency="24us" sharing_policy="SHARED"/>
-       
-     <ASroute src="griffon_cluster_cabinet1" dst="griffon_cluster_cabinet2" 
-        gw_src="griffon-griffon_cluster_cabinet1_router.nancy.grid5000.fr" 
-        gw_dst="griffon-griffon_cluster_cabinet2_router.nancy.grid5000.fr" 
-        symmetrical="YES">
-               <link_ctn id="backbone"/>
-     </ASroute>     
-     <ASroute src="griffon_cluster_cabinet2" dst="griffon_cluster_cabinet3" 
-        gw_src="griffon-griffon_cluster_cabinet2_router.nancy.grid5000.fr" 
-        gw_dst="griffon-griffon_cluster_cabinet3_router.nancy.grid5000.fr" 
-        symmetrical="YES">
-               <link_ctn id="backbone"/>
-     </ASroute>      
-     <ASroute src="griffon_cluster_cabinet1" dst="griffon_cluster_cabinet3" 
-        gw_src="griffon-griffon_cluster_cabinet1_router.nancy.grid5000.fr" 
-        gw_dst="griffon-griffon_cluster_cabinet3_router.nancy.grid5000.fr" 
-        symmetrical="YES">
-               <link_ctn id="backbone"/>
-     </ASroute> 
-               
+  <link id="backbone" bandwidth="1.25GBps" latency="24us" sharing_policy="SHARED"/>
+
+  <ASroute src="griffon_cluster_cabinet1" dst="griffon_cluster_cabinet2" 
+           gw_src="griffon-griffon_cluster_cabinet1_router.nancy.grid5000.fr"
+           gw_dst="griffon-griffon_cluster_cabinet2_router.nancy.grid5000.fr" symmetrical="YES">
+    <link_ctn id="backbone"/>
+  </ASroute>
+  <ASroute src="griffon_cluster_cabinet2" dst="griffon_cluster_cabinet3" 
+           gw_src="griffon-griffon_cluster_cabinet2_router.nancy.grid5000.fr"
+           gw_dst="griffon-griffon_cluster_cabinet3_router.nancy.grid5000.fr" symmetrical="YES">
+    <link_ctn id="backbone"/>
+  </ASroute>
+  <ASroute src="griffon_cluster_cabinet1" dst="griffon_cluster_cabinet3" 
+           gw_src="griffon-griffon_cluster_cabinet1_router.nancy.grid5000.fr"
+           gw_dst="griffon-griffon_cluster_cabinet3_router.nancy.grid5000.fr" symmetrical="YES">
+    <link_ctn id="backbone"/>
+  </ASroute>
 </AS>
 </platform>
 
index 67ddb05..4e4e36a 100644 (file)
@@ -1,40 +1,29 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
 <AS id="AS0" routing="Full">
-
   <AS  id="my_cluster1"  routing="Cluster">
-    <cabinet id="cabinet1" prefix="host-" suffix=".cluster1" 
-      speed="1Gf" bw="125MBps" lat="100us" radical="1-10"/>
-    <cabinet id="cabinet2" prefix="host-" suffix=".cluster1" 
-      speed="1Gf" bw="125MBps" lat="100us" radical="11-20"/>
-    <cabinet id="cabinet3" prefix="host-" suffix=".cluster1" 
-      speed="1Gf" bw="125MBps" lat="100us" radical="21-30"/>
-    
+    <cabinet id="cabinet1" prefix="host-" suffix=".cluster1" speed="1Gf" bw="125MBps" lat="100us" radical="1-10"/>
+    <cabinet id="cabinet2" prefix="host-" suffix=".cluster1" speed="1Gf" bw="125MBps" lat="100us" radical="11-20"/>
+    <cabinet id="cabinet3" prefix="host-" suffix=".cluster1" speed="1Gf" bw="125MBps" lat="100us" radical="21-30"/>
+
     <router  id="router1"/>
     <backbone id="backbone1" bandwidth="2.25GBps" latency="500us"/>
   </AS>
-  
+
   <AS  id="my_cluster2"  routing="Cluster">
-    <cabinet id="cabinet1" prefix="host-" suffix=".cluster2" 
-      speed="1Gf" bw="125MBps" lat="100us" radical="1-10"/>
-    <cabinet id="cabinet2" prefix="host-" suffix=".cluster2" 
-      speed="1Gf" bw="125MBps" lat="100us" radical="11-20"/>
-    <cabinet id="cabinet3" prefix="host-" suffix=".cluster2" 
-      speed="1Gf" bw="125MBps" lat="100us" radical="21-30"/>
-    
+    <cabinet id="cabinet1" prefix="host-" suffix=".cluster2" speed="1Gf" bw="125MBps" lat="100us" radical="1-10"/>
+    <cabinet id="cabinet2" prefix="host-" suffix=".cluster2" speed="1Gf" bw="125MBps" lat="100us" radical="11-20"/>
+    <cabinet id="cabinet3" prefix="host-" suffix=".cluster2" speed="1Gf" bw="125MBps" lat="100us" radical="21-30"/>
+
     <router  id="router2"/>
     <backbone id="backbone2" bandwidth="2.25GBps" latency="500us"/>
   </AS>
-  
+
   <link id="link1-2" bandwidth="2.25GBps" latency="500us"/>
-  
-  <ASroute src="my_cluster1" dst="my_cluster2"
-    gw_src="router1"
-    gw_dst="router2">
+
+  <ASroute src="my_cluster1" dst="my_cluster2" gw_src="router1" gw_dst="router2">
     <link_ctn id="link1-2" />
   </ASroute>
-  
-</AS>  
+</AS>
 </platform>
index e865d1d..93134dc 100644 (file)
@@ -1,9 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
- <AS  id="AS0"  routing="Full">
-   <host id="Tremblay" speed="98.095Mf" core="6"/>
- </AS>
- </platform>
+  <AS  id="AS0" routing="Full">
+    <host id="Tremblay" speed="98.095Mf" core="6"/>
+  </AS>
+</platform>
index 3eaa3d5..645f7f3 100644 (file)
@@ -1,57 +1,46 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
- <!-- This file describe a super simple platform which main interest is
-      to define some properties on hosts, processes and links. 
-      It is used in several regression cases on properties -->
- <AS  id="AS0"  routing="Full">
-   <prop id="filename" value="prop.xml"/>
-   <prop id="date" value="31-08-12"/>
-   <prop id="author" value="pnavarro"/>
-   
-   <AS  id="AS3"  routing="Full">
-          <AS id="AS1" routing="None">
-              <prop id="name" value="AS1"/>
-          </AS>
-          
-          <AS id="AS2" routing="None">
-              <prop id="name" value="AS2"/>
-          </AS>
-   </AS>
+  <!-- This file describe a super simple platform which main interest is to define some properties on hosts, 
+      processes and links. It is used in several regression cases on properties -->
+  <AS  id="AS0"  routing="Full">
+    <prop id="filename" value="prop.xml"/>
+    <prop id="date" value="31-08-12"/>
+    <prop id="author" value="pnavarro"/>
+
+    <AS id="AS3"  routing="Full">
+       <AS id="AS1" routing="None">
+         <prop id="name" value="AS1"/>
+      </AS>
+      <AS id="AS2" routing="None">
+         <prop id="name" value="AS2"/>
+     </AS>
+    </AS>
 
-   <cluster id="acme"
-            prefix="node-"    suffix=".acme.org"
-            radical="0-4"     speed="1Gf" 
-            bw="125MBps"      lat="50us"
-            bb_bw="2.25GBps"  bb_lat="500us">
-           
+    <cluster id="acme" prefix="node-" suffix=".acme.org" radical="0-4" speed="1Gf"
+             bw="125MBps" lat="50us" bb_bw="2.25GBps"  bb_lat="500us">
       <prop id="bla" value="acme cluster"/>
       <prop id="Hdd"  value="180"/>
       <prop id="mem"  value="42"/>
    </cluster>
 
    <AS  id="AS4"  routing="Full">
-          <host id="host1" speed="1Gf">
-            <prop id="Hdd" value="180"/>
-            <prop id="mem" value="4"/>
-          </host>
-          
-          <host id="host2" speed="1Gf">
-            <prop id="Hdd" value="120"/>
-          </host>
-          
-          <link id="l1" bandwidth="125MBps" latency="100us">
-            <prop id="type" value="Ethernet"/>
-          </link>
-          
-          <link id="l2" bandwidth="125MBps" latency="100us">
-            <prop id="type" value="ethernet"/>
-          </link>
-          <route src="host1" dst="host2"><link_ctn id="l1"/><link_ctn id="l2"/></route>
+     <host id="host1" speed="1Gf">
+       <prop id="Hdd" value="180"/>
+       <prop id="mem" value="4"/>
+     </host>
+     <host id="host2" speed="1Gf">
+       <prop id="Hdd" value="120"/>
+     </host>
+
+     <link id="l1" bandwidth="125MBps" latency="100us">
+       <prop id="type" value="Ethernet"/>
+     </link>
+     <link id="l2" bandwidth="125MBps" latency="100us">
+       <prop id="type" value="ethernet"/>
+     </link>
+
+     <route src="host1" dst="host2"><link_ctn id="l1"/><link_ctn id="l2"/></route>
    </AS>
- </AS>
- </platform>
 </AS>
+</platform>
index 3c502a5..adc51cf 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
 <!--              router1 -------------link1-2--------------router2
        __________________________                   _________________________
        |                        |                   |                        |
@@ -12,8 +11,6 @@ l1_up / / l1_down  | l3   l2_up\ \ l2_down   l4_up / / l4_down  | l6   l5_up\ \
      / /           |            \ \               / /           |            \ \
     host1         host3         host2           host4         host6          host5
 -->
-
-
 <AS id="AS0" routing="Full">
   <AS  id="my_cluster1"  routing="Cluster">
     <router id="router1"/>
@@ -55,10 +52,8 @@ l1_up / / l1_down  | l3   l2_up\ \ l2_down   l4_up / / l4_down  | l6   l5_up\ \
   
   <link id="link1-2" bandwidth="2.25GBps" latency="500us"/>
   
-  <ASroute src="my_cluster1" dst="my_cluster2"
-    gw_src="router1"
-    gw_dst="router2">
+  <ASroute src="my_cluster1" dst="my_cluster2" gw_src="router1" gw_dst="router2">
     <link_ctn id="link1-2" />
   </ASroute>
-</AS>  
+</AS>
 </platform>
index 2819352..01da662 100644 (file)
@@ -1,10 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
-<!--     This platform does not use any routing. 
-         It is what Constant network model expects. -->
-        
+<!--     This platform does not use any routing. It is what Constant network model expects. -->
   <AS id="AS0" routing="None">
     <host id="node-0.acme.org" speed="1Gf"/>
     <host id="node-1.acme.org" speed="1Gf"/>
index 6276dea..6563df4 100644 (file)
@@ -1,9 +1,8 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
-<!-- This is a random platform, generated with Simulacrum. 
-        http://pda.gforge.inria.fr/tools/download.html     
+<!-- This is a random platform, generated with Simulacrum.
+        http://pda.gforge.inria.fr/tools/download.html
      Unfortunately, the generation parameters were lost with the years. -->
 
   <AS  id="AS0" routing="Full">
     <host id="Host 30" speed="2.4818410475340424Gf"/>
     <host id="Host 31" speed="1.773869555571436Gf"/>
     <host id="Host 32" speed="1.7843609176927505Gf"/>
-    
+
     <link id="l152" bandwidth="125MBps" latency="100us"/>
     <link id="l153" bandwidth="125MBps" latency="100us"/>
     <link id="l154" bandwidth="125MBps" latency="100us"/>
     <link id="l155" bandwidth="125MBps" latency="100us"/>
     <link id="l156" bandwidth="125MBps" latency="100us"/>
     <link id="l157" bandwidth="125MBps" latency="100us"/>
-    <link id="l159" bandwidth="125MBps" latency="100us"
-         bandwidth_file="trace/linkBandwidth7.bw"/>
+    <link id="l159" bandwidth="125MBps" latency="100us" bandwidth_file="trace/linkBandwidth7.bw"/>
     <link id="l160" bandwidth="125MBps" latency="100us"/>
     <link id="l161" bandwidth="125MBps" latency="100us"/>
     <link id="l162" bandwidth="125MBps" latency="100us"/>
     <link id="l171" bandwidth="125MBps" latency="100us"/>
     <link id="l172" bandwidth="125MBps" latency="100us"/>
     <link id="l173" bandwidth="125MBps" latency="100us"/>
-    
-    <route src="Host 26" dst="Host 27">
-      <link_ctn id="l155"/>
-    </route>
-    <route src="Host 26" dst="Host 28">
-      <link_ctn id="l155"/> <link_ctn id="l154"/><link_ctn id="l156"/>
-    </route>
-    <route src="Host 26" dst="Host 29">
-      <link_ctn id="l152"/><link_ctn id="l157"/>
-    </route>
-    <route src="Host 26" dst="Host 30">
-      <link_ctn id="l152"/><link_ctn id="l161"/>
-    </route>
-    <route src="Host 26" dst="Host 31">
-      <link_ctn id="l166"/>
-    </route>
-    <route src="Host 26" dst="Host 32">
-      <link_ctn id="l152"/><link_ctn id="l169"/>
-    </route>
-    <route src="Host 27" dst="Host 28">
-      <link_ctn id="l154"/><link_ctn id="l156"/>
-    </route>
-    <route src="Host 27" dst="Host 29">
-      <link_ctn id="l159"/>
-    </route>
-    <route src="Host 27" dst="Host 30">
-      <link_ctn id="l162"/>
-    </route>
-    <route src="Host 27" dst="Host 31">
-      <link_ctn id="l167"/>
-    </route>
-    <route src="Host 27" dst="Host 32">
-      <link_ctn id="l154"/><link_ctn id="l170"/>
-    </route>
-    <route src="Host 28" dst="Host 29">
-      <link_ctn id="l160"/>
-    </route>
-    <route src="Host 28" dst="Host 30">
-      <link_ctn id="l163"/>
-    </route>
-    <route src="Host 28" dst="Host 31">
-      <link_ctn id="l163"/><link_ctn id="l168"/>
-    </route>
-    <route src="Host 28" dst="Host 32">
-      <link_ctn id="l156"/><link_ctn id="l170"/>
-    </route>
-    <route src="Host 29" dst="Host 30">
-      <link_ctn id="l164"/>
-    </route>
-    <route src="Host 29" dst="Host 31">
-      <link_ctn id="l159"/><link_ctn id="l167"/>
-    </route>
-    <route src="Host 29" dst="Host 32">
-      <link_ctn id="l171"/>
-    </route>
-    <route src="Host 30" dst="Host 31">
-      <link_ctn id="l168"/>
-    </route>
-    <route src="Host 30" dst="Host 32">
-      <link_ctn id="l172"/>
-    </route>
-    <route src="Host 31" dst="Host 32">
-      <link_ctn id="l173"/>
-    </route>
+
+    <route src="Host 26" dst="Host 27"><link_ctn id="l155"/></route>
+    <route src="Host 26" dst="Host 28"><link_ctn id="l155"/> <link_ctn id="l154"/><link_ctn id="l156"/></route>
+    <route src="Host 26" dst="Host 29"><link_ctn id="l152"/><link_ctn id="l157"/></route>
+    <route src="Host 26" dst="Host 30"><link_ctn id="l152"/><link_ctn id="l161"/></route>
+    <route src="Host 26" dst="Host 31"><link_ctn id="l166"/></route>
+    <route src="Host 26" dst="Host 32"><link_ctn id="l152"/><link_ctn id="l169"/></route>
+    <route src="Host 27" dst="Host 28"><link_ctn id="l154"/><link_ctn id="l156"/></route>
+    <route src="Host 27" dst="Host 29"><link_ctn id="l159"/></route>
+    <route src="Host 27" dst="Host 30"><link_ctn id="l162"/></route>
+    <route src="Host 27" dst="Host 31"><link_ctn id="l167"/></route>
+    <route src="Host 27" dst="Host 32"><link_ctn id="l154"/><link_ctn id="l170"/></route>
+    <route src="Host 28" dst="Host 29"><link_ctn id="l160"/></route>
+    <route src="Host 28" dst="Host 30"><link_ctn id="l163"/></route>
+    <route src="Host 28" dst="Host 31"><link_ctn id="l163"/><link_ctn id="l168"/></route>
+    <route src="Host 28" dst="Host 32"><link_ctn id="l156"/><link_ctn id="l170"/></route>
+    <route src="Host 29" dst="Host 30"><link_ctn id="l164"/></route>
+    <route src="Host 29" dst="Host 31"><link_ctn id="l159"/><link_ctn id="l167"/></route>
+    <route src="Host 29" dst="Host 32"><link_ctn id="l171"/></route>
+    <route src="Host 30" dst="Host 31"><link_ctn id="l168"/></route>
+    <route src="Host 30" dst="Host 32"><link_ctn id="l172"/></route>
+    <route src="Host 31" dst="Host 32"><link_ctn id="l173"/></route>
   </AS>
 </platform>
 
index 038076f..55f991c 100644 (file)
@@ -1,60 +1,39 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
- <AS  id="AS0"  routing="Full">
-   <!-- ljlkj -->
-   <host id="Tremblay" speed="98.095Mf"/>
-   <host id="Jupiter" speed="76.296Mf"/>
-   <host id="Fafard" speed="76.296Mf"/>
-   <host id="Ginette" speed="48.492Mf"/>
-   <host id="Bourassa" speed="48.492Mf"/>
-   <link id="6" bandwidth="41.279125MBps" latency="59.904us"/>
-   <link id="3" bandwidth="34.285625MBps" latency="514.433us"/>
-   <link id="7" bandwidth="11.618875MBps" latency="189.98us"/>
-   <link id="9" bandwidth="7.20975MBps" latency="1.461517ms"/>
-   <link id="2" bandwidth="118.6825MBps" latency="136.931us"/>
-   <link id="8" bandwidth="8.158MBps" latency="270.544us"/>
-   <link id="1" bandwidth="34.285625MBps" latency="514.433us"/>
-   <link id="4" bandwidth="10.099625MBps" latency="479.78us"/>
-   <link id="0" bandwidth="41.279125MBps" latency="59.904us"/>
-   <link id="5" bandwidth="27.94625MBps" latency="278.066us"/>
-   <link id="loopback" bandwidth="498MBps" latency="15us" sharing_policy="FATPIPE"/>
-   <route src="Tremblay" dst="Tremblay"><link_ctn id="loopback"/></route>
-   <route src="Jupiter" dst="Jupiter"><link_ctn id="loopback"/></route>
-   <route src="Fafard" dst="Fafard"><link_ctn id="loopback"/></route>
-   <route src="Ginette" dst="Ginette"><link_ctn id="loopback"/></route>
-   <route src="Bourassa" dst="Bourassa"><link_ctn id="loopback"/></route>
-   <route src="Tremblay" dst="Jupiter">
-     <link_ctn id="9"/>
-   </route>
-   <route src="Tremblay" dst="Fafard">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Tremblay" dst="Ginette">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Tremblay" dst="Bourassa">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Jupiter" dst="Fafard">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Jupiter" dst="Ginette">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Jupiter" dst="Bourassa">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Fafard" dst="Ginette">
-     <link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/>
-   </route>
-   <route src="Fafard" dst="Bourassa">
-     <link_ctn id="8"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Ginette" dst="Bourassa">
-     <link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
- </AS>
- </platform>
+  <AS  id="AS0"  routing="Full">
+    <host id="Tremblay" speed="98.095Mf"/>
+    <host id="Jupiter" speed="76.296Mf"/>
+    <host id="Fafard" speed="76.296Mf"/>
+    <host id="Ginette" speed="48.492Mf"/>
+    <host id="Bourassa" speed="48.492Mf"/>
+
+    <link id="6" bandwidth="41.279125MBps" latency="59.904us"/>
+    <link id="3" bandwidth="34.285625MBps" latency="514.433us"/>
+    <link id="7" bandwidth="11.618875MBps" latency="189.98us"/>
+    <link id="9" bandwidth="7.20975MBps" latency="1.461517ms"/>
+    <link id="2" bandwidth="118.6825MBps" latency="136.931us"/>
+    <link id="8" bandwidth="8.158MBps" latency="270.544us"/>
+    <link id="1" bandwidth="34.285625MBps" latency="514.433us"/>
+    <link id="4" bandwidth="10.099625MBps" latency="479.78us"/>
+    <link id="0" bandwidth="41.279125MBps" latency="59.904us"/>
+    <link id="5" bandwidth="27.94625MBps" latency="278.066us"/>
+    <link id="loopback" bandwidth="498MBps" latency="15us" sharing_policy="FATPIPE"/>
+
+    <route src="Tremblay" dst="Tremblay"><link_ctn id="loopback"/></route>
+    <route src="Jupiter" dst="Jupiter"><link_ctn id="loopback"/></route>
+    <route src="Fafard" dst="Fafard"><link_ctn id="loopback"/></route>
+    <route src="Ginette" dst="Ginette"><link_ctn id="loopback"/></route>
+    <route src="Bourassa" dst="Bourassa"><link_ctn id="loopback"/></route>
+    <route src="Tremblay" dst="Jupiter"><link_ctn id="9"/></route>
+    <route src="Tremblay" dst="Fafard"><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/></route>
+    <route src="Tremblay" dst="Ginette"><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/></route>
+    <route src="Tremblay" dst="Bourassa"><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/></route>
+    <route src="Jupiter" dst="Fafard"><link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/></route>
+    <route src="Jupiter" dst="Ginette"><link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/></route>
+    <route src="Jupiter" dst="Bourassa"><link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/></route>
+    <route src="Fafard" dst="Ginette"><link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/></route>
+    <route src="Fafard" dst="Bourassa"><link_ctn id="8"/><link_ctn id="6"/><link_ctn id="7"/></route>
+    <route src="Ginette" dst="Bourassa"><link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/></route>
+  </AS>
+</platform>
index 6b08c56..c810aa9 100644 (file)
@@ -1,24 +1,20 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
- <AS  id="AS0"  routing="Full">
-   <!-- ljlkj -->
-   <host id="Tremblay" speed="98.095Mf"/>
-   <host id="Ruby" speed="98.095Mf"/>
-   <host id="Perl" speed="98.095Mf"/>
-   <host id="Java" speed="98.095Mf"/>
+  <AS id="AS0" routing="Full">
+    <host id="Tremblay" speed="98.095Mf"/>
+    <host id="Ruby" speed="98.095Mf"/>
+    <host id="Perl" speed="98.095Mf"/>
+    <host id="Java" speed="98.095Mf"/>
 
-   <link id="1" bandwidth="498MBps" latency="150us" sharing_policy="FATPIPE"/>
-   <link id="2" bandwidth="498MBps" latency="150us" sharing_policy="FATPIPE"/>
-   <link id="3" bandwidth="498MBps" latency="150us" sharing_policy="FATPIPE"/>
-   <link id="4" bandwidth="498MBps" latency="150us" sharing_policy="FATPIPE"/>
+    <link id="1" bandwidth="498MBps" latency="150us" sharing_policy="FATPIPE"/>
+    <link id="2" bandwidth="498MBps" latency="150us" sharing_policy="FATPIPE"/>
+    <link id="3" bandwidth="498MBps" latency="150us" sharing_policy="FATPIPE"/>
+    <link id="4" bandwidth="498MBps" latency="150us" sharing_policy="FATPIPE"/>
 
-   <route src="Tremblay" dst="Ruby"><link_ctn id="1"/></route>
-   <route src="Tremblay" dst="Perl"><link_ctn id="2"/></route>
-   <route src="Tremblay" dst="Java"><link_ctn id="3"/></route>
-   <route src="Ruby" dst="Perl"><link_ctn id="4"/></route>
-
- </AS>
- </platform>
+    <route src="Tremblay" dst="Ruby"><link_ctn id="1"/></route>
+    <route src="Tremblay" dst="Perl"><link_ctn id="2"/></route>
+    <route src="Tremblay" dst="Java"><link_ctn id="3"/></route>
+    <route src="Ruby" dst="Perl"><link_ctn id="4"/></route>
+  </AS>
+</platform>
index 40d0bb8..e1d93cb 100644 (file)
@@ -1,78 +1,44 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
- <AS  id="AS0"  routing="Full">
+  <AS  id="AS0"  routing="Full">
+    <host id="Tremblay" speed="98.095Mf"/>
+    <host id="Jupiter" speed="76.296Mf"/>
+    <host id="Fafard" speed="76.296Mf"/>
+    <host id="Ginette" speed="48.492Mf"/>
+    <host id="Bourassa" speed="48.492Mf"/>
+    <host id="Lovelace" speed="30.343Mf"/>
 
-   <host id="Tremblay" speed="98.095Mf"/>
-   <host id="Jupiter" speed="76.296Mf"/>
-   <host id="Fafard" speed="76.296Mf"/>
-   <host id="Ginette" speed="48.492Mf"/>
-   <host id="Bourassa" speed="48.492Mf"/>
-   <host id="Lovelace" speed="30.343Mf"/>
+    <link id="0" bandwidth="41.279125MBps" latency="59.904us"/>
+    <link id="1" bandwidth="34.285625MBps" latency="514.433us"/>
+    <link id="2" bandwidth="118.6825MBps" latency="136.931us"/>
+    <link id="3" bandwidth="34.285625MBps" latency="514.433us"/>
+    <link id="4" bandwidth="10.099625MBps" latency="479.78us"/>
+    <link id="5" bandwidth="27.94625MBps" latency="278.066us"/>
+    <link id="6" bandwidth="41.279125MBps" latency="59.904us"/>
+    <link id="7" bandwidth="11.618875MBps" latency="189.98us"/>
+    <link id="8" bandwidth="8.158MBps" latency="270.544us"/>
+    <link id="9" bandwidth="7.20975MBps" latency="1.461517ms"/>
+    <link id="10" bandwidth="4.67975MBps" latency="848.712us"/>
+    <link id="11" bandwidth="252.75kBps" latency="5.70455ms"/>
+    <link id="12" bandwidth="1.792625MBps" latency="7.877863ms"/>
+    <link id="13" bandwidth="1.792625MBps" latency="7.877863ms"/>
+    <link id="14" bandwidth="1.792625MBps" latency="7.877863ms"/>
 
-   <link id="0" bandwidth="41.279125MBps" latency="59.904us"/>
-   <link id="1" bandwidth="34.285625MBps" latency="514.433us"/>
-   <link id="2" bandwidth="118.6825MBps" latency="136.931us"/>
-   <link id="3" bandwidth="34.285625MBps" latency="514.433us"/>
-   <link id="4" bandwidth="10.099625MBps" latency="479.78us"/>
-   <link id="5" bandwidth="27.94625MBps" latency="278.066us"/>
-   <link id="6" bandwidth="41.279125MBps" latency="59.904us"/>
-   <link id="7" bandwidth="11.618875MBps" latency="189.98us"/>
-   <link id="8" bandwidth="8.158MBps" latency="270.544us"/>
-   <link id="9" bandwidth="7.20975MBps" latency="1.461517ms"/>
-   <link id="10" bandwidth="4.67975MBps" latency="848.712us"/>
-   <link id="11" bandwidth="252.75kBps" latency="5.70455ms"/>
-   <link id="12" bandwidth="1.792625MBps" latency="7.877863ms"/>
-   <link id="13" bandwidth="1.792625MBps" latency="7.877863ms"/>
-   <link id="14" bandwidth="1.792625MBps" latency="7.877863ms"/>
-
-   <route src="Tremblay" dst="Jupiter">
-      <link_ctn id="0"/>
-   </route>
-   <route src="Tremblay" dst="Fafard">
-      <link_ctn id="1"/>
-   </route>
-   <route src="Tremblay" dst="Ginette">
-      <link_ctn id="2"/>
-   </route>
-     <route src="Tremblay" dst="Bourassa">
-      <link_ctn id="3"/>
-   </route>
-   <route src="Tremblay" dst="Lovelace">
-      <link_ctn id="4"/>
-   </route>
-   <route src="Jupiter" dst="Fafard">
-      <link_ctn id="5"/>
-   </route>
-   <route src="Jupiter" dst="Ginette">
-      <link_ctn id="6"/>
-   </route>
-   <route src="Jupiter" dst="Bourassa">
-      <link_ctn id="7"/>
-   </route>
-   <route src="Jupiter" dst="Lovelace">
-      <link_ctn id="8"/>
-   </route>
-   <route src="Fafard" dst="Ginette">
-      <link_ctn id="9"/>
-   </route>
-   <route src="Fafard" dst="Bourassa">
-      <link_ctn id="10"/>
-   </route>
-   <route src="Fafard" dst="Lovelace">
-      <link_ctn id="11"/>
-   </route>
-   <route src="Ginette" dst="Bourassa">
-      <link_ctn id="12"/>
-   </route>
-   <route src="Ginette" dst="Lovelace">
-      <link_ctn id="13"/>
-   </route>
-   <route src="Bourassa" dst="Lovelace">
-      <link_ctn id="14"/>
-   </route>
-
- </AS>
- </platform>
+    <route src="Tremblay" dst="Jupiter"><link_ctn id="0"/></route>
+    <route src="Tremblay" dst="Fafard"><link_ctn id="1"/></route>
+    <route src="Tremblay" dst="Ginette"><link_ctn id="2"/></route>
+    <route src="Tremblay" dst="Bourassa"><link_ctn id="3"/></route>
+    <route src="Tremblay" dst="Lovelace"><link_ctn id="4"/></route>
+    <route src="Jupiter" dst="Fafard"><link_ctn id="5"/></route>
+    <route src="Jupiter" dst="Ginette"><link_ctn id="6"/></route>
+    <route src="Jupiter" dst="Bourassa"><link_ctn id="7"/></route>
+    <route src="Jupiter" dst="Lovelace"><link_ctn id="8"/></route>
+    <route src="Fafard" dst="Ginette"><link_ctn id="9"/></route>
+    <route src="Fafard" dst="Bourassa"><link_ctn id="10"/></route>
+    <route src="Fafard" dst="Lovelace"><link_ctn id="11"/></route>
+    <route src="Ginette" dst="Bourassa"><link_ctn id="12"/></route>
+    <route src="Ginette" dst="Lovelace"><link_ctn id="13"/></route>
+    <route src="Bourassa" dst="Lovelace"><link_ctn id="14"/></route>
+  </AS>
+</platform>
index f3fd3ca..47b0cce 100644 (file)
@@ -1,61 +1,40 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
- <AS  id="AS0"  routing="Full">
-   <!-- ljlkj -->
-   <host id="Tremblay" speed="25Mf"/>
-   <host id="Jupiter" speed="25Mf" state_file="jupiter_state.trace"/>
-   <host id="Fafard" speed="25Mf" state_file="fafard_state.trace" />
-   <host id="Ginette" speed="25Mf" state_file="ginette_state.trace"/>
-   <host id="Bourassa" speed="25Mf"state_file="bourassa_state.trace"/>
-   <link id="1" bandwidth="1MBps" latency="0"/>
-   <link id="2" bandwidth="1MBps" latency="0"/>
-   <link id="3" bandwidth="1MBps" latency="0" state_file="link3_state.trace" />
-   <link id="4" bandwidth="1MBps" latency="0" state_file="link4_state.trace" />
-   <link id="5" bandwidth="1MBps" latency="0"/>
-   <link id="6" bandwidth="1MBps" latency="0"/>
-   <link id="7" bandwidth="1MBps" latency="0"/>
-   <link id="8" bandwidth="1MBps" latency="0"/>
-   <link id="9" bandwidth="1MBps" latency="0"/>
-   <link id="10" bandwidth="1MBps" latency="0"/>
-   <link id="loopback_FATPIPE" bandwidth="10MBps" latency="0" sharing_policy="FATPIPE"/>
-   <link id="loopback" bandwidth="100MBps" latency="0"/>
-   <route src="Tremblay" dst="Tremblay"><link_ctn id="loopback"/></route>
-   <route src="Jupiter" dst="Jupiter"><link_ctn id="loopback"/></route>
-   <route src="Fafard" dst="Fafard"><link_ctn id="loopback"/></route>
-   <route src="Ginette" dst="Ginette"><link_ctn id="loopback"/></route>
-   <route src="Bourassa" dst="Bourassa"><link_ctn id="loopback"/></route>
-   <route src="Tremblay" dst="Jupiter">
-     <link_ctn id="1"/>
-   </route>
-   <route src="Tremblay" dst="Fafard">
-     <link_ctn id="2"/>
-   </route>
-   <route src="Tremblay" dst="Ginette">
-     <link_ctn id="3"/>
-   </route>
-   <route src="Tremblay" dst="Bourassa">
-     <link_ctn id="4"/>
-   </route>
-   <route src="Jupiter" dst="Fafard">
-     <link_ctn id="5"/>
-   </route>
-   <route src="Jupiter" dst="Ginette">
-     <link_ctn id="6"/>
-   </route>
-   <route src="Jupiter" dst="Bourassa">
-     <link_ctn id="7"/>
-   </route>
-   <route src="Fafard" dst="Ginette">
-     <link_ctn id="8"/>
-   </route>
-   <route src="Fafard" dst="Bourassa">
-     <link_ctn id="9"/>
-   </route>
-   <route src="Ginette" dst="Bourassa">
-     <link_ctn id="10"/>
-   </route>
- </AS>
- </platform>
+  <AS  id="AS0"  routing="Full">
+    <host id="Tremblay" speed="25Mf"/>
+    <host id="Jupiter" speed="25Mf" state_file="jupiter_state.trace"/>
+    <host id="Fafard" speed="25Mf" state_file="fafard_state.trace" />
+    <host id="Ginette" speed="25Mf" state_file="ginette_state.trace"/>
+    <host id="Bourassa" speed="25Mf"state_file="bourassa_state.trace"/>
+
+    <link id="1" bandwidth="1MBps" latency="0"/>
+    <link id="2" bandwidth="1MBps" latency="0"/>
+    <link id="3" bandwidth="1MBps" latency="0" state_file="link3_state.trace" />
+    <link id="4" bandwidth="1MBps" latency="0" state_file="link4_state.trace" />
+    <link id="5" bandwidth="1MBps" latency="0"/>
+    <link id="6" bandwidth="1MBps" latency="0"/>
+    <link id="7" bandwidth="1MBps" latency="0"/>
+    <link id="8" bandwidth="1MBps" latency="0"/>
+    <link id="9" bandwidth="1MBps" latency="0"/>
+    <link id="10" bandwidth="1MBps" latency="0"/>
+    <link id="loopback_FATPIPE" bandwidth="10MBps" latency="0" sharing_policy="FATPIPE"/>
+    <link id="loopback" bandwidth="100MBps" latency="0"/>
+
+    <route src="Tremblay" dst="Tremblay"><link_ctn id="loopback"/></route>
+    <route src="Jupiter" dst="Jupiter"><link_ctn id="loopback"/></route>
+    <route src="Fafard" dst="Fafard"><link_ctn id="loopback"/></route>
+    <route src="Ginette" dst="Ginette"><link_ctn id="loopback"/></route>
+    <route src="Bourassa" dst="Bourassa"><link_ctn id="loopback"/></route>
+    <route src="Tremblay" dst="Jupiter"><link_ctn id="1"/></route>
+    <route src="Tremblay" dst="Fafard"><link_ctn id="2"/></route>
+    <route src="Tremblay" dst="Ginette"><link_ctn id="3"/></route>
+    <route src="Tremblay" dst="Bourassa"><link_ctn id="4"/></route>
+    <route src="Jupiter" dst="Fafard"><link_ctn id="5"/></route>
+    <route src="Jupiter" dst="Ginette"><link_ctn id="6"/></route>
+    <route src="Jupiter" dst="Bourassa"><link_ctn id="7"/></route>
+    <route src="Fafard" dst="Ginette"><link_ctn id="8"/></route>
+    <route src="Fafard" dst="Bourassa"><link_ctn id="9"/></route>
+    <route src="Ginette" dst="Bourassa"><link_ctn id="10"/></route>
+  </AS>
+</platform>
index d62e954..1310835 100644 (file)
@@ -1,79 +1,60 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
+  <AS  id="AS0"  routing="Full">
+    <host id="Tremblay" speed="98.095Mf"/>
+    <host id="Jupiter" speed="76.296Mf"/>
+    <host id="Fafard" speed="76.296Mf"/>
+    <host id="Ginette" speed="48.492Mf"/>
+    <host id="Bourassa" speed="48.492Mf"/>
+
+    <router id="R.4-3"/>
+    <router id="R.3-2-5"/>
+    <router id="R.2-0"/>
+    <router id="R.1-0"/>
+    <router id="R.1-8-6"/>
+    <router id="R.6-7"/>
+
+    <link id="6"  bandwidth="41.279125MBps" latency="59.904us"/>
+    <link id="11" bandwidth="252.75kBps" latency="5.70455ms"/>
+    <link id="3"  bandwidth="34.285622MBps" latency="514.433us"/>
+    <link id="7"  bandwidth="11.618875MBps" latency="189.98us"/>
+    <link id="9"  bandwidth="7.20975MBps" latency="1.461517ms"/>
+    <link id="12" bandwidth="1.792625MBps" latency="7.877863ms"/>
+    <link id="2"  bandwidth="22.222222MBps" latency="136.931us"/>
+    <link id="8"  bandwidth="8.158MBps" latency="270.544us"/>
+    <link id="1"  bandwidth="34.285625MBps" latency="514.433us"/>
+    <link id="4"  bandwidth="10.099625MBps" latency="479.78us"/>
+    <link id="0"  bandwidth="41.279125MBps" latency="59.904us"/>
+    <link id="10" bandwidth="4.67975MBps" latency="848.712us"/>
+    <link id="5"  bandwidth="27.94625MBps" latency="278.066us"/>
+    <link id="loopback" bandwidth="498MBps" latency="15us" sharing_policy="FATPIPE"/>
+
+    <route src="Tremblay" dst="Tremblay"><link_ctn id="loopback"/></route>
+    <route src="Jupiter" dst="Jupiter"><link_ctn id="loopback"/></route>
+    <route src="Fafard" dst="Fafard"><link_ctn id="loopback"/></route>
+    <route src="Ginette" dst="Ginette"><link_ctn id="loopback"/></route>
+    <route src="Bourassa" dst="Bourassa"><link_ctn id="loopback"/></route>
  
+    <route src="Tremblay" dst="R.4-3"><link_ctn id="4"/></route>
+    <route src="R.3-2-5" dst="Ginette"><link_ctn id="5"/></route>
+    <route src="R.4-3" dst="R.3-2-5"><link_ctn id="3"/></route>
+    <route src="R.3-2-5" dst="R.2-0"><link_ctn id="2"/></route>
+    <route src="R.2-0" dst="R.1-0"><link_ctn id="0"/></route>
+    <route src="Fafard" dst="R.1-8-6"><link_ctn id="8"/></route>
+    <route src="R.1-0" dst="R.1-8-6"><link_ctn id="1"/></route>
+    <route src="R.1-8-6" dst="R.6-7"><link_ctn id="6"/></route>
+    <route src="R.6-7" dst="Bourassa"><link_ctn id="7"/></route>
  
- <AS  id="AS0"  routing="Full">
-   <host id="Tremblay" speed="98.095Mf"/>
-   <host id="Jupiter" speed="76.296Mf"/>
-   <host id="Fafard" speed="76.296Mf"/>
-   <host id="Ginette" speed="48.492Mf"/>
-   <host id="Bourassa" speed="48.492Mf"/>
-   <router id="R.4-3"/>
-   <router id="R.3-2-5"/>
-   <router id="R.2-0"/>
-   <router id="R.1-0"/>
-   <router id="R.1-8-6"/>
-   <router id="R.6-7"/>
-   <link id="6"  bandwidth="41.279125MBps" latency="59.904us"/>
-   <link id="11" bandwidth="252.75kBps" latency="5.70455ms"/>
-   <link id="3"  bandwidth="34.285622MBps" latency="514.433us"/>
-   <link id="7"  bandwidth="11.618875MBps" latency="189.98us"/>
-   <link id="9"  bandwidth="7.20975MBps" latency="1.461517ms"/>
-   <link id="12" bandwidth="1.792625MBps" latency="7.877863ms"/>
-   <link id="2"  bandwidth="22.222222MBps" latency="136.931us"/>
-   <link id="8"  bandwidth="8.158MBps" latency="270.544us"/>
-   <link id="1"  bandwidth="34.285625MBps" latency="514.433us"/>
-   <link id="4"  bandwidth="10.099625MBps" latency="479.78us"/>
-   <link id="0"  bandwidth="41.279125MBps" latency="59.904us"/>
-   <link id="10" bandwidth="4.67975MBps" latency="848.712us"/>
-   <link id="5"  bandwidth="27.94625MBps" latency="278.066us"/>
-   <link id="loopback" bandwidth="498MBps" latency="15us" sharing_policy="FATPIPE"/>
-   <route src="Tremblay" dst="Tremblay"><link_ctn id="loopback"/></route>
-   <route src="Jupiter" dst="Jupiter"><link_ctn id="loopback"/></route>
-   <route src="Fafard" dst="Fafard"><link_ctn id="loopback"/></route>
-   <route src="Ginette" dst="Ginette"><link_ctn id="loopback"/></route>
-   <route src="Bourassa" dst="Bourassa"><link_ctn id="loopback"/></route>
-   <route src="Tremblay" dst="R.4-3"><link_ctn id="4"/></route>
-   <route src="R.3-2-5" dst="Ginette"><link_ctn id="5"/></route>
-   <route src="R.4-3" dst="R.3-2-5"><link_ctn id="3"/></route>
-   <route src="R.3-2-5" dst="R.2-0"><link_ctn id="2"/></route>
-   <route src="R.2-0" dst="R.1-0"><link_ctn id="0"/></route>
-   <route src="Fafard" dst="R.1-8-6"><link_ctn id="8"/></route>
-   <route src="R.1-0" dst="R.1-8-6"><link_ctn id="1"/></route>
-   <route src="R.1-8-6" dst="R.6-7"><link_ctn id="6"/></route>
-   <route src="R.6-7" dst="Bourassa"><link_ctn id="7"/></route>
-   <route src="Tremblay" dst="Jupiter">
-     <link_ctn id="9"/>
-   </route>
-   <route src="Tremblay" dst="Fafard">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Tremblay" dst="Ginette">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Tremblay" dst="Bourassa">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Jupiter" dst="Fafard">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Jupiter" dst="Ginette">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Jupiter" dst="Bourassa">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Fafard" dst="Ginette">
-     <link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/>
-   </route>
-   <route src="Fafard" dst="Bourassa">
-     <link_ctn id="8"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Ginette" dst="Bourassa">
-     <link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
- </AS>
- </platform>
+    <route src="Tremblay" dst="Jupiter"><link_ctn id="9"/></route>
+    <route src="Tremblay" dst="Fafard"><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/></route>
+    <route src="Tremblay" dst="Ginette"><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/></route>
+    <route src="Tremblay" dst="Bourassa"><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/></route>
+    <route src="Jupiter" dst="Fafard"><link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/></route>
+    <route src="Jupiter" dst="Ginette"><link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/></route>
+    <route src="Jupiter" dst="Bourassa"><link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/></route>
+    <route src="Fafard" dst="Ginette"><link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/></route>
+    <route src="Fafard" dst="Bourassa"><link_ctn id="8"/><link_ctn id="6"/><link_ctn id="7"/></route>
+    <route src="Ginette" dst="Bourassa"><link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/></route>
+  </AS>
+</platform>
index f8bcd86..a0bec80 100644 (file)
@@ -2,8 +2,7 @@
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
 <AS id="AS0" routing="Full">
-  <cluster id="bob_cluster" prefix="node-" suffix=".acme.org"
-   radical="0-11" speed="1Gf" bw="125MBps" lat="50us" topology="TORUS" topo_parameters="3,2,2" 
-   loopback_bw="100000000Bps" loopback_lat="0"/>
+  <cluster id="bob_cluster" prefix="node-" suffix=".acme.org" radical="0-11" speed="1Gf" 
+           bw="125MBps" lat="50us" topology="TORUS" topo_parameters="3,2,2" loopback_bw="100MBps" loopback_lat="0"/>
 </AS>
 </platform>
index c5825e2..b784909 100644 (file)
@@ -5,6 +5,6 @@
     <host id="host0" core="4" speed="8.095Gf"/>
     <host id="host1" core="4" speed="8.095Gf"/>
     <link id="link1" bandwidth="125MBps" latency="100us"/>
-   <route src="host0" dst="host1"><link_ctn id="link1"/></route>
+    <route src="host0" dst="host1"><link_ctn id="link1"/></route>
   </AS>
 </platform>
index f3bbd65..3d93800 100644 (file)
@@ -1,19 +1,14 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
- <AS  id="AS0"  routing="Full">
-   <host id="cpu0" speed="4Gf"/>
-   <host id="cpu1" speed="4Gf"/>
-   <link id="link0" bandwidth="125MBps" latency="100us" sharing_policy="SHARED"/>
-   <route src="cpu0" dst="cpu0">
-     <link_ctn id="link0"/>
-   </route>
-   <route src="cpu0" dst="cpu1">
-     <link_ctn id="link0"/>
-   </route>
-   <route src="cpu1" dst="cpu1">
-     <link_ctn id="link0"/>
-   </route>
- </AS>
+<AS  id="AS0" routing="Full">
+  <host id="cpu0" speed="4Gf"/>
+  <host id="cpu1" speed="4Gf"/>
+
+  <link id="link0" bandwidth="125MBps" latency="100us" sharing_policy="SHARED"/>
+
+  <route src="cpu0" dst="cpu0"><link_ctn id="link0"/></route>
+  <route src="cpu0" dst="cpu1"><link_ctn id="link0"/></route>
+  <route src="cpu1" dst="cpu1"><link_ctn id="link0"/></route>
+</AS>
 </platform>
index 3023615..5012186 100644 (file)
@@ -1,12 +1,10 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
- <AS  id="AS0"  routing="Full">
-   <host id="Cpu A" speed="10f" availability_file="trace/trace_A.txt" state_file="trace/trace_A_failure.txt"/>
-   <host id="Cpu B" speed="10f" availability_file="trace/trace_B.txt"/>
-   <link id="LinkA" bandwidth="10MBps" latency="200ms"/>
-   <route src="Cpu A" dst="Cpu B"><link_ctn id="LinkA"/></route>
- </AS>
- </platform>
+<AS  id="AS0"  routing="Full">
+  <host id="Cpu A" speed="10f" availability_file="trace/trace_A.txt" state_file="trace/trace_A_failure.txt"/>
+  <host id="Cpu B" speed="10f" availability_file="trace/trace_B.txt"/>
+  <link id="LinkA" bandwidth="10MBps" latency="200ms"/>
+  <route src="Cpu A" dst="Cpu B"><link_ctn id="LinkA"/></route>
+</AS>
+</platform>
index efa7973..6a9dd8a 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-
 <trace id="A" periodicity="1.0">
 0.0 1.0
 11.0 0.5
 10.0 0.8
 20.0 0.4
 </trace>
- <AS  id="AS0"  routing="Full">
-   <host id="Cpu A" speed="10f"/>
-   <host id="Cpu B" speed="10f"/>
-   <link id="LinkA" bandwidth="10MBps" latency="200ms"/>
-   <route src="Cpu A" dst="Cpu B"><link_ctn id="LinkA"/></route>
- </AS>
+
+<AS id="AS0" routing="Full">
+  <host id="Cpu A" speed="10f"/>
+  <host id="Cpu B" speed="10f"/>
+  <link id="LinkA" bandwidth="10MBps" latency="200ms"/>
+  <route src="Cpu A" dst="Cpu B"><link_ctn id="LinkA"/></route>
+</AS>
+
 <trace_connect kind="SPEED" trace="A" element="Cpu A"/>
 <trace_connect kind="HOST_AVAIL" trace="A_failure" element="Cpu A"/>
 <trace_connect kind="SPEED" trace="B" element="Cpu B"/>
- </platform>
+</platform>
index 3da4b18..7bd805c 100644 (file)
@@ -1,20 +1,8 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-       
-<AS  id="AS0"  routing="Vivaldi">       
-       <peer id="100030591"
-               coordinates="25.5 9.4 1.4"
-               speed="1.5Gf"
-               bw_in="2.25GBps"
-               bw_out="2.25GBps"
-               lat="500us" />
-               
-       <peer id="100036570"
-               coordinates="-12.7 -9.9 2.1"
-               speed="730Mf"   
-               bw_in="2.25GBps"
-               bw_out="2.25GBps"
-               lat="500us" />
+<AS id="AS0" routing="Vivaldi">
+  <peer id="100030591" coordinates="25.5 9.4 1.4" speed="1.5Gf" bw_in="2.25GBps" bw_out="2.25GBps" lat="500us" />
+  <peer id="100036570" coordinates="-12.7 -9.9 2.1" speed="730Mf" bw_in="2.25GBps" bw_out="2.25GBps" lat="500us" />
 </AS>
 </platform>
index 09b4c14..2f3a4fb 100644 (file)
@@ -1,50 +1,49 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
 <platform version="4">
-       
 <config id="General">
-       <prop id="network/coordinates" value="yes"></prop>
-</config>      
- <AS  id="AS0"  routing="Vivaldi">
-       <host id="100030591" coordinates="25.5 9.4 1.4" speed="1.5Gf" />
-       <host id="100036570" coordinates="-12.7 -9.9 2.1" speed="730Mf" />
-       <host id="100041334" coordinates="-15.7 9.9 14.7" speed="2.8Gf" />
-       <host id="100055671" coordinates="27.1 7.2 19.2" speed="880Mf" />
-       <host id="100066658" coordinates="11.4 10.7 24.8" speed="2Gf" />
-       <host id="100090691" coordinates="27.1 14.9 0.3" speed="1Gf" />
-       <host id="100094952" coordinates="110.1 31.2 43.7" speed="340Mf" />
-       <host id="100117943" coordinates="-21.2 -25.2 4.1" speed="1.2Gf" />
-       <host id="100126290" coordinates="-2.3 1.1 12.0" speed="1.3Gf" />
-       <host id="100144483" coordinates="16.8 -11.1 15.4" speed="1.4Gf" />
-       <host id="100152889" coordinates="-6.8 1.6 0.3" speed="1.6Gf" />
-       <host id="100178474" coordinates="23.0 -4.1 1.0" speed="1.7Gf" />
-       <host id="100180261" coordinates="29.9 -9.2 0.2" speed="2.2Gf" />
-       <host id="100185883" coordinates="-2.2 7.2 11.0" speed="770Mf" />
-       <host id="100186365" coordinates="26.1 -61.9 144.7" speed="840Mf" />
-       <host id="100200866" coordinates="-39.4 1.1 0.6" speed="1.5Gf" />
-       <host id="100207885" coordinates="26.5 -15.1 0.3" speed="1.6Gf" />
-       <host id="100224447" coordinates="15.0 -0.5 34.5" speed="720Mf" />
-       <host id="100238799" coordinates="16.5 11.5 19.2" speed="1.4Gf" />
-       <host id="100273297" coordinates="-37.9 85.0 69.8" speed="2.3Gf" />
-       <host id="100280711" coordinates="-2.6 19.4 6.4" speed="2.3Gf" />
-       <host id="100284574" coordinates="-104.4 -162.5 1.7" speed="2.3Gf" />
-       <host id="100292843" coordinates="-41.8 -30.9 5.8" speed="700Mf" />
-       <host id="100309685" coordinates="-9.9 10.4 1.9" speed="2.3Gf" />
-       <host id="100315281" coordinates="8.5 15.3 31.9" speed="2.2Gf" />
-       <host id="100317715" coordinates="6.0 -12.6 7.0" speed="1.7Gf" />
-       <host id="100324694" coordinates="89.6 26.1 17.9" speed="2.2Gf" />
-       <host id="100326641" coordinates="13.9 -31.4 8.2" speed="1.5Gf" />
-       <host id="100331484" coordinates="13.6 10.0 25.0" speed="2.2Gf" />
-       <host id="100347816" coordinates="32.2 34.0 104.4" speed="2.8Gf" />
-       <host id="100354536" coordinates="23.5 21.2 24.5" speed="2Gf" />
-       <host id="100355017" coordinates="-27.0 -12.1 4.8" speed="1.3Gf" />
-       <host id="100359203" coordinates="18.4 -4.5 1.2" speed="2.3Gf" />
-       <host id="100379397" coordinates="109.3 253.6 2.0" speed="2.5Gf" />
-       <host id="100404046" coordinates="16.5 9.4 4.2" speed="2.3Gf" />
-       <host id="100413314" coordinates="-35.9 -42.6 1.0" speed="2.8Gf" />
-       <host id="100416828" coordinates="30.4 18.9 3.5" speed="1.3Gf" />
-       <host id="100422926" coordinates="-23.1 -7.6 39.9" speed="1.6Gf" />
-       <host id="100427449" coordinates="135.5 -21.0 83.4" speed="1.4Gf" />
-       <host id="100429957" coordinates="17.5 6.7 18.8" speed="830Mf" />
-       </AS>
+  <prop id="network/coordinates" value="yes"></prop>
+</config>  
+<AS id="AS0" routing="Vivaldi">
+  <host id="100030591" coordinates="25.5 9.4 1.4" speed="1.5Gf" />
+  <host id="100036570" coordinates="-12.7 -9.9 2.1" speed="730Mf" />
+  <host id="100041334" coordinates="-15.7 9.9 14.7" speed="2.8Gf" />
+  <host id="100055671" coordinates="27.1 7.2 19.2" speed="880Mf" />
+  <host id="100066658" coordinates="11.4 10.7 24.8" speed="2Gf" />
+  <host id="100090691" coordinates="27.1 14.9 0.3" speed="1Gf" />
+  <host id="100094952" coordinates="110.1 31.2 43.7" speed="340Mf" />
+  <host id="100117943" coordinates="-21.2 -25.2 4.1" speed="1.2Gf" />
+  <host id="100126290" coordinates="-2.3 1.1 12.0" speed="1.3Gf" />
+  <host id="100144483" coordinates="16.8 -11.1 15.4" speed="1.4Gf" />
+  <host id="100152889" coordinates="-6.8 1.6 0.3" speed="1.6Gf" />
+  <host id="100178474" coordinates="23.0 -4.1 1.0" speed="1.7Gf" />
+  <host id="100180261" coordinates="29.9 -9.2 0.2" speed="2.2Gf" />
+  <host id="100185883" coordinates="-2.2 7.2 11.0" speed="770Mf" />
+  <host id="100186365" coordinates="26.1 -61.9 144.7" speed="840Mf" />
+  <host id="100200866" coordinates="-39.4 1.1 0.6" speed="1.5Gf" />
+  <host id="100207885" coordinates="26.5 -15.1 0.3" speed="1.6Gf" />
+  <host id="100224447" coordinates="15.0 -0.5 34.5" speed="720Mf" />
+  <host id="100238799" coordinates="16.5 11.5 19.2" speed="1.4Gf" />
+  <host id="100273297" coordinates="-37.9 85.0 69.8" speed="2.3Gf" />
+  <host id="100280711" coordinates="-2.6 19.4 6.4" speed="2.3Gf" />
+  <host id="100284574" coordinates="-104.4 -162.5 1.7" speed="2.3Gf" />
+  <host id="100292843" coordinates="-41.8 -30.9 5.8" speed="700Mf" />
+  <host id="100309685" coordinates="-9.9 10.4 1.9" speed="2.3Gf" />
+  <host id="100315281" coordinates="8.5 15.3 31.9" speed="2.2Gf" />
+  <host id="100317715" coordinates="6.0 -12.6 7.0" speed="1.7Gf" />
+  <host id="100324694" coordinates="89.6 26.1 17.9" speed="2.2Gf" />
+  <host id="100326641" coordinates="13.9 -31.4 8.2" speed="1.5Gf" />
+  <host id="100331484" coordinates="13.6 10.0 25.0" speed="2.2Gf" />
+  <host id="100347816" coordinates="32.2 34.0 104.4" speed="2.8Gf" />
+  <host id="100354536" coordinates="23.5 21.2 24.5" speed="2Gf" />
+  <host id="100355017" coordinates="-27.0 -12.1 4.8" speed="1.3Gf" />
+  <host id="100359203" coordinates="18.4 -4.5 1.2" speed="2.3Gf" />
+  <host id="100379397" coordinates="109.3 253.6 2.0" speed="2.5Gf" />
+  <host id="100404046" coordinates="16.5 9.4 4.2" speed="2.3Gf" />
+  <host id="100413314" coordinates="-35.9 -42.6 1.0" speed="2.8Gf" />
+  <host id="100416828" coordinates="30.4 18.9 3.5" speed="1.3Gf" />
+  <host id="100422926" coordinates="-23.1 -7.6 39.9" speed="1.6Gf" />
+  <host id="100427449" coordinates="135.5 -21.0 83.4" speed="1.4Gf" />
+  <host id="100429957" coordinates="17.5 6.7 18.8" speed="830Mf" />
+</AS>
 </platform>
index 7e17983..b782cdc 100644 (file)
@@ -1,6 +1,7 @@
 #! ./tesh
 
 $ ${bindir:=.}/io/sd_io ${srcdir:=.}/examples/platforms/storage/storage.xml 
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'default'
 > [0.000000] [sd_io/INFO] Workstation 'denise' mounts 'c:'
 > [0.000000] [sd_io/INFO] Workstation 'denise' mounts '/home'
 > [0.000000] [sd_io/INFO] Workstation 'alice' mounts 'c:'
index 1d6e240..dba26b2 100644 (file)
@@ -238,7 +238,7 @@ Java_org_simgrid_msg_Host_setProperty(JNIEnv *env, jobject jhost, jobject jname,
 
   MSG_host_set_property_value(host, name, value, xbt_free_f);
 
-  env->ReleaseStringUTFChars((jstring) jvalue, value);
+  env->ReleaseStringUTFChars((jstring) jvalue, value_java);
   env->ReleaseStringUTFChars((jstring) jname, name);
 
 }
index cc3b39b..1af9c1e 100644 (file)
@@ -182,7 +182,7 @@ Java_org_simgrid_msg_Storage_setProperty(JNIEnv *env, jobject jstorage, jobject
 
   MSG_storage_set_property_value(storage, name, value, xbt_free_f);
 
-  env->ReleaseStringUTFChars((jstring) jvalue, value);
+  env->ReleaseStringUTFChars((jstring) jvalue, value_java);
   env->ReleaseStringUTFChars((jstring) jname, name);
 
 }
index 1979185..2f47778 100644 (file)
@@ -856,10 +856,6 @@ set(DOC_SOURCES
   doc/triva-time_interval.png
   doc/triva-time_interval.svg
 
-  doc/HelloWorld/CMakeLists.txt
-  doc/HelloWorld/HelloWorld.c
-  doc/HelloWorld/README
-
   doc/doxygen/FAQ.doc
   doc/doxygen/advanced.doc
   doc/doxygen/bindings.doc
@@ -1180,12 +1176,8 @@ set(CMAKE_SOURCE_FILES
   tools/cmake/scripts/IPC/Run/Win32IO.pm
   tools/cmake/scripts/IPC/Run/Win32Pump.pm
   tools/cmake/scripts/Diff.pm
-  tools/cmake/scripts/Makefile.default
-  tools/cmake/scripts/SimGrid.packproj
   tools/cmake/scripts/generate_memcheck_tests.pl
   tools/cmake/scripts/my_valgrind.pl
-  tools/cmake/scripts/postinstall.sh
-  tools/cmake/scripts/preinstall.sh
   tools/cmake/scripts/update_tesh.pl
   tools/cmake/UnitTesting.cmake
   tools/cmake/src/internal_config.h.in
index 5e4d31d..8f5338d 100644 (file)
@@ -6,8 +6,6 @@
 file(MAKE_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/html/)
 install(DIRECTORY "${CMAKE_HOME_DIRECTORY}/doc/html/"
   DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/doc/simgrid/html/)
-install(DIRECTORY "${CMAKE_HOME_DIRECTORY}/doc/HelloWorld/"
-  DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/doc/simgrid/HelloWorld/)
 
 # binaries
 if(enable_smpi)
@@ -229,7 +227,6 @@ endforeach(file ${source_to_pack})
 
 add_custom_command(
   TARGET dist-dir
-  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/tools/cmake/scripts/Makefile.default ${PROJECT_NAME}-${release_version}/Makefile
   COMMAND ${CMAKE_COMMAND} -E echo "${GIT_VERSION}" > ${PROJECT_NAME}-${release_version}/.gitversion
   )
 
index 7d582cd..d3d6c0a 100644 (file)
@@ -505,6 +505,7 @@ IF(NOT enable_memcheck)
     ADD_TESH(java-cloud-migration                --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/cloud/migration/migration.tesh)
     ADD_TESH(java-commTime                       --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/commTime/commtime.tesh)
     ADD_TESH(java-energy                         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/energy/energy.tesh)
+    ADD_TESH(java-storage                        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/io/storage.tesh)
     ADD_TESH(java-kademlia                       --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/kademlia/kademlia.tesh)
     ADD_TESH(java-kill                           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/master_slave_kill/kill.tesh)
     ADD_TESH(java-masterslave                    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/masterslave/masterslave.tesh)
diff --git a/tools/cmake/scripts/Makefile.default b/tools/cmake/scripts/Makefile.default
deleted file mode 100644 (file)
index a7d7400..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#THIS Makefile should be erase by Cmake when use command "cmake."
-
-all : 
-       @echo "THIS COMMAND IS NOT AVAILABLE!"
-       @echo "Since v3.4 we use Cmake. Now use:"
-       @echo "\tcmake -DCMAKE_INSTALL_PREFIX=<where_you_want> .\n\tmake\n\tmake install"
-
-clean : all
diff --git a/tools/cmake/scripts/SimGrid.packproj b/tools/cmake/scripts/SimGrid.packproj
deleted file mode 100644 (file)
index 4bdcc1e..0000000
+++ /dev/null
@@ -1,565 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>Hierarchy</key>
-       <dict>
-               <key>Attributes</key>
-               <dict>
-                       <key>Documents</key>
-                       <dict>
-                               <key>Background Image</key>
-                               <dict>
-                                       <key>IFPkgFlagBackgroundAlignment</key>
-                                       <integer>6</integer>
-                                       <key>IFPkgFlagBackgroundScaling</key>
-                                       <integer>2</integer>
-                                       <key>Mode</key>
-                                       <integer>1</integer>
-                                       <key>Path</key>
-                                       <string>../../doc/webcruft/simgrid_logo_2011.gif</string>
-                                       <key>Path Type</key>
-                                       <integer>2</integer>
-                               </dict>
-                               <key>License</key>
-                               <dict>
-                                       <key>International</key>
-                                       <dict>
-                                               <key>Mode</key>
-                                               <integer>0</integer>
-                                               <key>Path</key>
-                                               <string>../../LICENSE-LGPL-2.1</string>
-                                               <key>Path Type</key>
-                                               <integer>2</integer>
-                                       </dict>
-                               </dict>
-                               <key>ReadMe</key>
-                               <dict>
-                                       <key>International</key>
-                                       <dict>
-                                               <key>Mode</key>
-                                               <integer>0</integer>
-                                               <key>Path</key>
-                                               <string>../../README</string>
-                                               <key>Path Type</key>
-                                               <integer>2</integer>
-                                       </dict>
-                               </dict>
-                               <key>Welcome</key>
-                               <dict>
-                                       <key>International</key>
-                                       <dict>
-                                               <key>Mode</key>
-                                               <integer>0</integer>
-                                               <key>Path</key>
-                                               <string></string>
-                                               <key>Path Type</key>
-                                               <integer>2</integer>
-                                       </dict>
-                               </dict>
-                       </dict>
-                       <key>Files</key>
-                       <dict>
-                               <key>Compress</key>
-                               <true/>
-                               <key>Hierarchy</key>
-                               <dict>
-                                       <key>Children</key>
-                                       <array>
-                                               <dict>
-                                                       <key>Children</key>
-                                                       <array>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>SimGrid</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>2</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Utilities</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                       </array>
-                                                       <key>GID</key>
-                                                       <integer>80</integer>
-                                                       <key>Path</key>
-                                                       <string>Applications</string>
-                                                       <key>Path Type</key>
-                                                       <integer>1</integer>
-                                                       <key>Privileges</key>
-                                                       <integer>509</integer>
-                                                       <key>Type</key>
-                                                       <integer>1</integer>
-                                                       <key>UID</key>
-                                                       <integer>0</integer>
-                                               </dict>
-                                               <dict>
-                                                       <key>Children</key>
-                                                       <array>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Application Support</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Documentation</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Filesystems</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Frameworks</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Internet Plug-Ins</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>PreferencePanes</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Preferences</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Printers</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>QuickTime</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array/>
-                                                                       <key>GID</key>
-                                                                       <integer>80</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Scripts</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>509</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                       </array>
-                                                       <key>GID</key>
-                                                       <integer>80</integer>
-                                                       <key>Path</key>
-                                                       <string>Library</string>
-                                                       <key>Path Type</key>
-                                                       <integer>1</integer>
-                                                       <key>Privileges</key>
-                                                       <integer>1021</integer>
-                                                       <key>Type</key>
-                                                       <integer>1</integer>
-                                                       <key>UID</key>
-                                                       <integer>0</integer>
-                                               </dict>
-                                               <dict>
-                                                       <key>Children</key>
-                                                       <array>
-                                                               <dict>
-                                                                       <key>Children</key>
-                                                                       <array>
-                                                                               <dict>
-                                                                                       <key>Children</key>
-                                                                                       <array/>
-                                                                                       <key>GID</key>
-                                                                                       <integer>0</integer>
-                                                                                       <key>Path</key>
-                                                                                       <string>Extensions</string>
-                                                                                       <key>Path Type</key>
-                                                                                       <integer>1</integer>
-                                                                                       <key>Privileges</key>
-                                                                                       <integer>493</integer>
-                                                                                       <key>Type</key>
-                                                                                       <integer>1</integer>
-                                                                                       <key>UID</key>
-                                                                                       <integer>0</integer>
-                                                                               </dict>
-                                                                       </array>
-                                                                       <key>GID</key>
-                                                                       <integer>0</integer>
-                                                                       <key>Path</key>
-                                                                       <string>Library</string>
-                                                                       <key>Path Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>Privileges</key>
-                                                                       <integer>493</integer>
-                                                                       <key>Type</key>
-                                                                       <integer>1</integer>
-                                                                       <key>UID</key>
-                                                                       <integer>0</integer>
-                                                               </dict>
-                                                       </array>
-                                                       <key>GID</key>
-                                                       <integer>0</integer>
-                                                       <key>Path</key>
-                                                       <string>System</string>
-                                                       <key>Path Type</key>
-                                                       <integer>1</integer>
-                                                       <key>Privileges</key>
-                                                       <integer>493</integer>
-                                                       <key>Type</key>
-                                                       <integer>1</integer>
-                                                       <key>UID</key>
-                                                       <integer>0</integer>
-                                               </dict>
-                                       </array>
-                                       <key>GID</key>
-                                       <integer>80</integer>
-                                       <key>Path</key>
-                                       <string>/</string>
-                                       <key>Path Type</key>
-                                       <integer>1</integer>
-                                       <key>Privileges</key>
-                                       <integer>1021</integer>
-                                       <key>Type</key>
-                                       <integer>1</integer>
-                                       <key>UID</key>
-                                       <integer>0</integer>
-                               </dict>
-                               <key>IFPkgFlagDefaultLocation</key>
-                               <string>/Applications/SimGrid</string>
-                               <key>Imported Package</key>
-                               <false/>
-                               <key>Package Path</key>
-                               <string></string>
-                               <key>Split Forks</key>
-                               <true/>
-                       </dict>
-                       <key>Plugins</key>
-                       <dict>
-                               <key>PluginsList</key>
-                               <array>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string>Introduction</string>
-                                               <key>Type</key>
-                                               <integer>0</integer>
-                                       </dict>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string>ReadMe</string>
-                                               <key>Type</key>
-                                               <integer>0</integer>
-                                       </dict>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string>License</string>
-                                               <key>Type</key>
-                                               <integer>0</integer>
-                                       </dict>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string>Target</string>
-                                               <key>Type</key>
-                                               <integer>0</integer>
-                                       </dict>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string>PackageSelection</string>
-                                               <key>Type</key>
-                                               <integer>0</integer>
-                                       </dict>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string>Install</string>
-                                               <key>Type</key>
-                                               <integer>0</integer>
-                                       </dict>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string>FinishUp</string>
-                                               <key>Type</key>
-                                               <integer>0</integer>
-                                       </dict>
-                               </array>
-                       </dict>
-                       <key>Scripts</key>
-                       <dict>
-                               <key>Additional Resources</key>
-                               <dict>
-                                       <key>International</key>
-                                       <array/>
-                               </dict>
-                               <key>Installation Scripts</key>
-                               <dict>
-                                       <key>IFInstallationScriptsPostflight</key>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string></string>
-                                               <key>Status</key>
-                                               <false/>
-                                       </dict>
-                                       <key>IFInstallationScriptsPostinstall</key>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string>postinstall.sh</string>
-                                               <key>Path Type</key>
-                                               <integer>2</integer>
-                                               <key>Status</key>
-                                               <true/>
-                                       </dict>
-                                       <key>IFInstallationScriptsPostupgrade</key>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string></string>
-                                               <key>Status</key>
-                                               <false/>
-                                       </dict>
-                                       <key>IFInstallationScriptsPreflight</key>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string></string>
-                                               <key>Status</key>
-                                               <false/>
-                                       </dict>
-                                       <key>IFInstallationScriptsPreinstall</key>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string>preinstall.sh</string>
-                                               <key>Path Type</key>
-                                               <integer>2</integer>
-                                               <key>Status</key>
-                                               <true/>
-                                       </dict>
-                                       <key>IFInstallationScriptsPreupgrade</key>
-                                       <dict>
-                                               <key>Path</key>
-                                               <string></string>
-                                               <key>Status</key>
-                                               <false/>
-                                       </dict>
-                               </dict>
-                               <key>Requirements</key>
-                               <array/>
-                       </dict>
-                       <key>Settings</key>
-                       <dict>
-                               <key>Description</key>
-                               <dict>
-                                       <key>International</key>
-                                       <dict>
-                                               <key>IFPkgDescriptionDeleteWarning</key>
-                                               <string></string>
-                                               <key>IFPkgDescriptionDescription</key>
-                                               <string>SimGrid is a toolkit that provides core functionalities for the simulation of distributed applications in heterogeneous distributed environments. The specific goal of the project is to facilitate research in the area of parallel and distributed large scale systems, such as Grids, P2P systems and clouds. Its use cases encompass heuristic evaluation, application prototyping or even real application development and tuning.</string>
-                                               <key>IFPkgDescriptionTitle</key>
-                                               <string>SimGrid</string>
-                                               <key>IFPkgDescriptionVersion</key>
-                                               <string>3.8</string>
-                                       </dict>
-                               </dict>
-                               <key>Display Information</key>
-                               <dict>
-                                       <key>CFBundleGetInfoString</key>
-                                       <string>SimGrid 1.0 Copyrights © 2012 My Great Company</string>
-                                       <key>CFBundleIconFile</key>
-                                       <string>../../doc/webcruft/SGicon.icns</string>
-                                       <key>CFBundleIconFile Path Type</key>
-                                       <integer>2</integer>
-                                       <key>CFBundleIdentifier</key>
-                                       <string>com.mygreatcompany.pkg.SimGrid</string>
-                                       <key>CFBundleName</key>
-                                       <string>SimGrid</string>
-                                       <key>CFBundleShortVersionString</key>
-                                       <string>1.0</string>
-                               </dict>
-                               <key>Options</key>
-                               <dict>
-                                       <key>IFPkgFlagAllowBackRev</key>
-                                       <false/>
-                                       <key>IFPkgFlagAuthorizationAction</key>
-                                       <integer>0</integer>
-                                       <key>IFPkgFlagFollowLinks</key>
-                                       <false/>
-                                       <key>IFPkgFlagIsRequired</key>
-                                       <false/>
-                                       <key>IFPkgFlagOverwritePermissions</key>
-                                       <false/>
-                                       <key>IFPkgFlagRelocatable</key>
-                                       <false/>
-                                       <key>IFPkgFlagRestartAction</key>
-                                       <integer>0</integer>
-                                       <key>IFPkgFlagRootVolumeOnly</key>
-                                       <false/>
-                                       <key>IFPkgFlagUpdateInstalledLanguages</key>
-                                       <false/>
-                               </dict>
-                               <key>Version</key>
-                               <dict>
-                                       <key>IFMajorVersion</key>
-                                       <integer>3</integer>
-                                       <key>IFMinorVersion</key>
-                                       <integer>8</integer>
-                               </dict>
-                       </dict>
-               </dict>
-               <key>IFPkgFlagPackageSelection</key>
-               <integer>0</integer>
-               <key>Name</key>
-               <string>SimGrid-3.8</string>
-               <key>Status</key>
-               <integer>1</integer>
-               <key>Type</key>
-               <integer>1</integer>
-       </dict>
-       <key>Name</key>
-       <string>Project</string>
-       <key>Settings</key>
-       <dict>
-               <key>10.1 Compatibility</key>
-               <true/>
-               <key>Build Path</key>
-               <string>build</string>
-               <key>Build Path Type</key>
-               <integer>2</integer>
-               <key>Comment</key>
-               <string></string>
-               <key>Remove .DS_Store</key>
-               <true/>
-               <key>Remove .pbdevelopment</key>
-               <true/>
-               <key>Remove CVS</key>
-               <false/>
-       </dict>
-</dict>
-</plist>
diff --git a/tools/cmake/scripts/postinstall.sh b/tools/cmake/scripts/postinstall.sh
deleted file mode 100755 (executable)
index ef11450..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-echo "export SIMGRID_ROOT=/Applications/SimGrid" >> ~/.profile
-echo "export DYLD_LYBRARY_PATH=$DYLD_LYBRARY_PATH:$SIMGRID_ROOT/lib" >> ~/.profile
\ No newline at end of file
diff --git a/tools/cmake/scripts/preinstall.sh b/tools/cmake/scripts/preinstall.sh
deleted file mode 100755 (executable)
index f093e59..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/bash
-echo "\n#SIMGRID ICEBERG" >> ~/.profile
-return 0
\ No newline at end of file