summaryrefslogtreecommitdiff
path: root/lib/sbin/CreateScheduleBindings.pl
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-01-25 09:30:19 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-01-25 09:30:19 +0000
commitffc6258a9493a2e029149536a32afcab8f0b3aac (patch)
tree0f208ef75d3e4d26229f0abb04196a4793f96b18 /lib/sbin/CreateScheduleBindings.pl
parent42e8d4c29aaf5ff05f4dfe03deb72f8cb38dac7d (diff)
COMMUNICATION switched on automatically for all groups with STORAGE
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1287 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CreateScheduleBindings.pl')
-rw-r--r--lib/sbin/CreateScheduleBindings.pl54
1 files changed, 35 insertions, 19 deletions
diff --git a/lib/sbin/CreateScheduleBindings.pl b/lib/sbin/CreateScheduleBindings.pl
index 7ff01e2d..4bf6f82f 100644
--- a/lib/sbin/CreateScheduleBindings.pl
+++ b/lib/sbin/CreateScheduleBindings.pl
@@ -138,8 +138,8 @@ sub ScheduleCreateFile
$outbuf .= "\#include <stdarg.h>\n";
$outbuf .= "\n";
$outbuf .= "\#include \"cctk.h\"\n";
- $outbuf .= "\#include \"cctk_parameters.h\"\n";
- $outbuf .= "\#include \"cctk_Schedule.h\"\n";
+ $outbuf .= "\#include \"cctk_Parameters.h\"\n";
+ $outbuf .= "\#include \"cctki_Schedule.h\"\n";
$outbuf .= "\n";
$outbuf .= "/* Prototypes for functions to be registered. */\n";
$outbuf .= "$prototypes\n";
@@ -263,9 +263,17 @@ sub ScheduleBlock
$rhschedule_db->{"\U$thorn\E BLOCK_$block STOR"},
$rhinterface_db);
- @comm_groups = &ScheduleSelectGroups($thorn, $implementation,
- $rhschedule_db->{"\U$thorn\E BLOCK_$block COMM"},
- $rhinterface_db);
+
+ @unused_comm_groups = &ScheduleSelectGroups($thorn, $implementation,
+ $rhschedule_db->{"\U$thorn\E BLOCK_$block COMM"},
+ $rhinterface_db);
+ if (@unused_comm_groups)
+ {
+ print "No need to switch on Communication in $thorn\n";
+ print "Communication automatically assigned for variables with storage\n";
+ }
+
+ @comm_groups = @mem_groups; # Switch on storage for groups with comm
@trigger_groups = &ScheduleSelectGroups($thorn, $implementation,
$rhschedule_db->{"\U$thorn\E BLOCK_$block TRIG"},
@@ -289,7 +297,7 @@ sub ScheduleBlock
if($rhschedule_db->{"\U$thorn\E BLOCK_$block TYPE"} eq "GROUP")
{
$prototype = "";
- $buffer = " CCTK_ScheduleGroup(";
+ $buffer = " CCTKi_ScheduleGroup(";
$indent = " ";
$language = "";
}
@@ -312,7 +320,7 @@ sub ScheduleBlock
return ("", "");
}
$prototype = "extern int $function(void); /* Note that this is a cheat, we just need a function pointer. */\n";
- $buffer = " CCTK_ScheduleFunction($function,\n";
+ $buffer = " CCTKi_ScheduleFunction($function,\n";
$indent = " ";
$buffer .= "$indent";
}
@@ -334,9 +342,9 @@ sub ScheduleBlock
}
$buffer .= $indent . scalar(@mem_groups) . ", /* Number of STORAGE groups */\n";
- $buffer .= $indent . scalar(@comm_groups) . ", /* Number of COMM groups */\n";
- $buffer .= $indent . scalar(@trigger_groups) . ", /* Number of TRIGGERS groups */\n";
- $buffer .= $indent . scalar(@before_list) . ", /* Number of BEFORE routines */\n";
+ $buffer .= $indent . scalar(@comm_groups) . ", /* Number of COMM groups */\n";
+ $buffer .= $indent . scalar(@trigger_groups) . ", /* Number of TRIGGERS groups */\n";
+ $buffer .= $indent . scalar(@before_list) . ", /* Number of BEFORE routines */\n";
$buffer .= $indent . scalar(@after_list) . ", /* Number of AFTER routines */\n";
$buffer .= $indent . scalar(@while_list) . " /* Number of WHILE variables */";
@@ -379,11 +387,26 @@ sub ScheduleStatement
if($rhschedule_db->{"\U$thorn\E STATEMENT_$statement TYPE"} eq "STOR")
{
- $function = "CCTK_ScheduleGroupStorage(";
+ $function = "CCTKi_ScheduleGroupStorage(";
+ $prototype = "";
+
+ foreach $group (@groups)
+ {
+ $buffer .= " $function " . "\"" . $group . "\"" . ");\n"
+ }
+
+ $function = "CCTKi_ScheduleGroupComm(";
+ $prototype = "";
+
+ foreach $group (@groups)
+ {
+ $buffer .= " $function " . "\"" . $group . "\"" . ");\n"
+ }
}
elsif($rhschedule_db->{"\U$thorn\E STATEMENT_$statement TYPE"} eq "COMM")
{
- $function = "CCTK_ScheduleGroupComm(";
+ print "No need to switch on Communication in $thorn\n";
+ print "Communication automatically assigned for variables with storage\n";
}
else
{
@@ -392,13 +415,6 @@ sub ScheduleStatement
return ("", "");
}
- $prototype = "";
-
- foreach $group (@groups)
- {
- $buffer .= " $function " . "\"" . $group . "\"" . ");\n"
- }
-
return ($buffer, $prototype);
}