git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2356
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
my $input = shift @ARGV || usage();
my $nb_hosts = shift @ARGV || usage();
my $input = shift @ARGV || usage();
my $nb_hosts = shift @ARGV || usage();
+my $source = shift || "";
for (my $i=0; $i<$nb_hosts; $i++) {
print " <process host=\"".$host[$it_host]."\" function=\"receiver\">\n";
for (my $i=0; $i<$nb_hosts; $i++) {
print " <process host=\"".$host[$it_host]."\" function=\"receiver\">\n";
- print " <argument value=\"$it_port\"/><argument value=\"".(undef($source)?$nb_hosts:1)."\"/>\n";
+ print " <argument value=\"$it_port\"/><argument value=\"".(length($source)?1:$nb_hosts)."\"/>\n";
print " </process>\n\n";
$it_host ++;
print " </process>\n\n";
$it_host ++;
$it_host=0;
for (my $i=0; $i<$nb_hosts; $i++) {
$it_host=0;
for (my $i=0; $i<$nb_hosts; $i++) {
- if (undef($source) || $source == $i) {
+ if (!length($source) || $source == $i) {
print " <process host=\"".$host[$it_host]."\" function=\"sender\">\n";
print $receivers;
print " </process>\n";
print " <process host=\"".$host[$it_host]."\" function=\"sender\">\n";
print $receivers;
print " </process>\n";
}
print "</platform_description>\n";
}
print "</platform_description>\n";
+
+# print "source='$source' nb_hosts=$nb_hosts\n";