diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-08-30 13:32:44 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-08-30 13:32:44 +0000 |
commit | c9f81e6033dcb32f67fda135c11755ab02ad9b8f (patch) | |
tree | caf822a9a05da1853771655ea7b72394eb16ae6e /lib/sbin/GridFuncStuff.pl | |
parent | 8ac6afc4d6e038fe2ff35a0c9e0f7dc08da1dfda (diff) |
Also check consistency of GHOSTSIZE option in CreateThornGroupInitialisers().
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4115 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/GridFuncStuff.pl')
-rw-r--r-- | lib/sbin/GridFuncStuff.pl | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/lib/sbin/GridFuncStuff.pl b/lib/sbin/GridFuncStuff.pl index d16e023d..1bc910a6 100644 --- a/lib/sbin/GridFuncStuff.pl +++ b/lib/sbin/GridFuncStuff.pl @@ -973,29 +973,49 @@ sub CreateThornGroupInitialisers { $type = $rhinterface_db->{"\U$thorn GROUP $group\E GTYPE"}; - # Check consistency for arrays + # Check consistency of SIZE and (optional) GHOSTSIZE options for arrays if ($type eq 'ARRAY') { - $string = $rhinterface_db->{"\U$thorn GROUP $group\E SIZE"}; - &CheckArraySizes($string,$thorn,$rhparameter_db,$rhinterface_db,$group); + $size = $rhinterface_db->{"\U$thorn GROUP $group\E SIZE"}; + &CheckArraySizes($size,$thorn,$rhparameter_db,$rhinterface_db,$group); $dim = $rhinterface_db->{"\U$thorn GROUP $group\E DIM"}; - $numsize = split (',', $string); + $numsize = split (',', $size); if ($dim != $numsize) { if ($numsize == 0) { - $message = "Array sizes not provided for group $group in $thorn"; + $message = "Array sizes not provided for group '$group' in '$thorn'"; } else { $message = "Array dimension $dim doesn't match the $numsize ". - "array sizes\n (" . - $rhinterface_db->{"\U$thorn GROUP $group\E SIZE"} . - ") for $group in $thorn"; + "array sizes\n ($size) for '$group' in '$thorn'"; } - $hint = "Array sizes must be comma separated list of $dim constants or parameters"; + $hint = "Array sizes must be comma separated list of $dim " . + "constants or parameters"; &CST_error(0,$message,$hint,__LINE__,__FILE__); } + $ghostsize = $rhinterface_db->{"\U$thorn GROUP $group\E GHOSTSIZE"}; + if ($ghostsize) + { + &CheckArraySizes($ghostsize,$thorn,$rhparameter_db,$rhinterface_db,$group); + $numghostsize = split (',', $ghostsize); + if ($dim != $numghostsize) + { + if ($numghostsize == 0) + { + $message = "Array sizes not provided for group '$group' in '$thorn'"; + } + else + { + $message = "Array dimension $dim doesn't match the $numghostsize ". + "array ghossizes\n ($size) for '$group' in '$thorn'"; + } + $hint = "Array ghostsizes must be comma separated list of $dim " . + "constants or parameters"; + &CST_error(0,$message,$hint,__LINE__,__FILE__); + } + } } $line = " if (CCTKi_CreateGroup (\"\U$group\", \"$thorn\", \"$imp\","; |