X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1d56048a731508dcb0d38937132533c10ecc0655..eeb8c94868c1037c404a03b47ee7009f46049502:/buildtools/Cmake/transform_optorsim_platform.pl diff --git a/buildtools/Cmake/transform_optorsim_platform.pl b/buildtools/Cmake/transform_optorsim_platform.pl index 438dc54a0b..2efc350f57 100644 --- a/buildtools/Cmake/transform_optorsim_platform.pl +++ b/buildtools/Cmake/transform_optorsim_platform.pl @@ -38,25 +38,39 @@ while(defined($line=)) elsif($line =~ /^([0-9]*) ([0-9]*) ([0-9]*) (.*)$/) { if($1.$2.$3 == "000"){ - push @routers, "\t\n"; + if(@list_of_name){ + push @routers, "\t\n"; + } + else{ + push @routers, "\t\n"; + } } else{ $power = $1 * $3; if($power == 0){ $power=1; } - push @hosts, "\t\n"; + if(@list_of_name){ + push @hosts, "\t\n"; + } + else{ + push @hosts, "\t\n"; + } } my $table = $4; @tokens = split(/ /,$table); foreach $token (@tokens) { if($token != "0"){ -# print "from \"$list_of_name[$src]\" to \"$list_of_name[$dst]\" bdw=\"$token\"\n"; if($src <= $dst){ push @links, "\t\n"; - push @routes, "\t\n"; + if(@list_of_name){ + push @routes, "\t\n"; + } + else{ + push @routes, "\t\n"; + } push @routes, "\t\t\n"; push @routes, "\t\n"; $num_link++;