X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/10843f47811a79bc707a783c996ffbea24bed79d..68f9a22d51b8053a0f7f40c5a2531f6faca520fc:/examples/platforms/generation_scripts/create_hierarchical_clusters.pl diff --git a/examples/platforms/generation_scripts/create_hierarchical_clusters.pl b/examples/platforms/generation_scripts/create_hierarchical_clusters.pl index 2378e7e487..61384e5b23 100755 --- a/examples/platforms/generation_scripts/create_hierarchical_clusters.pl +++ b/examples/platforms/generation_scripts/create_hierarchical_clusters.pl @@ -1,21 +1,21 @@ #! /usr/bin/perl # L.Bobelin (Perl newbie) 25th of November -# Quick script to generate hierarchical clusters. Usage : p s d where : +# Quick script to generate hierarchical clusters. Usage : p s d where : # - p : 2^p gives the total number of hosts. -# - s : cluster size -# - d : degree of inner nodes. +# - s : cluster size +# - d : degree of inner nodes. +# +# output is the standard one. # -# output is the standard one. -#  # #Each node is numbered by a DFS in the tree. Each cluster is numbered by the DFS number of the leaf it is attached to and the number of cluster for each leaf. # Other infos : # - Same bb_lat used for any routers inside (not that complicated to modify too). # - constants defined in the first part of the script corresponding to classic cluster parameters. links_bw and links_lat added for the inner tree links # - bb_lat and bb_bw used in any backbone of the tree. -# - fails if you set an obviously too small total number of hosts compared to the cluster size (generates a lot of stuff for nothing actually). -#  +# - fails if you set an obviously too small total number of hosts compared to the cluster size (generates a lot of stuff for nothing actually). +# use Math::BigInt; @@ -75,11 +75,11 @@ if ( $height->bcmp(Math::BigInt->new("1")) != 0 && ($height->copy()->bpow($d))-> # 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. +# Counter for giving unique IDs to ASes. $ASnumber; $ASnumber = 0; -# Printing preamble +# Printing preamble print "\n"; print "\n"; print "\n\n"; @@ -96,14 +96,14 @@ print "\n"; sub DF_creation { my($currDepth) = @_; - # Curr AS creation + # Curr AS creation print "\n"; - # Curr router AS creation stuff + # Curr router AS creation stuff print "\n"; print " \n"; print "\n"; - # Saving my current number to return it to my father + # Saving my current number to return it to my father my $toReturn = $ASnumber; $ASnumber++; if ($currDepth<=$height && $totalnumberofCluster > 0) @@ -173,7 +173,7 @@ sub DF_creation { } $totalnumberofCluster--; } - # Creating links to clusters + # Creating links to clusters for(my $i = 1; $i <= $lastNumberOfClusterCreated ; $i++) { print "\n"; } @@ -182,7 +182,7 @@ sub DF_creation { # curr backbone creation print "\n"; - # I must create routes between clusters now + # I must create routes between clusters now for (my $i =1; $i<=$lastNumberOfClusterCreated ; $i++) { for (my $j =$i+1; $j<=$lastNumberOfClusterCreated ; $j++) @@ -205,7 +205,7 @@ sub DF_creation { { print "\n"; @@ -214,7 +214,7 @@ sub DF_creation { print "\n"; } print "\n"; - # Should be done with it... + # Should be done with it... return $toReturn; }