X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1f0122b5308bf080e16c9ae72134609a983fcb7d..21466415aa95704f2c9a9b5a87cb7646bef177b6:/examples/gras/all2all/make_deployment.pl 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";