From: mquinson Date: Fri, 19 May 2006 10:36:26 +0000 (+0000) Subject: Modify the experimentation suite so that it can test the broadcast stuff X-Git-Tag: v3.3~3104 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/21466415aa95704f2c9a9b5a87cb7646bef177b6 Modify the experimentation suite so that it can test the broadcast stuff git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2254 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/gras/all2all/make_deployment.pl b/examples/gras/all2all/make_deployment.pl index cf0e4c063f..6b4e2e3154 100755 --- a/examples/gras/all2all/make_deployment.pl +++ b/examples/gras/all2all/make_deployment.pl @@ -4,12 +4,15 @@ use strict; sub usage { print STDERR <\n"; print "\n"; @@ -62,12 +66,8 @@ $it_port=4000; $it_host=0; for (my $i=0; $i<$nb_hosts; $i++) { - print " \n"; - print $receivers; - print " \n"; - print " \n"; - print " \n"; + print " \n"; print " \n\n"; $it_host ++; @@ -77,4 +77,25 @@ for (my $i=0; $i<$nb_hosts; $i++) { } } +# +# Here come the sender(s) + +# reset iterators +$it_port=4000; +$it_host=0; + +for (my $i=0; $i<$nb_hosts; $i++) { + if (undef($source) || $source == $i) { + print " \n"; + print $receivers; + print " \n"; + } + + $it_host ++; + if ($it_host == scalar @host) { + $it_host=0; + $it_port++; + } +} + print "\n"; diff --git a/examples/gras/all2all/run.sh b/examples/gras/all2all/run.sh index e27ac159e1..36d5147878 100755 --- a/examples/gras/all2all/run.sh +++ b/examples/gras/all2all/run.sh @@ -1,15 +1,18 @@ #! /bin/bash # -# USAGE: run.sh plaform nb_host +# USAGE: run.sh plaform nb_host (broadcast source?) # # This script takes a platform file and a number of hosts as argument. +# if a third argument is passed, this is the source of the broadcast +# (given as a number between 0 and nb_host-1). # # 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 +bcast=$3 set -e if [ -z $plat -o -z $nb_host ] ; then @@ -23,7 +26,7 @@ if ! [ -e $plat ] ; then fi echo "Generating the deployment" -./make_deployment.pl $plat $nb_host > tmp_deployment_$nb_host +./make_deployment.pl $plat $nb_host $bcast > tmp_deployment_$nb_host echo "Running the experiment" ./all2all_simulator $plat tmp_deployment_$nb_host 2>&1 |tee run.log|grep "Congrat" rm tmp_deployment_$nb_host