X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/43bc6b8bca8abe222efa9cc72faf0018b1c8867d..a1757b8e6b03369034f2d251bcffc37e61a3c20a:/examples/gras/pmm/make_deployment.pl diff --git a/examples/gras/pmm/make_deployment.pl b/examples/gras/pmm/make_deployment.pl index 3319f88abb..6d8fe8e332 100755 --- a/examples/gras/pmm/make_deployment.pl +++ b/examples/gras/pmm/make_deployment.pl @@ -18,7 +18,7 @@ EOH } my $input = shift @ARGV || usage(); -my $nb_hosts = shift @ARGV || ""; +my $nb_slaves = shift @ARGV || ""; # my $source = shift || ""; my @host; @@ -26,7 +26,7 @@ my @host; open IN,$input || die "Cannot open $input: $!\n"; while () { - next unless /) { die "No host found in $input. Is it really a SimGrid platform file?\nCheck that you didn't pass a deployment file, for example.\n" unless (scalar @host); -if (! $nb_hosts) { - $nb_hosts = scalar @host; +if (! $nb_slaves) { + $nb_slaves = (scalar @host) - 1; } # @@ -47,8 +47,8 @@ my $port_num = 4000; my $master = $host[0]; print "\n"; -print "\n"; -print "\n\n"; +print "\n"; +print "\n\n"; print " \n"; print " \n"; print " \n"; @@ -58,15 +58,15 @@ print " \n"; # reset iterators my $it_host=1; -for (my $i=0; $i<$nb_hosts; $i++) { +for (my $i=0; $i<$nb_slaves; $i++) { print " \n"; $it_host ++; if ($it_host == scalar @host) { - $it_host=1; + $it_host = 0; } } -print "\n"; +print "\n";