Reference Manual gives wrong include file for CCTK_TerminateNext

Create issue
Issue #264 closed
Roland Haas created an issue

CCTK_TerminateNext is declared in cctk_Termination.h not in cctk.h anymore (2001). Also there is not Fortran prototype anymore.

Keyword: documentation

Comments (9)

  1. anonymous
    • removed comment

    It is declared in cctk_Termination.h, but this file is included from cctk.h. Users should only include cctk.h.

    We should add a Fortran wrapper for this function.

  2. Roland Haas reporter
    • removed comment

    Are you sure about this? I just tried adding CCTK_TerminateNext(n); to a C source file (EinsteinInitialData/Hydro_InitExcision/src/Hydro_InitExcision.c from trunk) and it fails to compile with "warning: implicit declaration of function ‘CCTK_TerminateNext’". Doing a 'grep cctk_Termination.h' in src/include only finds it in the file cctk_Termination.h. Since this is just a warning the code compiles (and links eventually) unless one make missing prototypes an actual error (or compiles user -std=c99), but there is no checking of parameters (eg. one could call it without passing cctkGH which would likely crash the code).

    Reading your explanation I think my bug report should be changed to say that cctk.h fails to inlucde cctk_Termination.h then

  3. Roland Haas reporter
    • removed comment

    Yes, main/Termination.c looks like the other wrappers to me. There seem to be no actual Fortran prototypes (via interface or modules) provided for the CCTK_XXX functions, are there?

  4. Frank Löffler
    • removed comment

    CactusBase/Fortran provides the fortran interfaces for the flesh functions, including CCTK_TerminateNext().

  5. Log in to comment