- removed comment
Reference Manual gives wrong include file for CCTK_TerminateNext
CCTK_TerminateNext is declared in cctk_Termination.h not in cctk.h anymore (2001). Also there is not Fortran prototype anymore.
Keyword: documentation
Comments (8)
-
-
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
-
- changed status to resolved
- removed comment
cctk_Termination.h is now included from cctk.h
-
- changed status to open
- removed comment
We should also add a Fortran wrapper.
-
- removed comment
Isn't main/Termination.c:26 providing the wrapper?
-
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?
-
- removed comment
CactusBase/Fortran provides the fortran interfaces for the flesh functions, including CCTK_TerminateNext().
-
- changed status to resolved
- removed comment
It seems all is fine now.
- Log in to 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.