From 3cbdff2439bf851c8bfe40bb452dc3a6f702424d Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 20 Jun 2006 23:37:07 +0000 Subject: [PATCH 1/1] First draft, doesn't work for now but I can barely keep the eyes open git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2413 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/gras/pmm/make_deployment.pl | 79 ++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100755 examples/gras/pmm/make_deployment.pl diff --git a/examples/gras/pmm/make_deployment.pl b/examples/gras/pmm/make_deployment.pl new file mode 100755 index 0000000000..3e5f4c4018 --- /dev/null +++ b/examples/gras/pmm/make_deployment.pl @@ -0,0 +1,79 @@ +#! /usr/bin/perl + +use strict; + +sub usage { + print STDERR <) { + next unless /\n"; +print "\n"; +print "\n\n"; +print " \n"; +print " \n"; + +# put the slaves as argument of the master + +my $it_host=0; # iterator +my $it_port=4000; # iterator, in case we have so much processes to add that we must change it +for (my $i=0; $i<$nb_hosts; $i++) { + print " \n"; + $it_host ++; + if ($it_host == scalar @host) { + $it_host=0; + $it_port++; + } +} +print " \n"; + +# Start the slaves also +# reset iterators +$it_port=4000; +$it_host=0; + +for (my $i=0; $i<$nb_hosts; $i++) { + print " \n"; + + $it_host ++; + if ($it_host == scalar @host) { + $it_host=0; + $it_port++; + } +} + + +print "\n"; + -- 2.20.1