| Commit message (Collapse) | Author | Age |
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4412 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CCTK_ParameterSetNotifyUnregister() to register/unregister user callback
functions for parameter set nofications.
See discussion thread http://www.cactuscode.org/old/pipermail/developers/2006-September/005090.html for details.
This closes patch Cactus-2057 "add new flesh functions to register/unregister
notify callbacks for parameter set operations".
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4375 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The discussion on http://www.cactuscode.org/pipermail/developers/2006-August/004990.html brought up the issue of an inconsistent interpretation of CCTK_ParameterQueryTimesSet()'s return value which depends on whether this is a normal run, or one that has been recovered from a checkpoint.
The provided patch solves the problem of inconsistent behaviour of CCTK_ParameterQueryTimesSet() by fixing the code in CCTK_ParameterSet() which increments the times_set counter.
Now the counter is not incremented for recovered parameters which take the same value as before (effectively assuming this to be a no-op). In addition, non-steerable parameters which are set in the parfile but then recovered to the same value from a checkpoint will have their previous set operation unregistered.
In a recovered run, CCTK_ParameterQueryTimesSet() will now return a value larger 0 for the union of
- all parameters which have been set in the parfile
when the checkpoint was created
- all steerable parameters which have been set in the
recovery parfile
This closes PR Cactus-2056: "fix inconsistent interpretation of CCTK_ParameterQueryTimesSet()'s return value".
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4374 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The symptoms were that if you
(a) set the same parameter twice, *and*
(b) the second setting is an invalid value,
then current-CVS Cactus core-dumps inside the flesh trying to free()
a garbage (uninitialized) pointer.
For example, the following par file suffices to trigger the core-dump,
using only flesh parameters (*no* thorns activated):
# this par file causes a core dump in current-CVS Cactus
Cactus::cctk_timer_output = "off"
Cactus::cctk_timer_output = "foo" # an illegal value for this parameter
Looking at the code,
599 /* check if a parameter is set more than once in a parfile */
600 if (cctk_parameter_set_mask == PARAMETER_RECOVERY_PRE &&
601 param->props->n_set > 0)
602 {
603 if (retval == 0)
604 {
605 new_value = CCTK_ParameterValString (param->props->name,
606 param->props->thorn);
607 retval = strcmp (old_value, new_value) ? -10 : -11;
608 }
609 free (new_value);
610 }
Notice that the free() at line 609 may be executed even if new_value
was *not* assigned a value at line 605. Alas, new_value is a local
variable in this function, and is not explicitly initialized, so it
has a garbage value initially... and line 605 is its only assignment
in this function.
The fix is easy -- just move the free() up to right after line 607,
so it's executed if and only if new_value has been assigned.
patch was
http://www.cactuscode.org/old/pipermail/patches/2006-April/000162.html
developers discussion was
http://www.cactuscode.org/old/pipermail/developers/2006-April/001758.html
http://www.cactuscode.org/old/pipermail/developers/2006-April/001759.html
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4285 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
a non-steerable parameter if its value in the recovery parfile differs from
the one in the checkpoint.
This avoids unnecessary warnings when recovering with the same parfile (and
IO::recovery = "autoprobe" set).
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4249 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://www.cactuscode.org/old/pipermail/patches/2005-October/000112.html:
Check if there is more than one assignment to a
parameter in the parfile and will print a warning with line number
information in such a case. It checks both for multiple parameter
assignments of the same or a different value.
Depending on the parameter checking level (as set via the command line
option '-parameter-level {strict|normal|relaxed}') the flesh will also
abort the run after printing the warning in the following two cases:
* the parameter level is "normal" (which is the default) or "strict"
and there are multiple assignments of different values
* the parameter level is "strict" and there are multiple assignments
of the same value
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4188 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4163 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of with fprintf (stderr, ...).
Correct critical error in looking at the values of cctk_full_warnings,
highlight_warning_messages, and cctk_strong_param_check.
Handle the empty regular expression specially in CCTK_RegexMatch,
since regcomp may treat it as illegal expression. In Cactus, an empty
regular expression matches everything.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4150 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
of free, because the structure contains pointers that also need to be
freed. This fixes a memory leak.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4094 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
of the %f modifier: %f can easily produce more than 100 characters
(the length of the allocated buffer) for large values, and %f outputs
by default only 6 digits of precision.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4093 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3949 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Fixes PR Cactus/1607.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3684 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
static int ParameterSetReal (t_param *param, const char *value)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3513 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
static int ParameterSetSimple (t_param *param, const char *value)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3512 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3381 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
This closes PR Cactus/1559.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3268 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
This closes PR Cactus/1439.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3172 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
from HTTPD.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3155 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
This closes PR CactusPUGHIO/1382.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3144 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2869 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2836 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Fixes Cactus/1063.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2835 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
errors when setting accumulator parameters.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2834 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Array parameters are specified by a [number] after the parameter name, where
number must be an integer. In your parameter file you can specify them
with something like
foo::bar[9] = 99
(note it is C numbering, starting at 0).
In your source code they appear as arrays, bar() in Fortran, starting at 1,
and bar[] in C, starting at 0.
Accumulator parameters are parameters whose value is built up from the value
of other parameters. The other parameters don't need to be known about by
the thorn providing the parameter.
The syntax is:
base parameters are defined like
REAL foo "The foo parameter" accumulator=(<expression>)
{
(1:500 :: "Anything greater than 1 and less than or equal to 500"
} 72
and parameters which modify this one's value would be like
REAL foobar "The foo parameter" accumulator-base=foo::bar
{
22:65 :: "Sensible number"
} 42
<expression> is an arbitrary arithmetical expression involving the old
value of the parameter,refered to as 'x', and the parameter which is
modifying it, refered to as 'y'. E.g. x+y, x+(1/y) x*y, x+y^2, x/y,...
The expression should commute when applied twice, i.e. for expression
L(x,y), we should have
L(L(a,b),c) = L(L(a,c),b)
(This allows people to use x/y as an expression which would end up as
a/b/c = a/c/b .)
To add a value to an accumulator parameter from another implementation, you need
to USE or EXTEND that parameter first.
As a more complete example, to provide a parameter which is the sum of the
squares of other parameters, you can say
REAL squares "Sum of squares" accumulator=(x+y^2)
{
0: :: "Any non-negative number"
} 0
Then, someone in another thorn can add to your squares by saying
USES REAL squares
REAL mynumber "My number" accumulator-base=foo::squares
{
0 : 45 :: "Some numbers"
} 3
Then, when these thorns are activated, the value of foo::squares will be 9
(0 + 3^2).
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2830 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
STEERABLE = RECOVER | ALWAYS parameter has been set during recovery.
Now you can tell whether such a parameter was just recovered from a checkpoint
file (n_set == 1) or also overwritten again from the parameter file (n_set > 1).
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2784 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2709 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
by CCTK_ParameterValString().
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2681 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
a NULL pointer if no such information is wanted.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2649 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2554 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
is not set from a parameter file during recovery.
Closes PR/442.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2492 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2458 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
| |
CCTK_ParameterValString().
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2457 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use it as
call CCTK_ParameterValString (ierror, parameter, thorn, value)
with parameter, thorn, value being fortran strings, the last one holding
the actual stringified value of the parameter.
ierror must be of type CCTK_INT and holds the return code of this wrapper
where 0 stands for success, -1 for 'parameter doesn't exist', -2 for
'fortran string buffer is too short to hold the value.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2446 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Also fixed some gcc warnings and added some grdoc.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2373 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2159 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
can be set on the command line. Please see the Running Cactus section
of the UsersGuide for more information.
The only things you should notice are:
1) Cactus will now error and stop if you try and set a parameter foo::bar
for an *active* implementation or thorn foo which has no parameter bar
(if foo is not active you only get a warning)
2) Cactus will not stop if you steer a parameter out of its allowed range.
Making these changes involved delicate tracing of error codes, so please
let us know if you notice anything weird.
Gabrielle.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2050 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1964 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1851 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1797 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
Added CCTK_ParameterQueryTimesSet
which can be used to see if a parameter was set in the parameter file, and
so can be used to replace some of the parameter "magic numbers" like -424242
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1716 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Check the new parameter set mask flag in CCTK_ParameterSet().
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1586 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tidied include files a bit, removing a few cctk.h's, so I've introduced a few more warnings to fix
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1550 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and a pointer the parameter properties.
Replaced calls to CCTK_ParameterList() by CCTK_ParameterWalk() in CommandLine.c.
CCTK_ParameterList() is gone now.
Inserted a line
"Parameters of thorn 'BLA' providing implementation 'LABER':"
in the -O output. Should be easily filtered out for automatic postprocessing.
Option -o now prints out both "thorn::param" and "impl::param" as full names
for global/restricted parameters.
#ifdef'd out ParameterPTreeNodeAdd() in Parameters.c to fix a compiler
warning (unused static function).
Thomas
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1470 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1435 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
have a return type of 'char *' instead of 'const char *'.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1399 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tidying up how they are included - now people should include
cctk_GNU.h. This will allow us later to check what functions
are available and maybe not compile the GNU stuff.
NOTE: If you edit the GNU stuff please put a wapping great comment
/* CCTK: Changed by <> on <> */
by the change and a note in the README.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1380 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1352 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
ParameterGet -> CCTK_ParameterGet
ParameterValString -> CCTK_ParameterValString
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1330 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1312 17b73243-c579-4c4c-a9d2-2d5706c11dac
|