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

Alexander Grayver agrayver at gfz-potsdam.de
Tue Sep 20 03:11:30 CDT 2011


Hi Jed,

For me the fix was to delete & in case there is empty line after it. But 
I guess this situation might be fixed in your generator since anyway 
such a construction makes no sense:

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

and is equal to:

subroutine VecGhostUpdateBegin(g, insertmode, scattermode ,ierr)

Regards,
Alexander

On 20.09.2011 09:49, Jed Brown wrote:
> On Tue, Sep 20, 2011 at 09:36, Alexander Grayver 
> <agrayver at gfz-potsdam.de <mailto: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/58a522ff/attachment.html>


More information about the petsc-dev mailing list