[petsc-dev] syntax error in petscmat.h90/petscvec.h90

Jed Brown jedbrown at mcs.anl.gov
Tue Sep 20 02:49:16 CDT 2011


On Tue, Sep 20, 2011 at 09:36, Alexander Grayver <agrayver at gfz-potsdam.de>wrote:

> Hello Petsc team,
>
> Since petsc-3.1-p7 I observe insignificant but annoying syntax error which
> occurs in petscmat.h90/petscvec.h90 and have to fix it manually when make
> petsc.
> I use Intel Fortran 11.1 compiler and errors is following:
>
> /home/lib/petsc-3.2-p2/**include/finclude/ftn-auto/**petscvec.h90(620):
> error #5153: Illegal continuation. No valid non_commentary source following
> &.
> &
>

It looks like the line length calculation has an off-by-one error, so it
incorrectly puts a continuation when none is needed. Not sure why the
compiler chokes on this (does the standard actually disallow it?), but the
fix is to fix the line length calculation.

        subroutine VecGhostUpdateBegin(g, insertmode, scattermode ,ierr)&
     &



> ------^
> /home/lib/petsc-3.2-p2/**include/finclude/ftn-auto/**petscvec.h90(621):
> error #5082: Syntax error, found '=' when expecting one of: ) ,
>       integer(kind=selected_int_**kind(10)) g ! integer(kind=selected_int_
> **kind(10))
> -------------------^
>
> It happens due to this:
>
>        subroutine VecGhostUpdateBegin(g, insertmode, scattermode ,ierr)&
> & ! <<<<<<<<<<<< ERROR
>       Vec g ! Vec
>       InsertMode insertmode ! InsertMode
>       ScatterMode scattermode ! ScatterMode
>       integer ierr
>       end subroutine
>        subroutine VecGhostUpdateEnd(g, insertmode, scattermode ,ierr)
>       Vec g ! Vec
>       InsertMode insertmode ! InsertMode
>       ScatterMode scattermode ! ScatterMode
>       integer ierr
>       end subroutine
>
> If I delete & everything is ok. Moreover, I don's see any reason to have it
> there...
> Is it my specific compiler options or what?
>
> Regards,
> Alexander
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110920/a84b0901/attachment.html>


More information about the petsc-dev mailing list