[ET Trac] [Einstein Toolkit] #1651: Problems with expansions in parameter files
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Thu Aug 14 09:22:24 CDT 2014
#1651: Problems with expansions in parameter files
---------------------+------------------------------------------------------
Reporter: hinder | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: Cactus | Version: development version
Resolution: | Keywords:
---------------------+------------------------------------------------------
Comment (by rhaas):
Technically the CoordBase::dy already has a value in the first line,
namely the default value (which is 1). I am fine with making parameter
files declarative rather than imperative. The required changes would seem
to be:
* have the parser check before using a variable value that it has been set
(ie that the Parameter_NSet or whatever call returns >= 1)
* forbid $a = 42 type assignments to happen more than once for the same
variable (currently $a type assignments can be changed, see )
The only legitimate use for order dependency would be something like this:
{{{
$default_dx = CoordBase::dx
CoordBase::dx = 42
foo::bar = $default_dx
}}}
or:
{{{
$foo = 12
bar::baza[0] = $foo
bar::bazb[0] = $foo
$foo = 13
bar::baza[1] = $foo
bar::bazb[1] = $foo
}}}
ie to either safe the default value or to set up a set of similar stanzas.
Both can be achieved without though by either spelling out the default
from the param.ccl files or using more variables. I tend to think that the
safety benefit of declarative parfiles outweights the usefulness of these
corner cases.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1651#comment:3>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list