#264: Reference Manual gives wrong include file for CCTK_TerminateNext --------------------------------------------+------------------------------- Reporter: roland.haas@… | Type: defect Status: new | Priority: minor Milestone: | Component: Cactus Version: | Keywords: documentation --------------------------------------------+------------------------------- CCTK_TerminateNext is declared in cctk_Termination.h not in cctk.h anymore (2001). Also there is not Fortran prototype anymore.
#264: Reference Manual gives wrong include file for CCTK_TerminateNext ---------------------------------------------+------------------------------ Reporter: roland.haas@… | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------------------------------+------------------------------
Comment (by anonymous):
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.
#264: Reference Manual gives wrong include file for CCTK_TerminateNext ---------------------------------------------+------------------------------ Reporter: roland.haas@… | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------------------------------+------------------------------
Comment (by roland.haas@…):
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
#264: Reference Manual gives wrong include file for CCTK_TerminateNext ---------------------------------------------+------------------------------ Reporter: roland.haas@… | Owner: Type: defect | Status: closed Priority: minor | Milestone: Component: Cactus | Version: Resolution: fixed | Keywords: documentation ---------------------------------------------+------------------------------ Changes (by knarf):
* status: new => closed * resolution: => fixed
Comment:
cctk_Termination.h is now included from cctk.h
#264: Reference Manual gives wrong include file for CCTK_TerminateNext ---------------------------------------------+------------------------------ Reporter: roland.haas@… | Owner: Type: defect | Status: reopened Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------------------------------+------------------------------ Changes (by eschnett):
* status: closed => reopened * resolution: fixed =>
Comment:
We should also add a Fortran wrapper.
#264: Reference Manual gives wrong include file for CCTK_TerminateNext ---------------------------------------------+------------------------------ Reporter: roland.haas@… | Owner: Type: defect | Status: reopened Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------------------------------+------------------------------
Comment (by knarf):
Isn't main/Termination.c:26 providing the wrapper?
#264: Reference Manual gives wrong include file for CCTK_TerminateNext ---------------------------------------------+------------------------------ Reporter: roland.haas@… | Owner: Type: defect | Status: reopened Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------------------------------+------------------------------
Comment (by Roland Haas <roland.haas@…>):
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?
#264: Reference Manual gives wrong include file for CCTK_TerminateNext ---------------------------------------------+------------------------------ Reporter: roland.haas@… | Owner: Type: defect | Status: reopened Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------------------------------+------------------------------
Comment (by knarf):
CactusBase/Fortran provides the fortran interfaces for the flesh functions, including CCTK_TerminateNext().
#264: Reference Manual gives wrong include file for CCTK_TerminateNext ---------------------------------------------+------------------------------ Reporter: roland.haas@… | Owner: Type: defect | Status: closed Priority: minor | Milestone: Component: Cactus | Version: Resolution: fixed | Keywords: documentation ---------------------------------------------+------------------------------ Changes (by eschnett):
* status: reopened => closed * resolution: => fixed
Comment:
It seems all is fine now.
trac@lists.einsteintoolkit.org