#753: prototype for CCTK_Barrier is wrong in reference manual ---------------------------+------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Keywords: documentation | ---------------------------+------------------------------------------------ the correct prototype is CCTK_Barrier(const cGH *cctkGH) (see rc/include/CommOverloadables.h) not CCTK_Barrier(int cGH, const cGH* cctkGH).
#753: prototype for CCTK_Barrier is wrong in reference manual ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------+------------------------------------------------------
Comment (by rhaas):
I was partly mistaken. The Fortran prototype was correct (with cGH being ierr) and the C call had been converted to a function returning int rather than a void call. The patch has been updated. This gives a rather nasty segfault when cctk_Barrier() is called from Fortran with cctkGH being the first argument :-)
#753: prototype for CCTK_Barrier is wrong in reference manual ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------+------------------------------------------------------
Comment (by anonymous):
Shouldn't it be CCTK_POINTER for Fortran? And shouldn't it be CCTK_POINTER_TO_CONST instead?
See also CactusBase/Fortran/src/cctk_Comm.F90.
#753: prototype for CCTK_Barrier is wrong in reference manual ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------+------------------------------------------------------
Comment (by rhaas):
The prototype in CactusBase/Fortran/src/cctk_Comm.F90 is {{{ subroutine CCTK_Barrier (ierr, GH) implicit none integer ierr CCTK_POINTER_TO_CONST GH end subroutine CCTK_Barrier }}} so yes, it should be CCTK_POINTER_TO_CONST though I don't think that it makes a difference in Fortran since cctk_Types.h defines both CCTK_POINTER and CCTK_POINTER_TO_CONST to be the same thing (namely integer*SIZEOF_CHAR_P). It should be all uppercase, yes. Fortran would ignore the case but the C preprocessor does not. I amended the patch.
#753: prototype for CCTK_Barrier is wrong in reference manual ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------+------------------------------------------------------
Comment (by anonymous):
For documentation changes we don't need an extensive patch review, as errors in the documentation are less critical than errors in a code.
Please apply your patch.
#753: prototype for CCTK_Barrier is wrong in reference manual ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------+------------------------------------------------------
Comment (by eschnett):
This was Erik.
#753: prototype for CCTK_Barrier is wrong in reference manual ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: documentation ---------------------+------------------------------------------------------
Comment (by rhaas):
Since the documentation lives in the flesh repository for which I have no commit rights, I unfortunately cannot apply the patch myself. Otherwise I'd have been happy to apply it right away (and correct it afterwards :-) ). Frank (you are the person to talk to, right?): is it possible for me to obtain commit rights for the flesh, please?
#753: prototype for CCTK_Barrier is wrong in reference manual ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: closed Priority: minor | Milestone: Component: Cactus | Version: Resolution: fixed | Keywords: documentation ---------------------+------------------------------------------------------ Changes (by rhaas):
* status: new => closed * resolution: => fixed
Comment:
Applied
trac@lists.einsteintoolkit.org