aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhaas <rhaas@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2013-07-04 19:43:35 +0000
committerrhaas <rhaas@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2013-07-04 19:43:35 +0000
commit9bb09aae2b66a61eb39ed44b923308737aa232fc (patch)
tree54f35e5f1687eb70293f6779bb25b4995a080316
parent636282a56493d65cdfe0fa8784e4b02118e66c42 (diff)
abort run when user tries to change a non-steerable parameter during recovery
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@303 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r--src/CheckpointRecovery.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c
index 72e8e90..328053e 100644
--- a/src/CheckpointRecovery.c
+++ b/src/CheckpointRecovery.c
@@ -898,10 +898,12 @@ void IOUtil_SetAllParameters (const char *parameters)
char *name, *thorn_impl, *parameter_string, *free_me;
const char *thorn;
const cParamData *paramdata;
+ int ierr, steered_non_steerable;
DECLARE_CCTK_PARAMETERS
parameter_string = free_me = strdup (parameters);
+ steered_non_steerable = 0;
while (*parameter_string)
{
/* find the end of the current "<parameter> = <value>" pair substring */
@@ -943,7 +945,12 @@ void IOUtil_SetAllParameters (const char *parameters)
if (paramdata && ! paramdata->accumulator_expression)
{
decoded_value = DecodeString (avalue);
- if (CCTK_ParameterSet (name, thorn, decoded_value) < 0)
+ ierr = CCTK_ParameterSet (name, thorn, decoded_value);
+ if (ierr == -10)
+ {
+ steered_non_steerable = 1;
+ }
+ else if (ierr < 0)
{
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
"Couldn't set parameter '%s' to '%s'",
@@ -977,6 +984,11 @@ void IOUtil_SetAllParameters (const char *parameters)
}
free (free_me);
+
+ if (steered_non_steerable)
+ {
+ CCTK_ERROR ("Attempted to steer non steerable parameters.");
+ }
}