Allow setting parameters at build time

Issue #1287 open
Erik Schnetter created an issue

Allow setting parameter values at build time, enabling additional compiler optimisations. I measured that e.g. ML_BSSN runs 5% to 10% faster if its parameters are chosen at build time.

This introduces macros CCTK_PARAMETER__${thorn}__${parameter}. If unset, the parameter value is taken from the parameter file (default). If set at compile time, e.g. via a -D option in CPPFLAGS, this overrides the parameter database, and DECLARE_CCTK_PARAMETERS will always use this value.


Comments (7)

  1. Frank Löffler
    • removed comment

    The patch removes 'delim'. While it is ok to remove it (it's not used), please do in a separate commit.

    The patch removes a workaround for perl 5.004_04 (according to the comment which is also removed). Why? Even with a reason: Please do so in a separate commit.

    When you replace the declaration of parameters (CCTK_DECLARE_INIT) you first use 'friend', which is an implementation name and a second time use 'thorn' which is a thorn name. Assuming you meant to use the thorn name here (because you also mentioned that in the description here) wouldn't using '$friend_thorn' instead of '$friend' in the first replacement be better?

  2. Log in to comment