McLachlan: Make finite difference order and use of Jacobians selectable at runtime

Issue #564 closed
Ian Hinder created an issue

Currently, we generate separate !McLachlan thorns for different finite differencing orders and for single-patch and multi-patch. The attached patch makes use of a new feature in Kranc to enable all finite differencing orders in all thorns, as well as enabling multi-patch support in all thorns. These features can now be selected in all thorns via run-time parameters (fdOrder and jacobian_group). Each thorn defaults to the finite differencing order that it used before.

This change should be entirely backwards-compatible so users don't need to change their parameter files or thornlists immediately.

Use of any thorn other than ML_BSSN could be deprecated immediately, and people should start to transition to using only ML_BSSN. At some point in the future (after the next release), the other thorns will be dropped. I don't want to drop the other thorns immediately, as parameter files would have to be changed, and that makes comparing parameter files between runs very tedious.

We need to decide whether we want to keep the _UPW variants. These cannot be used with vectorisation.

Keyword: McLachlan

Comments (9)

  1. Ian Hinder reporter
    • removed comment

    I would like to get this in before the release freeze on Monday. Could interested parties please comment?

    Thanks

  2. Erik Schnetter
    • removed comment

    I have looked at the assembler code generated with this patch and find no obvious reduction in efficiency. I have not measured performance, so I assume it is fine.

    Isn't there a newer version of this patch that sets the default for fdOrder?

  3. Ian Hinder reporter
    • removed comment

    The default for fdOrder is set by this patch to derivOrder, which corresponds to the order of the thorn. So ML_BSSN defaults to 4th order, ML_BSSN_O8 to 8th etc. This makes everything backward compatible until we drop the additional thorns.

    Ian

  4. Erik Schnetter
    • removed comment

    Yes, please. You're running the nightly test suites anyway, and you'll be noticing performance problems yourself anyway, so there's nothing that can go wrong.

  5. Log in to comment