[Developers] ifndef in DXYDG_guts.h

jtao at cct.lsu.edu jtao at cct.lsu.edu
Wed Mar 14 17:49:59 CST 2007


Quoting Erik Schnetter <schnetter at cct.lsu.edu>:
> This was the work of Jennifer Seiler, a physics student at the AEI.
> She specialised parts of BSSN_MoL, removing many if statements, not
> just those for finite differencing operators.  She also removed if
> statements choosing gauge conditions and selecting formulations.  We
> decided in the end that the performance gain (if any) was not worth
> the added complication.

Actually, it comes to the question that how often one expects to choose
local spatial order. I personally don't think that will be done very often.

As for the code, adding a macro to control the finite difference order as
I suggested in my previous post will definite reduce the complication if one
wants to go to higher orders. In that case one doesn't need to add
additoinal macro functions (ADM_D**) and there will be no need to add
more else if branches in the code.

As for the performance, one will not lose anything by moving
conditional statements out. However, tests probably should be done on
different architectures to see how much one loses to decide if it is worth
adding branches.

Anyway, adding a macro like that is kind of against the idea of Cactus to
use parameters to control runs.

Regards,
Jian




More information about the Developers mailing list