git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4121
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
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 $nb_hosts = shift @ARGV || 0;
my @host;
push @host, $1;
}
+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;
+}
+
# map { print "$_\n" } @host;
print "<?xml version='1.0'?>\n";