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

Barry Smith bsmith at mcs.anl.gov
Wed Sep 21 20:56:57 CDT 2011


On Sep 21, 2011, at 8:47 PM, Satish Balay wrote:

> Ok - pushed the following and updated the tarball.
> 
> http://petsc.cs.iit.edu/petsc/externalpackages/sowing-1.1.16/rev/4aaec55520ed

   Thanks. Make sure the next 3.2 tarball uses the latest.

   Barry

> 
> Satish
> 
> On Wed, 21 Sep 2011, Barry Smith wrote:
> 
>> 
>>   It is a funny corner case where the token that would take the line up to 72 is the \n to end the line.
>> 
>>   I added a check to not go to the next line if it is a \n causing the continuation. 
>> 
>>   Seems to work. 
>> 
>>   Satish, here is the new bfort.c please update the sowing tarball. (sorry not a nice patch file).
>> 
>>    Thanks
>> 
>>    Barry
>> 
>> 
>> 
>> [see attached file: bfort.c]
>> On Sep 20, 2011, at 2:49 AM, Jed Brown wrote:
>> 
>>> 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
>>> 
>> 
>> 
> 




More information about the petsc-dev mailing list