From 83eccfb5c38c8430d0d6e4dceb94b608702711a0 Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 1 Dec 2005 14:30:02 +0000 Subject: [PATCH] A script to avoid writting deployment files containing thousands of hosts git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1846 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/gras/tokenS/make_deployment.pl | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 examples/gras/tokenS/make_deployment.pl diff --git a/examples/gras/tokenS/make_deployment.pl b/examples/gras/tokenS/make_deployment.pl new file mode 100755 index 0000000000..ca771e9d88 --- /dev/null +++ b/examples/gras/tokenS/make_deployment.pl @@ -0,0 +1,50 @@ +#! /usr/bin/perl + +use strict; + +my $input = shift @ARGV || die "Usage: $ARGV[0] platform_file.xml nb_host\n"; +my $nb_hosts = shift @ARGV || die "Usage: $ARGV[0] platform_file.xml nb_host\n"; + +my @host; + +open IN,$input || die "Cannot open $input: $!\n"; + +while () { + next unless /\n"; +print "\n"; +print "\n\n"; + + +my $it_port=4000; +my $it_host=0; + +for (my $i=0; $i<$nb_hosts -1; $i++) { + + print " \n"; + print " \n"; + $it_host ++; + if ($it_host == scalar @host) { + $it_host=0; + $it_port++; + } + print " \n"; + print " \n"; + print " \n\n"; + +} + +print " \n"; +print " \n"; +print " \n"; +print " \n"; +print " \n"; +print " \n\n"; + +print "\n"; -- 2.20.1