prototype for CCTK_Barrier is wrong in reference manual

Create issue
Issue #753 closed
Roland Haas created an issue

the correct prototype is CCTK_Barrier(const cGH cctkGH) (see rc/include/CommOverloadables.h) not CCTK_Barrier(int cGH, const cGH cctkGH).

Keyword: documentation

Comments (8)

  1. Roland Haas reporter
    • removed comment

    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 :-)

  2. anonymous
    • removed comment

    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.

  3. Roland Haas reporter
    • removed comment

    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.

  4. anonymous
    • removed comment

    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.

  5. Roland Haas reporter
    • removed comment

    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?

  6. Log in to comment