[ET Trac] [Einstein Toolkit] #1651: Problems with expansions in parameter files
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Thu Aug 14 04:48:58 CDT 2014
#1651: Problems with expansions in parameter files
--------------------+-------------------------------------------------------
Reporter: hinder | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: Cactus | Version: development version
Keywords: |
--------------------+-------------------------------------------------------
If I have a parameter file containing
{{{
CoordBase::ymin = -CoordBase::dy * 2
CoordBase::dy = 0.1
}}}
it looks like Cactus silently ignores the CoordBase::dy in
CoordBase::ymin, and tries to set ymin = 2, presumably because dy has not
been set "yet". This raises two points:
1. The parser should raise a fatal error if it does not have a value for a
parameter it is expanding;
2. The order of parameters listed in the parameter file should not matter.
I think that parameter files should be declarative rather than imperative;
i.e. you should think of them as a static mapping from parameter names to
values rather than as a program which sets (and resets?) variables in the
sequence written in the parameter file. A simple way to transform the
current "set each parameter in sequence" implementation would be to sort
the assignments so that parameters are set before they are used, and to
raise a fatal error if a parameter is set twice. Would it be possible to
implement this?
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1651>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list