MatGetColumnNorms definition is incorrect for Fortran

Issue #49 resolved
Elliott Sales de Andrade
created an issue

The include/finclude/ftn-auto/petscmat.h90 file contains:

       subroutine MatGetColumnNorms(A, type, norms ,ierr)
       Mat A ! Mat
       NormType type ! NormType
       PetscReal norms ! PetscReal
       integer ierr
       end subroutine

which is incorrect since norms should be an array (and is troublesome if using interfaces). I can't figure out how this file is generated, but since I'm using the 3.4.2 tarball, I assume it's done some time before the release.

Comments (4)

  1. Jed Brown
    1. The file is generated by the sowing package, via 'make allfortranstubs', which has already been run in the release tarballs.

    2. This is an inadequacy of sowing to determine whether this is a scalar or vector return value. I don't know how difficult it would be to update sowing so we could distinguish. In lieu of a better suggestion, I would copy the generated interface and update

  2. Elliott Sales de Andrade reporter

    That is what I have done for the time being. However, I've had a chance to take a little closer look and I see that, e.g. MatGetRowMaxAbs, returns an array of PetscInt and has the correct signature in Fortran.

    The difference is that it uses PetscInt indx[] instead of MatGetColumnNorms's PetscReal *norms. I guess that this function could also be fixed by doing the same thing.

  3. Log in to comment