Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Roots of the experimentation infrastructure and Modify make_deployment (to add versio...
authoramad206 <amad206@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 9 Jun 2006 14:56:55 +0000 (14:56 +0000)
committeramad206 <amad206@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 9 Jun 2006 14:56:55 +0000 (14:56 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2368 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/gras/tokenS/make_deployment.pl
examples/gras/tokenS/run.sh [new file with mode: 0755]

index ca771e9..5e69deb 100755 (executable)
@@ -19,7 +19,7 @@ while (<IN>) {
 
 print "<?xml version='1.0'?>\n";
 print "<!DOCTYPE platform_description SYSTEM \"surfxml.dtd\">\n";
-print "<platform_description>\n\n";
+print "<platform_description version=\"1\">\n\n";
 
 
 my $it_port=4000;
diff --git a/examples/gras/tokenS/run.sh b/examples/gras/tokenS/run.sh
new file mode 100755 (executable)
index 0000000..f8aa0bd
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+#
+# USAGE: run.sh  plaform  nb_host 
+#
+# This script takes a platform file and a number of hosts as argument.
+#
+# It generates the right deployment platform and run the experiment, 
+#  only showing the last line of the run, showing the resulting time.
+
+plat=$1
+nb_host=$2
+
+set -e
+
+if [ -z $plat -o -z $nb_host ] ; then
+  # invalid argument. Display the comment at the script begining & exit
+  grep '^#\(\([^!]\)\|$\)' $0 | sed 's/# *//' >&2
+  exit 1
+fi
+if ! [ -e $plat ] ; then
+  echo "Platform file not found" >&2
+  exit 1
+fi
+
+echo "Generating the deployment"
+./make_deployment.pl $plat $nb_host > tmp_deployment_$nb_host
+echo "Running the experiment"
+./tokenS_simulator $plat tmp_deployment_$nb_host 2>&1 |tee run.log|grep "Congrat"
+rm tmp_deployment_$nb_host