CCTK_GFINDEX3D should check indices when CCTK_DEBUG is defined

Create issue
Issue #468 closed
Erik Schnetter created an issue

It should.

Keyword:

Comments (9)

  1. Ian Hinder
    • removed comment

    This patch does not apply cleanly. It looks like parts of it might have already been applied, and those parts look unrelated to the advertised feature of this ticket.

    MacBook-2:flesh (trunk) $ patch -p0 < /Downloads/gfindex.diff patching file src/include/cctk.h Hunk #1 FAILED at 175. Hunk #3 FAILED at 349. Hunk #6 FAILED at 424. 3 out of 6 hunks FAILED -- saving rejects to file src/include/cctk.h.rej patching file src/main/DebugDefines.c Reversed (or previously applied) patch detected! Assume -R? [n] ^C

  2. Ian Hinder
    • removed comment

    The patch looks to be correct, and should be very useful if people know about using the DEBUG option. Most people probably think, as I did, that it enables debugging symbols. In fact, the simfactory documentation on the "--debug" option states this.

    I have tested (on my laptop) that the ML_BSSN_sgw3d_rhs test still passes both with and without DEBUG=yes (via simfactory --debug), and that if I manually edit the code in McLachlan to loop outside the range with --debug, I get the required error.

    The patch uses cctk_lsh. Should it use cctk_lssh instead, to be compatible with future padding features? I don't remember the details of that.

    Please apply.

  3. Erik Schnetter reporter
    • removed comment

    I took the index checking code from the file DebugDefines.c, which is used if CCTK_DEBUG is set and if inlining is not supported.

  4. Log in to comment