X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/514d23d34addf27e35afce0d771e7caaa0adf773..787862848851c32f21e71e55ad5484c60e748ab5:/examples/platforms/generation_scripts/create_hierarchical_clusters.pl?ds=inline diff --git a/examples/platforms/generation_scripts/create_hierarchical_clusters.pl b/examples/platforms/generation_scripts/create_hierarchical_clusters.pl index 5ddfe9c064..2378e7e487 100755 --- a/examples/platforms/generation_scripts/create_hierarchical_clusters.pl +++ b/examples/platforms/generation_scripts/create_hierarchical_clusters.pl @@ -69,11 +69,11 @@ if ( $height->bcmp(Math::BigInt->new("1")) != 0 && ($height->copy()->bpow($d))-> $height++; #will have to deal with empty set of clusters. } # debug stuff -#print "Computed : \n"; -#print STDERR "height: " . $height . "\n"; -#print STDERR "totalnumberofhosts: " . $totalnumberofhosts . "\n"; -#print STDERR "totalnumberofcluster: " . $totalnumberofCluster . "\n"; -#print STDERR "last cluster size (if equals to cluster size, then all clusters will be homogeneous) : " . $last . "\n"; +# print "Computed : \n"; +# print STDERR "height: " . $height . "\n"; +# print STDERR "totalnumberofhosts: " . $totalnumberofhosts . "\n"; +# print STDERR "totalnumberofcluster: " . $totalnumberofCluster . "\n"; +# print STDERR "last cluster size (if equals to cluster size, then all clusters will be homogeneous) : " . $last . "\n"; # Counter for giving unique IDs to ASes. $ASnumber; @@ -82,7 +82,7 @@ $ASnumber = 0; # Printing preamble print "\n"; print "\n"; -print "\n"; +print "\n\n"; # Initiate recursion ... @@ -91,6 +91,7 @@ print "\n"; # Closing tag, and then back home print "\n"; + # Recursive stuff for depth first Se... Creation sub DF_creation { my($currDepth) = @_; @@ -105,7 +106,7 @@ sub DF_creation { # Saving my current number to return it to my father my $toReturn = $ASnumber; $ASnumber++; - if ($currDepth<$height && $totalnumberofCluster > 0) + if ($currDepth<=$height && $totalnumberofCluster > 0) { # Creating current AS inner stuff # I should have a table of sons numbers.