Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Chord: load a platform with appropriate size
authorthiery <thiery@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Jan 2011 17:04:20 +0000 (17:04 +0000)
committerthiery <thiery@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Jan 2011 17:04:20 +0000 (17:04 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9443 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/msg/chord/run_chord
examples/platforms/cluster_with_100000_hosts.xml [new file with mode: 0644]
examples/platforms/cluster_with_10000_hosts.xml [new file with mode: 0644]
examples/platforms/cluster_with_1000_hosts.xml [new file with mode: 0644]
examples/platforms/cluster_with_100_hosts.xml [new file with mode: 0644]

index e6f3b9c..8c3049b 100755 (executable)
@@ -1,8 +1,48 @@
 #!/bin/bash
 
 #!/bin/bash
 
-nb_lines=$[$1 + 3]
-head -n $nb_lines chord100000.xml > tmp_depl.xml
+# This script runs Chord with the specified number of nodes.
+# Usage: ./run_chord nb_nodes
+# The platform file is chosen as the smallest platform of the files
+# examples/platforms/cluster_with_*_hosts.xml that contains enough nodes.
+
+# check arguments number
+if [ $# != 1 ]; then
+  echo "Usage: ./run_chord nb_nodes"
+  exit 1
+fi
+
+# pick an appropriate platform file
+if [ $1 -le 100 ]; then
+  platform=100
+else
+  if [ $1 -le 1000 ]; then
+    platform=1000
+  else
+    if [ $1 -le 10000 ]; then
+      platform=10000
+    else
+      if [ $1 -le 100000 ]; then
+       platform=100000
+      else
+       if [ $1 -le 300000 ]; then
+         platform=300000
+       else
+         echo "Cannot find a platform file large enough."
+         exit 2
+       fi
+      fi
+    fi
+  fi
+fi
+
+# set up the deployment file
+nb_lines=$[ $1 + 3]
+head -n $nb_lines chord300000.xml > tmp_depl.xml
 echo "</platform>" >> tmp_depl.xml
 echo "</platform>" >> tmp_depl.xml
-./chord -nb_bits=24 -timeout=200 ../../platforms/cluster_with_300000_hosts.xml tmp_depl.xml
-#rm tmp_depl.xml
+
+# run Chord
+./chord -nb_bits=24 -timeout=50 "../../platforms/cluster_with_${platform}_hosts.xml" tmp_depl.xml
+
+# cleanup
+# rm tmp_depl.xml
 
 
diff --git a/examples/platforms/cluster_with_100000_hosts.xml b/examples/platforms/cluster_with_100000_hosts.xml
new file mode 100644 (file)
index 0000000..50c0bbc
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "simgrid.dtd">
+<platform version="3">
+<AS  id="AS0"  routing="Full">
+  <cluster id="my_cluster_1" prefix="c-" suffix=".me"
+               radical="0-99999"       power="1000000000"    bw="125000000"     lat="5E-5"
+        bb_bw="2250000000" bb_lat="5E-4"/>
+</AS>
+</platform>
diff --git a/examples/platforms/cluster_with_10000_hosts.xml b/examples/platforms/cluster_with_10000_hosts.xml
new file mode 100644 (file)
index 0000000..eb8c2f6
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "simgrid.dtd">
+<platform version="3">
+<AS  id="AS0"  routing="Full">
+  <cluster id="my_cluster_1" prefix="c-" suffix=".me"
+               radical="0-9999"        power="1000000000"    bw="125000000"     lat="5E-5"
+        bb_bw="2250000000" bb_lat="5E-4"/>
+</AS>
+</platform>
diff --git a/examples/platforms/cluster_with_1000_hosts.xml b/examples/platforms/cluster_with_1000_hosts.xml
new file mode 100644 (file)
index 0000000..c9fbf4e
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "simgrid.dtd">
+<platform version="3">
+<AS  id="AS0"  routing="Full">
+  <cluster id="my_cluster_1" prefix="c-" suffix=".me"
+               radical="0-999" power="1000000000"    bw="125000000"     lat="5E-5"
+        bb_bw="2250000000" bb_lat="5E-4"/>
+</AS>
+</platform>
diff --git a/examples/platforms/cluster_with_100_hosts.xml b/examples/platforms/cluster_with_100_hosts.xml
new file mode 100644 (file)
index 0000000..2638b15
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "simgrid.dtd">
+<platform version="3">
+<AS  id="AS0"  routing="Full">
+  <cluster id="my_cluster_1" prefix="c-" suffix=".me"
+               radical="0-99"  power="1000000000"    bw="125000000"     lat="5E-5"
+        bb_bw="2250000000" bb_lat="5E-4"/>
+</AS>
+</platform>