diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-06-19 11:48:25 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-06-19 11:48:25 +0000 |
commit | f3f93f3ac53f3dc9d4cfede2cf0025eacba3fd3b (patch) | |
tree | 3aff230fc10da5521ddedaffa214d2b1a3974984 /src/main/Parameters.c | |
parent | c41feeb547cda7e565f8b791252a62fd08f22270 (diff) |
Changes to ParameterGet so that a wrong range is now a level one warning instead of a level 0 warning.
Cactus will still terminate when a parameter in a parameter file has an incorrect range, but the check
now takes place outside of ParameterGet. This is to be able to change steerable parameters during a run
without accidently crashing the code with a bad parameter value.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1680 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/Parameters.c')
-rw-r--r-- | src/main/Parameters.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/main/Parameters.c b/src/main/Parameters.c index d9dc3a16..cf071a20 100644 --- a/src/main/Parameters.c +++ b/src/main/Parameters.c @@ -290,7 +290,6 @@ int CCTKi_ParameterCreate(const char *name, } retval = ParameterSetSimple(param, defval); - } else { @@ -491,6 +490,12 @@ int CCTK_ParameterSet(const char *name, if (retval == 0) { retval = ParameterSetSimple(param, value); + if (retval < 0) + { + CCTK_VWarn(0,__LINE__,__FILE__,"Cactus", + "CCTK_ParameterSet: Error setting parameter %s to %s\n", + name,value); + } /* register another set operation */ param->props->n_set++; @@ -1452,7 +1457,7 @@ static int ParameterSetKeyword(t_param *param, const char *value) if(retval == -1) { - CCTK_VWarn(0,__LINE__,__FILE__,"Cactus", + CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "Unable to set keyword %s::%s - %s not in any active range", param->props->thorn, param->props->name, @@ -1492,7 +1497,7 @@ static int ParameterSetString(t_param *param, const char *value) if(retval == -1) { - CCTK_VWarn(0,__LINE__,__FILE__,"Cactus", + CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "Unable to set string %s::%s - %s not in any active range", param->props->thorn, param->props->name, @@ -1534,7 +1539,7 @@ static int ParameterSetSentence(t_param *param, const char *value) if(retval == -1) { - CCTK_VWarn(0,__LINE__,__FILE__,"Cactus", + CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "Unable to set sentance %s::%s - %s not in any active range", param->props->thorn, param->props->name, @@ -1580,7 +1585,7 @@ static int ParameterSetInteger(t_param *param, const char *value) if(retval == -1) { - CCTK_VWarn(0,__LINE__,__FILE__,"Cactus", + CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "Unable to set integer %s::%s - %s not in any active range", param->props->thorn, param->props->name, @@ -1635,7 +1640,7 @@ static int ParameterSetReal(t_param *param, const char *value) if(retval == -1) { - CCTK_VWarn(0,__LINE__,__FILE__,"Cactus", + CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "Unable to set real %s::%s - %s not in any active range", param->props->thorn, param->props->name, @@ -1654,7 +1659,7 @@ static int ParameterSetBoolean(t_param *param, const char *value) if(retval == -1) { - CCTK_VWarn(0,__LINE__,__FILE__,"Cactus", + CCTK_VWarn(1,__LINE__,__FILE__,"Cactus", "Unable to set boolean %s::%s - %s not recognised", param->props->thorn, param->props->name, |