diff options
author | rhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2013-07-04 19:41:59 +0000 |
---|---|---|
committer | rhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2013-07-04 19:41:59 +0000 |
commit | 51cef93356584dc23771ef43ccb827a1abcf8159 (patch) | |
tree | 0db56bb515db724188e640875fcab440d29750ac | |
parent | 1279ba68756d636460f03c2509010815b4420776 (diff) |
return "parameter already set" when resetting a fixed parameter during recovery
this allows the caller to abort the run since the user tried to change a
non-steerable parameter during recovery.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@5031 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | src/main/Parameters.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/main/Parameters.c b/src/main/Parameters.c index a56fab55..443ab6ec 100644 --- a/src/main/Parameters.c +++ b/src/main/Parameters.c @@ -603,12 +603,18 @@ int CCTK_ParameterSet (const char *name, const char *thorn, const char *value) { if (strcmp (old_value, value)) { - CCTK_VWarn (2, __LINE__, __FILE__, "Cactus", - "CCTK_ParameterSet: Non-steerable parameter '%s::%s' is " - "not set from the parameter file but recovered from the " - "checkpoint file", + CCTK_VWarn (1, __LINE__, __FILE__, "Cactus", + "CCTK_ParameterSet: Non-steerable parameter '%s::%s' " + "cannot be set from the parameter file but is recovered " + "from the checkpoint file", thorn, name); - retval = ParameterSet (param, value); + /* we ignore a possible error code from ParameterSet, instead always + * returning "this parameter has already been set" to our caller. + * We expect the caller to terminate, but in case they do not, we use + * the value of the parameter recovered from the checkpoint file. + */ + ParameterSet (param, value); + retval = -10; } else { |