summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-10-07 14:50:37 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-10-07 14:50:37 +0000
commitf9fd939abbc7e148722bbf27d74d65b6ae7be603 (patch)
tree6df3346a89a1d7872f81e96b1f510999fc4482c6
parent8f7c1066b45074fa2c566081f5d0a0a2f5ffd2a8 (diff)
Traverse all hashes alphabetically, so that all output files of the
CST stage will be identical. This is necessary at least since perl 5.8.1 to avoid redundant recompilation. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3425 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/sbin/CST8
-rw-r--r--lib/sbin/CheckoutUtils.pl2
-rw-r--r--lib/sbin/ConfigurationParser.pl2
-rw-r--r--lib/sbin/CreateFunctionBindings.pl64
-rw-r--r--lib/sbin/CreateParameterBindings.pl2
-rw-r--r--lib/sbin/GridFuncStuff.pl2
-rwxr-xr-xlib/sbin/InterLatex.pl4
-rw-r--r--lib/sbin/ParamLatex.pl14
-rw-r--r--lib/sbin/ProcessConfiguration.pl2
-rw-r--r--lib/sbin/RunTestUtils.pl2
-rwxr-xr-xlib/sbin/SchedLatex.pl14
-rw-r--r--lib/sbin/ScheduleParser.pl8
-rw-r--r--lib/sbin/ThornGuide.pl2
-rw-r--r--lib/sbin/configure_thorns.pl2
-rw-r--r--lib/sbin/interface_parser.pl28
-rw-r--r--lib/sbin/parameter_parser.pl8
16 files changed, 82 insertions, 82 deletions
diff --git a/lib/sbin/CST b/lib/sbin/CST
index ba0cfd0e..784dfe79 100644
--- a/lib/sbin/CST
+++ b/lib/sbin/CST
@@ -6,7 +6,7 @@
# @desc
# Parses the the configuration files for thorns.
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.56 2003-09-12 13:34:39 tradke Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.57 2003-10-07 14:50:37 schnetter Exp $
#@@*/
# Global parameter to track the number of errors from the CST
@@ -308,7 +308,7 @@ sub CreateMakeThornlist
$thorn_linklist = 'THORN_LINKLIST =';
$config_thornlist = 'CONFIG_THORNS =';
- foreach $thorn (keys %$thorns)
+ foreach $thorn (sort keys %$thorns)
{
if($configuration_database->{"\U$thorn\E OPTIONS"} ne 'NO_SOURCE' &&
$thorn ne 'Cactus')
@@ -349,7 +349,7 @@ sub CreateThornLinkList
@implist = ();
$cross_inherits = 0;
- foreach $thorn (keys %$thorns)
+ foreach $thorn (sort keys %$thorns)
{
next if ($configuration_database->{"\U$thorn OPTIONS\E"} eq 'NO_SOURCE' ||
$thorn eq 'Cactus');
@@ -437,7 +437,7 @@ sub CreateThornsHeaders
$header3 = "\/* Defines for thorn this file is part of *\/\n\n";
$nthorns = 0;
- foreach $thorn (keys %thorns)
+ foreach $thorn (sort keys %thorns)
{
# Only place package_name/thorn_name in the file.
$thorns{$thorn} =~ m:.*/(.*)/(.*):;
diff --git a/lib/sbin/CheckoutUtils.pl b/lib/sbin/CheckoutUtils.pl
index abaa5762..2fc6aa5b 100644
--- a/lib/sbin/CheckoutUtils.pl
+++ b/lib/sbin/CheckoutUtils.pl
@@ -279,7 +279,7 @@ sub GetThorns
{
my($fleshrep,$options,$tag,%thorns) = @_;
- foreach $th (keys %thorns)
+ foreach $th (sort keys %thorns)
{
if ($thorns{"$th"} =~ m|cvs.cactuscode.org:/cactus|)
{
diff --git a/lib/sbin/ConfigurationParser.pl b/lib/sbin/ConfigurationParser.pl
index 11613edb..d0a90391 100644
--- a/lib/sbin/ConfigurationParser.pl
+++ b/lib/sbin/ConfigurationParser.pl
@@ -27,7 +27,7 @@ sub CreateConfigurationDatabase
# Loop through each thorn's configuration file.
- foreach $thorn (keys %thorns)
+ foreach $thorn (sort keys %thorns)
{
$filename = "$thorns{$thorn}/configuration.ccl";
next if (! -r $filename);
diff --git a/lib/sbin/CreateFunctionBindings.pl b/lib/sbin/CreateFunctionBindings.pl
index 28c4ba77..4f2966dd 100644
--- a/lib/sbin/CreateFunctionBindings.pl
+++ b/lib/sbin/CreateFunctionBindings.pl
@@ -238,7 +238,7 @@ sub CreateFunctionBindings
my $thorn;
- foreach $thorn (keys %{$function_db})
+ foreach $thorn (sort keys %{$function_db})
{
$debug and print "thorn is $thorn\n";
@@ -779,7 +779,7 @@ sub RegisterAllFunctions
my $thorn;
- foreach $thorn (keys %FunctionDatabase)
+ foreach $thorn (sort keys %FunctionDatabase)
{
my $Function;
my $AddThisThorn = 0;
@@ -807,7 +807,7 @@ sub RegisterAllFunctions
push(@data," retval = 0;");
push(@data,"");
- foreach $thorn (keys %FunctionDatabase)
+ foreach $thorn (sort keys %FunctionDatabase)
{
my $AddThisThorn = 0;
my $Function;
@@ -898,12 +898,13 @@ sub AliasedFunctions
my %AliasedFunctionList = {};
- foreach $thornFunctionList (values %FunctionDatabase)
+ foreach my $thornFunctionKey (sort keys %FunctionDatabase)
{
+ $thornFunctionList = $FunctionDatabase{$thornFunctionKey};
if ($thornFunctionList)
{
my $FunctionKey;
- foreach $FunctionKey (keys %{$thornFunctionList})
+ foreach $FunctionKey (sort keys %{$thornFunctionList})
{
my $Function = $thornFunctionList->{$FunctionKey};
if ($Function)
@@ -917,9 +918,10 @@ sub AliasedFunctions
}
}
- my $Function;
- foreach $Function (values %AliasedFunctionList)
+ my $FunctionKey;
+ foreach $FunctionKey (sort keys %AliasedFunctionList)
{
+ my $Function = $AliasedFunctionList{$FunctionKey};
if ($Function)
{
$debug and print "provided Function is ",$Function->{"Name"},"\n";
@@ -1493,6 +1495,7 @@ sub IsFunctionAliased
push(@data, '');
# Insert function protypes:
+ my %names;
foreach $thornFunctionList (values %FunctionDatabase)
{
foreach $Function (values %{$thornFunctionList})
@@ -1501,12 +1504,15 @@ sub IsFunctionAliased
{
if ($Function->{"Used"})
{
- my $name = $Function->{"Name"};
- push(@data, "CCTK_INT IsAliased$name(void);");
+ $names{$Function->{"Name"}} = undef;
}
}
}
}
+ foreach my $name (sort keys %names)
+ {
+ push(@data, "CCTK_INT IsAliased$name(void);");
+ }
push(@data,"CCTK_INT CCTK_IsFunctionAliased(const char *function);");
push(@data,"");
@@ -1517,24 +1523,14 @@ sub IsFunctionAliased
push(@data," (void) (function + 0);");
push(@data,"");
- foreach $thornFunctionList (values %FunctionDatabase)
+ foreach my $name (sort keys %names)
{
my $else = "";
- foreach $Function (values %{$thornFunctionList})
- {
- if ($Function)
- {
- if ($Function->{"Used"})
- {
- my $name = $Function->{"Name"};
- push(@data, " ${else}if (! strcmp(function, \"$name\"))");
- push(@data, " {");
- push(@data, " retval = IsAliased".$name."();");
- push(@data, " }");
- $else = "else ";
- }
- }
- }
+ push(@data, " ${else}if (! strcmp(function, \"$name\"))");
+ push(@data, " {");
+ push(@data, " retval = IsAliased".$name."();");
+ push(@data, " }");
+ $else = "else ";
}
push(@data," return retval;");
@@ -1581,7 +1577,7 @@ sub ThornMasterIncludes
# Header Data
push(@data, '/*@@');
- push(@data, ' @header cctk_FunctionAliases.h');
+ push(@data, ' @header cctk_Functions.h');
push(@data, ' @author Automatically generated by CreateFunctionBindings.pl');
push(@data, ' @desc');
push(@data, ' Prototypes for overloaded functions used by all thorns');
@@ -1672,8 +1668,9 @@ sub UsesPrototypes
my $Function;
$debug and print "UsesPrototypes: thorn is $thorn\n";
- foreach $Function (values %FunctionList)
+ foreach my $FunctionKey (sort keys %FunctionList)
{
+ $Function = $FunctionList{$FunctionKey};
$debug and print " Function is ", $Function->{"Name"},"\n";
if ($Function)
{
@@ -1754,8 +1751,9 @@ sub ProvidedFunctions
push(@data,"");
- foreach $Function (values %FunctionList)
+ foreach my $FunctionKey (sort keys %FunctionList)
{
+ $Function = $FunctionList{$FunctionKey};
if ($Function)
{
if ($Function->{"Provided"})
@@ -1866,8 +1864,9 @@ sub ProvidedFunctions
push(@data,"CCTK_INT Register_$thorn(void);");
# Provide prototypes for Alias<Function Name>_[CF] functions:
- foreach $Function (values %FunctionList)
+ foreach my $FunctionKey (sort keys %FunctionList)
{
+ $Function = $FunctionList{$FunctionKey};
if ($Function && $Function->{"Provided"})
{
push(@data,&printRegisterAliasedPrototypes("C",$Function));
@@ -1883,8 +1882,9 @@ sub ProvidedFunctions
push(@data," ierr = 0;");
push(@data,"");
- foreach $Function (values %FunctionList)
+ foreach my $FunctionKey (sort keys %FunctionList)
{
+ $Function = $FunctionList{$FunctionKey};
if ($Function)
{
if ($Function->{"Provided"})
@@ -2083,7 +2083,7 @@ sub printCallingSequence
if ($Arg->{"Function pointer"})
{
# my $key;
-# foreach $key (keys %{$Arg->{"Name"}})
+# foreach $key (sort keys %{$Arg->{"Name"}})
# {
# print $key." ".$Arg->{"Name"}{$key}."\n";
# }
@@ -2298,7 +2298,7 @@ sub printArg
{
# It's a FPOINTER
# my $key;
-# foreach $key (keys %{$Arg{"Name"}})
+# foreach $key (sort keys %{$Arg{"Name"}})
# {
# print $key." ".$Arg{"Name"}{$key}."\n";
# }
diff --git a/lib/sbin/CreateParameterBindings.pl b/lib/sbin/CreateParameterBindings.pl
index 749cce49..4ba949ff 100644
--- a/lib/sbin/CreateParameterBindings.pl
+++ b/lib/sbin/CreateParameterBindings.pl
@@ -256,7 +256,7 @@ sub CreateParameterBindings
open(OUT, "| perl $cctk_home/lib/sbin/c_file_processor.pl $top/config-data > include/CParameterStructNames_temp.h") || die 'Cannot create CParameterStructNames.h by running c_file_processor.pl';
- foreach $structure (keys %structures)
+ foreach $structure (sort keys %structures)
{
print OUT "#define $structure CCTK_FORTRAN_COMMON_NAME($structures{$structure})\n";
}
diff --git a/lib/sbin/GridFuncStuff.pl b/lib/sbin/GridFuncStuff.pl
index d287914b..6a1b387b 100644
--- a/lib/sbin/GridFuncStuff.pl
+++ b/lib/sbin/GridFuncStuff.pl
@@ -859,7 +859,7 @@ sub CreateThornArgumentHeaderFile
# $print_data = 1;
# if ($print_data)
# {
-# foreach $arg (keys %data)
+# foreach $arg (sort keys %data)
# {
# print "$this_thorn data: $arg : $data{\"$arg\"}\n";
# }
diff --git a/lib/sbin/InterLatex.pl b/lib/sbin/InterLatex.pl
index e123d950..9017f992 100755
--- a/lib/sbin/InterLatex.pl
+++ b/lib/sbin/InterLatex.pl
@@ -109,7 +109,7 @@ my $arrangements_dir = ThornUtils::GetArrangementsDir($directory);
if (defined $thornlist) {
# provided by MakeUtils.pl, returns a hash with a list of the thorns in our thornlist
%thorns = &ReadThornlist($thornlist);
- @listOfThorns = keys %thorns;
+ @listOfThorns = sort keys %thorns;
} else {
# we don't have a thornlist, go find all thorns in arrangements directory
@listOfThorns = ThornUtils::CreateThornlist($arrangements_dir);
@@ -324,7 +324,7 @@ sub LatexTableElement
# now we are just dealing with one group, so we are going to go print out the details for it.
my $var_counter = 0;
- foreach my $group_detail (keys %{$thorn{"group details"}->{$group}})
+ foreach my $group_detail (sort keys %{$thorn{"group details"}->{$group}})
{
my $value = ThornUtils::CleanForLatex($thorn{"group details"}->{$group}->{$group_detail});
diff --git a/lib/sbin/ParamLatex.pl b/lib/sbin/ParamLatex.pl
index 1f488108..48b30501 100644
--- a/lib/sbin/ParamLatex.pl
+++ b/lib/sbin/ParamLatex.pl
@@ -110,13 +110,13 @@ $arrangements_dir = ThornUtils::GetArrangementsDir($arrangements_dir);
if (defined $thornlist) {
# provided by MakeUtils.pl, returns a hash with a list of the thorns in our thornlist
%thorns = &ReadThornlist($thornlist);
- @listOfThorns = keys %thorns;
+ @listOfThorns = sort keys %thorns;
} else {
# we don't have a thornlist, go find all thorns in arrangements directory
@listOfThorns = ThornUtils::CreateThornlist($arrangements_dir);
}
-# this will return us a hash with keys as thorn names, and values as absolute paths to the
+# this will return us a hash with keys as thorn names, and values as absolute paths to the
# thorn's directory param.ccl can be located in that path.
# We need this information to create a parameter database using create_parameter_database
#
@@ -126,7 +126,7 @@ if (defined $thornlist) {
ThornUtils::ClassifyThorns(\%arrangements, @listOfThorns);
# lets go through, one arrangement at a time
-foreach my $arrangement (keys %arrangements)
+foreach my $arrangement (sort keys %arrangements)
{
print "\n$arrangement" if ($debug);
@@ -182,9 +182,9 @@ print "\nFinished.\n";
#
# [print out all the ''variables'']
# print "\nProgram variables:";
-# foreach my $variable (keys %{$thorn{"variables"}}) {
+# foreach my $variable (sort keys %{$thorn{"variables"}}) {
# print "\n $variable";
-# foreach my $key (keys %{$thorn{"variables"}{$variable}}) {
+# foreach my $key (sort keys %{$thorn{"variables"}{$variable}}) {
# print "\n $key = $thorn{\"variables\"}->{$variable}->{$key}";
# }
# }
@@ -197,7 +197,7 @@ print "\nFinished.\n";
#
# NOTE: Naturally, you will have to take into account that the returned hash (%thorn) may be
# part of a greater data-structure, so you may have to do something like:
-# foreach (keys %{$thorns{"CactusWave"}{"WaveToyC"}{"variables"}}) {
+# foreach (sort keys %{$thorns{"CactusWave"}{"WaveToyC"}{"variables"}}) {
# @enddesc
# @version
#@@*/
@@ -408,7 +408,7 @@ sub FindMaxVarLen
# we are going to go through each variable name and range name to see where
# the largest text is, then we will use this for later formatting of our
# latex tables (so we do not get paragraph run-off
- foreach my $variable (keys %thorn)
+ foreach my $variable (sort keys %thorn)
{
# we will always take the variable length as the standard maximum length,
# regardless of if it is longer than MAX_VAR_LENGTH
diff --git a/lib/sbin/ProcessConfiguration.pl b/lib/sbin/ProcessConfiguration.pl
index 7abb9e4c..2c819562 100644
--- a/lib/sbin/ProcessConfiguration.pl
+++ b/lib/sbin/ProcessConfiguration.pl
@@ -25,7 +25,7 @@ sub SplitThorns
{
my ($configuration_database, $thorns, $source_thorns, $nosource_thorns) = @_;
- foreach $thorn (keys %$thorns)
+ foreach $thorn (sort keys %$thorns)
{
if($configuration_database->{"\U$thorn OPTIONS\E"} =~ m/NO_SOURCE/i)
{
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl
index 757b0c46..d68e1eaa 100644
--- a/lib/sbin/RunTestUtils.pl
+++ b/lib/sbin/RunTestUtils.pl
@@ -1165,7 +1165,7 @@ sub ReportOnTest
$buffer .= " caught $rundata->{\"$thorn $test $file NINF\"} Infs in new $file\n" if $rundata->{"$thorn $test $file NINF"};
$buffer .= " did not reproduce $rundata->{\"$thorn $test $file NINFNOTFOUND\"} Infs from old $file\n" if $rundata->{"$thorn $test $file NINFNOTFOUND"};
$buffer .= " significant differences on $rundata->{\"$thorn $test $file NFAILSTRONG\"} (out of $rundata->{\"$thorn $test $file NUMLINES\"}) lines!\n";
- foreach $val (keys (%$rundata))
+ foreach $val (sort keys (%$rundata))
{
if ($val =~ /$thorn $test $file MAXABSDIFF (.*)$/)
{
diff --git a/lib/sbin/SchedLatex.pl b/lib/sbin/SchedLatex.pl
index aa0e57b1..ba67e807 100755
--- a/lib/sbin/SchedLatex.pl
+++ b/lib/sbin/SchedLatex.pl
@@ -100,13 +100,13 @@ my $arrangements_dir = ThornUtils::GetArrangementsDir($directory);
if (defined $thornlist) {
# provided by MakeUtils.pl, returns a hash with a list of the thorns in our thornlist
%thorns = &ReadThornlist($thornlist);
- @listOfThorns = keys %thorns;
+ @listOfThorns = sort keys %thorns;
} else {
# we don't have a thornlist, go find all thorns in arrangements directory
@listOfThorns = ThornUtils::CreateThornlist($arrangements_dir);
}
-# this will return us a hash with keys as thorn names, and values as absolute paths to the
+# this will return us a hash with keys as thorn names, and values as absolute paths to the
# thorn's directory param.ccl can be located in that path.
# We need this information to create a schedule database using create_schedule_database
#
@@ -116,7 +116,7 @@ if (defined $thornlist) {
ThornUtils::ClassifyThorns(\%arrangements, @listOfThorns);
# lets go through, one arrangement at a time
-foreach my $arrangement (keys %arrangements)
+foreach my $arrangement (sort keys %arrangements)
{
print "\n$arrangement" if ($debug);
@@ -200,7 +200,7 @@ sub ReadScheduleDatabase
# conditional blocks/statements
$conditionals = $schedule_database{"$name FILE"};
- foreach my $key (keys %thorn)
+ foreach my $key (sort keys %thorn)
{
next if ($key !~ /(BLOCK|STATEMENT)\_(\d+)/);
@@ -266,7 +266,7 @@ sub CreateLatexTable
my $len;
# categorize the storage types for STATEMENTS into conditional and always on
- foreach my $key (keys %thorn)
+ foreach my $key (sort keys %thorn)
{
next if ($key !~ /^STATEMENT/);
@@ -338,13 +338,13 @@ sub CreateLatexTable
# go print out the rest of the key/value pairs
foreach my $group_key (sort keys %{$thorn{$block}}) {
&OutputVar($group_key, $thorn{$block}->{$group_key});
- } # foreach keys %{$thorn{$group}}
+ } # foreach sort keys %{$thorn{$group}}
print "\\end\{tabular*\} \n\n";
} # foreach %blocks
# delete aliases where they key equals the value
- foreach my $key (keys %aliases) {
+ foreach my $key (sort keys %aliases) {
if ($key eq $aliases{$key}) {
delete $aliases{$key};
}
diff --git a/lib/sbin/ScheduleParser.pl b/lib/sbin/ScheduleParser.pl
index 1c39717e..90a338dc 100644
--- a/lib/sbin/ScheduleParser.pl
+++ b/lib/sbin/ScheduleParser.pl
@@ -31,7 +31,7 @@ sub create_schedule_database
my(@schedule_data);
# Loop through each implementation's schedule file.
- foreach $thorn (keys %thorns)
+ foreach $thorn (sort keys %thorns)
{
print " $thorn\n";
# Read the data
@@ -47,7 +47,7 @@ sub create_schedule_database
}
-# @schedule_data = &cross_index_schedule_data(scalar(keys %thorns), (keys %thorns), @schedule_data);
+# @schedule_data = &cross_index_schedule_data(scalar(keys %thorns), (sort keys %thorns), @schedule_data);
return @schedule_data;
}
@@ -555,7 +555,7 @@ sub check_schedule_database
# make a list of all group names
$allgroups = "";
- foreach $thorn (keys %thorns)
+ foreach $thorn (sort keys %thorns)
{
# Process each schedule block
for($block = 0 ; $block < $rhschedule_db->{"\U$thorn\E N_BLOCKS"}; $block++)
@@ -568,7 +568,7 @@ sub check_schedule_database
}
# check that scheduling in is only for a known group
- foreach $thorn (keys %thorns)
+ foreach $thorn (sort keys %thorns)
{
# Process each schedule block
for($block = 0 ; $block < $rhschedule_db->{"\U$thorn\E N_BLOCKS"}; $block++)
diff --git a/lib/sbin/ThornGuide.pl b/lib/sbin/ThornGuide.pl
index b2e2fbcc..a822bcb1 100644
--- a/lib/sbin/ThornGuide.pl
+++ b/lib/sbin/ThornGuide.pl
@@ -115,7 +115,7 @@ my @listOfThorns;
if (defined $thornlist) {
# provided by MakeUtils.pl, returns a hash with a list of the thorns in our thornlist
%thorns = &ReadThornlist($thornlist);
- @listOfThorns = keys %thorns;
+ @listOfThorns = sort keys %thorns;
} else {
# we don't have a thornlist, go find all thorns in arrangements directory
@listOfThorns = ThornUtils::CreateThornlist($arrangements_dir);
diff --git a/lib/sbin/configure_thorns.pl b/lib/sbin/configure_thorns.pl
index af12e62f..2ad5ac9b 100644
--- a/lib/sbin/configure_thorns.pl
+++ b/lib/sbin/configure_thorns.pl
@@ -19,7 +19,7 @@ chdir $config;
chdir "arrangements";
-foreach $thorn (keys %activethorns)
+foreach $thorn (sort keys %activethorns)
{
if (! -d $activethorns{$thorn} && ! -l $activethorns{$thorn})
{
diff --git a/lib/sbin/interface_parser.pl b/lib/sbin/interface_parser.pl
index d60c08aa..c5c2c721 100644
--- a/lib/sbin/interface_parser.pl
+++ b/lib/sbin/interface_parser.pl
@@ -32,7 +32,7 @@ sub create_interface_database
%thorns = @inargs[2*$n_system..$#inargs];
# Loop through each thorn's interface file.
- foreach $thorn (keys %thorns)
+ foreach $thorn (sort keys %thorns)
{
print " $thorn\n";
# Get the arrangement name for the thorn
@@ -52,7 +52,7 @@ sub create_interface_database
}
- @interface_data = &cross_index_interface_data(scalar(keys %thorns), scalar(keys %system_database), (keys %thorns), %system_database, @interface_data);
+ @interface_data = &cross_index_interface_data(scalar(keys %thorns), scalar(keys %system_database), (sort keys %thorns), %system_database, @interface_data);
return @interface_data;
}
@@ -100,7 +100,7 @@ sub cross_index_interface_data
$interface_data{"THORNS"} = join(" ", @thorns);
- foreach $implementation (keys %implementations)
+ foreach $implementation (sort keys %implementations)
{
# Put if statement around this to prevent perl -w from complaining.
@@ -117,9 +117,9 @@ sub cross_index_interface_data
%ancestors = &get_implementation_ancestors($implementation, 0, scalar(keys %system_database), %system_database, %interface_data);
- $interface_data{"IMPLEMENTATION \U$implementation\E ANCESTORS"} = join(" ",( keys %ancestors));
+ $interface_data{"IMPLEMENTATION \U$implementation\E ANCESTORS"} = join(" ",(sort keys %ancestors));
- $interface_data{"IMPLEMENTATION \U$implementation\E FRIENDS"} = &get_friends_of_me($implementation, scalar(keys %implementations), (keys %implementations),%interface_data);
+ $interface_data{"IMPLEMENTATION \U$implementation\E FRIENDS"} = &get_friends_of_me($implementation, scalar(keys %implementations), (sort keys %implementations),%interface_data);
}
@@ -128,10 +128,10 @@ sub cross_index_interface_data
&check_interface_consistency($thorn, %interface_data);
}
- foreach $implementation (keys %implementations)
+ foreach $implementation (sort keys %implementations)
{
%friends = &get_implementation_friends($implementation, 0, %interface_data);
- $interface_data{"IMPLEMENTATION \U$implementation\E FRIENDS"} = join(" ",( keys %friends));
+ $interface_data{"IMPLEMENTATION \U$implementation\E FRIENDS"} = join(" ",(sort keys %friends));
}
return %interface_data;
@@ -255,7 +255,7 @@ sub get_implementation_ancestors
# Implementation not found give extensive information
%info = &buildthorns("$cctk_home/arrangements","thorns");
$suggest_thorns = "";
- foreach $thorninfo (keys %info)
+ foreach $thorninfo (sort keys %info)
{
$info{"$thorninfo"} =~ /^([^\s]+)/;
$testimp = $1;
@@ -383,7 +383,7 @@ sub check_implementation_consistency
$n_thorns = @thorns;
# Check the consistency of the inheritance
- foreach $thing (keys %inherits)
+ foreach $thing (sort keys %inherits)
{
if(split(' ', $inherits{$thing}) != $n_thorns)
{
@@ -402,7 +402,7 @@ sub check_implementation_consistency
}
# Check the consistency of the friendships
- foreach $thing (keys %friend)
+ foreach $thing (sort keys %friend)
{
if(split(" ", $friend{$thing}) != $n_thorns)
{
@@ -415,7 +415,7 @@ sub check_implementation_consistency
}
# Check the consistency of the public groups
- foreach $thing (keys %public_groups)
+ foreach $thing (sort keys %public_groups)
{
if(split(" ", $public_groups{$thing}) != $n_thorns)
{
@@ -428,7 +428,7 @@ sub check_implementation_consistency
}
# Check the consistency of the protected groups
- foreach $thing (keys %protected_groups)
+ foreach $thing (sort keys %protected_groups)
{
if(split(" ", $protected_groups{$thing}) != $n_thorns)
{
@@ -441,7 +441,7 @@ sub check_implementation_consistency
}
# Check consistancy of group definitions
- foreach $group ((keys %public_groups), (keys %protected_groups))
+ foreach $group ((sort keys %public_groups), (sort keys %protected_groups))
{
%variables = ();
%attributes = ();
@@ -847,7 +847,7 @@ sub parse_interface_ccl
%options = SplitWithStrings($options_list);
# Parse the options
- foreach $option (keys %options)
+ foreach $option (sort keys %options)
{
# print "DEBUG $option is $options{$option}\n";
diff --git a/lib/sbin/parameter_parser.pl b/lib/sbin/parameter_parser.pl
index 2fd3d401..a9009a81 100644
--- a/lib/sbin/parameter_parser.pl
+++ b/lib/sbin/parameter_parser.pl
@@ -37,7 +37,7 @@ sub create_parameter_database
my(@parameter_data);
# Loop through each implementation's parameter file.
- foreach $thorn (keys %thorns)
+ foreach $thorn (sort keys %thorns)
{
print " $thorn\n";
# Read the data
@@ -53,7 +53,7 @@ sub create_parameter_database
}
- @parameter_data = &cross_index_parameters(scalar(keys %thorns), (keys %thorns), @parameter_data);
+ @parameter_data = &cross_index_parameters(scalar(keys %thorns), (sort keys %thorns), @parameter_data);
return @parameter_data;
}
@@ -275,7 +275,7 @@ sub parse_param_ccl
%options = split(/\s*=\s*|\s+/, $options);
- foreach $option (keys %options)
+ foreach $option (sort keys %options)
{
if($option =~ m:STEERABLE:i)
{
@@ -476,7 +476,7 @@ sub parse_param_ccl
}
}
- $parameter_db{"\U$thorn\E SHARES implementations"} = join(" ", keys %friends);
+ $parameter_db{"\U$thorn\E SHARES implementations"} = join(" ", sort keys %friends);
return %parameter_db;
}