diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-26 13:47:08 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-26 13:47:08 +0000 |
commit | b310411cbcb24a657e29219c63d2491e337df05f (patch) | |
tree | 59d544fc1d0393ecc04dce124873789139c7af45 /lib/sbin/ScheduleParser.pl | |
parent | 9de602add5ac84b06cb832e92c51c7ea0ca9422c (diff) |
Cactus/983
Check for existance of timebins/groups for scheduling <IN> as well as
scheduling <AT>.
Give a warning for scheduling <IN> a non-existant timebin.
Print warnings at the end of CST as well as during CST. This needs more tidying to look prettier.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2756 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/ScheduleParser.pl')
-rw-r--r-- | lib/sbin/ScheduleParser.pl | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/sbin/ScheduleParser.pl b/lib/sbin/ScheduleParser.pl index e3d67a89..f493edd1 100644 --- a/lib/sbin/ScheduleParser.pl +++ b/lib/sbin/ScheduleParser.pl @@ -526,4 +526,57 @@ sub PrintScheduleStatistics return; } +#/*@@ +# @routine check_schedule_database +# @date 26th April 2002 +# @author Gabrielle Allen +# @desc +# Checks on consistency of schedule database +# @enddesc +# @calls +# @calledby +# @history +# +# @endhistory +# +#@@*/ + +sub check_schedule_database +{ + my($rhschedule_db,%thorns) = @_; + + # make a list of all group names + $allgroups = ""; + foreach $thorn (keys %thorns) + { + # Process each schedule block + for($block = 0 ; $block < $rhschedule_db->{"\U$thorn\E N_BLOCKS"}; $block++) + { + if ($rhschedule_db->{"\U$thorn\E BLOCK_$block TYPE"} =~ /GROUP/) + { + $allgroups .= " $rhschedule_db->{\"\U$thorn\E BLOCK_$block NAME\"}"; + } + } + } + + # check that scheduling in is only for a known group + foreach $thorn (keys %thorns) + { + # Process each schedule block + for($block = 0 ; $block < $rhschedule_db->{"\U$thorn\E N_BLOCKS"}; $block++) + { + if ($allgroups !~ /$rhschedule_db->{"\U$thorn\E BLOCK_$block WHERE"}/) + { + + if ($rhschedule_db->{"\U$thorn\E BLOCK_$block WHERE"} !~ m:CCTK_(STARTUP|PARAMCHECK|BASEGRID|INITIAL|POSTINITIAL|RECOVER_VARIABLES|POST_RECOVER_VARIABLES|RECOVER_PARAMETERS|CHECKPOINT|CPINITIAL|PRESTEP|EVOL|POSTSTEP|ANALYSIS|TERMINATE|SHUTDOWN):) + { + $message = "Scheduling $rhschedule_db->{\"\U$thorn\E BLOCK_$block NAME\"} in non-existant group or timebin $rhschedule_db->{\"\U$thorn\E BLOCK_$block WHERE\"}"; + $hint = "If this routine should be scheduled check the spelling of the group or timebin name. Note that scheduling IN must use full names for standard timebins (e.g. CCTK_EVOL and not EVOL)"; + &CST_error(1,$message,$hint,__LINE__,__FILE__); + } + } + } + } +} + 1; |