A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
For Nightly use the default configuration.
[simgrid.git]
/
buildtools
/
Cmake
/
transform_optorsim_platform.pl
diff --git
a/buildtools/Cmake/transform_optorsim_platform.pl
b/buildtools/Cmake/transform_optorsim_platform.pl
index
438dc54
..
2efc350
100644
(file)
--- a/
buildtools/Cmake/transform_optorsim_platform.pl
+++ b/
buildtools/Cmake/transform_optorsim_platform.pl
@@
-38,25
+38,39
@@
while(defined($line=<FILE>))
elsif($line =~ /^([0-9]*) ([0-9]*) ([0-9]*) (.*)$/)
{
if($1.$2.$3 == "000"){
elsif($line =~ /^([0-9]*) ([0-9]*) ([0-9]*) (.*)$/)
{
if($1.$2.$3 == "000"){
- push @routers, "\t<router id=\"$list_of_name[$src]\"/>\n";
+ if(@list_of_name){
+ push @routers, "\t<router id=\"$list_of_name[$src]\"/>\n";
+ }
+ else{
+ push @routers, "\t<router id=\"$src\"/>\n";
+ }
}
else{
$power = $1 * $3;
if($power == 0){
$power=1;
}
}
else{
$power = $1 * $3;
if($power == 0){
$power=1;
}
- push @hosts, "\t<host id=\"$list_of_name[$src]\" power=\"$power\"/>\n";
+ if(@list_of_name){
+ push @hosts, "\t<host id=\"$list_of_name[$src]\" power=\"$power\"/>\n";
+ }
+ else{
+ push @hosts, "\t<host id=\"$src\" power=\"$power\"/>\n";
+ }
}
my $table = $4;
@tokens = split(/ /,$table);
foreach $token (@tokens) {
if($token != "0"){
}
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<link id=\"link$num_link\" bandwidth=\"$token\"/>\n";
if($src <= $dst){
push @links, "\t<link id=\"link$num_link\" bandwidth=\"$token\"/>\n";
- push @routes, "\t<route src=\"$list_of_name[$src]\" dst=\"$list_of_name[$dst]\">\n";
+ if(@list_of_name){
+ push @routes, "\t<route src=\"$list_of_name[$src]\" dst=\"$list_of_name[$dst]\">\n";
+ }
+ else{
+ push @routes, "\t<route src=\"$src\" dst=\"$dst\">\n";
+ }
push @routes, "\t\t<link_ctn id=\"link$num_link\"/>\n";
push @routes, "\t</route>\n";
$num_link++;
push @routes, "\t\t<link_ctn id=\"link$num_link\"/>\n";
push @routes, "\t</route>\n";
$num_link++;