From 787862848851c32f21e71e55ad5484c60e748ab5 Mon Sep 17 00:00:00 2001 From: navarro Date: Tue, 21 Feb 2012 10:25:09 +0100 Subject: [PATCH] Fix generated platform. Right number of clusters --- .../create_hierarchical_clusters.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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. -- 2.20.1