[petsc-users] preprocessing problem

W. Miah wadud.miah at gmail.com
Tue Jun 30 17:54:04 CDT 2015


Hi again Satish,

When I use the supplied makefile, I get the following error:

[hamilton1 petsc-examples]$ make ex2f
/usr/local/intel/ics_2013/impi/4.1.0.024/intel64/bin/mpif90 -c  -fPIC
-Wall -Wno-unused-variable -ffree-line-length-0 -O
-I/home/fcwm/petsc-3.6.0/include -I/home/fcwm/petsc-3.6.0/include
-I/home/fcwm/hypre-2.10.0b/include
-I/usr/local/intel/ics_2013/impi/4.1.0.024/intel64/include
-I/usr/local/intel/ics_2013/impi/4.1.0.024/intel64/include    -o
ex2f.o ex2f.F
ex2f.F:48: error: finclude/petscsys.h: No such file or directory
ex2f.F:49: error: finclude/petscvec.h: No such file or directory
ex2f.F:50: error: finclude/petscmat.h: No such file or directory
ex2f.F:51: error: finclude/petscpc.h: No such file or directory
ex2f.F:52: error: finclude/petscksp.h: No such file or directory

It obviously cannot find the Fortran header files. When I include the
path to the Fortran header files, it still complains:

/usr/local/intel/ics_2013/impi/4.1.0.024/intel64/bin/mpif90 -c  -fPIC
-Wall -Wno-unused-variable -ffree-line-length-0 -O
-I/home/fcwm/petsc-3.6.0/include
-I/home/fcwm/petsc-3.6.0/include/petsc
-I/home/fcwm/hypre-2.10.0b/include
-I/usr/local/intel/ics_2013/impi/4.1.0.024/intel64/include
-I/usr/local/intel/ics_2013/impi/4.1.0.024/intel64/include    -o
ex2f.o ex2f.F
Warning: Nonconforming tab character in column 3 of line 1180
Warning: Nonconforming tab character in column 3 of line 1201
Warning: Nonconforming tab character in column 3 of line 1209
Warning: Nonconforming tab character in column 3 of line 3483
Warning: Nonconforming tab character in column 3 of line 3504
Warning: Nonconforming tab character in column 3 of line 3512
Warning: Nonconforming tab character in column 3 of line 4578
Warning: Nonconforming tab character in column 3 of line 4599
Warning: Nonconforming tab character in column 3 of line 4607
ex2f.F:82.6:

      Vec        x,b,u
      1
Error: Unclassifiable statement at (1)
ex2f.F:83.6:

I think I need to tell the Fortran compiler to use the C preprocessor
instead of the Fortran preprocessor.

Regards,
Wadud.

On 30 June 2015 at 23:33, W. Miah <wadud.miah at gmail.com> wrote:
> Hi Satish,
>
> Thanks for the Makefile.
>
> Regards,
> Wadud.
>
> On 30 June 2015 at 23:20, Satish Balay <balay at mcs.anl.gov> wrote:
>> Where did you grab this example from? the 'makefile' should be in the
>> same location.
>>
>> For eg: if you grabbed src/ksp/ksp/examples/tutorials/ex2f.F - then you would use:
>> http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/makefile
>>
>> The users manual has a section explaining the format.
>> http://www.mcs.anl.gov/petsc/petsc-current/docs/manual.pdf#subsection.16.2.1
>>
>> Satish
>>
>> On Tue, 30 Jun 2015, W. Miah wrote:
>>
>>> Hi Satish,
>>>
>>> I can't find the Makefile that came with it. I'll have a trawl through
>>> the petsc download again, but if you could give me the compilation
>>> line that would be appreciated.
>>>
>>> Best regards,
>>> Wadud.
>>>
>>> On 30 June 2015 at 23:11, Satish Balay <balay at mcs.anl.gov> wrote:
>>> > On Tue, 30 Jun 2015, W. Miah wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> This is probably a simple mistake, but I am getting the following
>>> >> error when trying to compile a Fortran PETSc example:
>>> >>
>>> >> [host petsc-examples]$ mpiifort -c -I/home/fcwm/petsc-3.6.0/include
>>> >> -I/home/fcwm/petsc-3.6.0/include/petsc ex2f.F
>>> >> ex2f.F(82): error #5082: Syntax error, found ',' when expecting one
>>> >> of: ( % [ : . = =>
>>> >>       Vec        x,b,u
>>> >> ------------------^
>>> >>
>>> >> Any help will be greatly appreciated. Thanks in advance.
>>> >
>>> > Are you not using the correspoding makefile that came with this example?
>>> >
>>> > Satish
>>> >
>>>
>>>
>>>
>>>
>>
>
>
>
> --
> email:   wadud.miah at gmail.com
> mobile: 07905 755604
> gnupg: 2E29 B22F



-- 
email:   wadud.miah at gmail.com
mobile: 07905 755604
gnupg: 2E29 B22F


More information about the petsc-users mailing list