From 9aa658ba9db1eedba9c05d2a95b917ed0c298dec Mon Sep 17 00:00:00 2001 From: amad206 Date: Fri, 9 Jun 2006 14:56:55 +0000 Subject: [PATCH] Roots of the experimentation infrastructure and Modify make_deployment (to add version="1" in deployment file) 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 | 2 +- examples/gras/tokenS/run.sh | 30 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 examples/gras/tokenS/run.sh diff --git a/examples/gras/tokenS/make_deployment.pl b/examples/gras/tokenS/make_deployment.pl index ca771e9d88..5e69debd6e 100755 --- a/examples/gras/tokenS/make_deployment.pl +++ b/examples/gras/tokenS/make_deployment.pl @@ -19,7 +19,7 @@ while () { print "\n"; print "\n"; -print "\n\n"; +print "\n\n"; my $it_port=4000; diff --git a/examples/gras/tokenS/run.sh b/examples/gras/tokenS/run.sh new file mode 100755 index 0000000000..f8aa0bda6c --- /dev/null +++ b/examples/gras/tokenS/run.sh @@ -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 -- 2.20.1