include file fortran

Tahar Amari amari at cpht.polytechnique.fr
Fri May 15 16:04:00 CDT 2009


Excuse me I did not know there are petsc makefiles ?
This is certainly better.
Do you suggest me to look in the example or tutorials folders ?

Tahar
Le 15 mai 09 à 22:34, Satish Balay a écrit :

> Ah. - the problem is your makfile. Its best to use PETSc makefiles.
>
>>>> ifort -assume byterecl  -g  -I/usr/local/petsc/
>                                    ^^^^^^^^^^^^^^^^^^
> It should be:  -I/usr/local/petsc/include
>
> Satish
>
>
> On Fri, 15 May 2009, Tahar Amari wrote:
>
>> Thank you very much ,
>>
>> excuse me, I might not have well understood,
>> ctually there are  petsc.h , petscvec.h .... files
>>
>> in
>>
>> petsc/include/finclude/
>>
>>
>>
>>
>> Le 15 mai 09 à 22:21, Satish Balay a écrit :
>>
>>> You'll have to modify to:
>>>
>>> #include "finclude/petsc.h"
>>> #include "finclude/petscvec.h"
>>> #include "finclude/petscmat.h"
>>> #include "finclude/petscao.h"
>>>
>>> Satish
>>>
>>>
>>> On Fri, 15 May 2009, Tahar Amari wrote:
>>>
>>>> Hello
>>>>
>>>> Here is what I have from a FORTRAN code "toto.fpp" which was  
>>>> compiled with
>>>> petsc2..xxxx
>>>>
>>>> c 
>>>> -----------------------------------------------------------------------
>>>> #include "include/finclude/petsc.h"
>>>> #include "include/finclude/petscvec.h"
>>>> #include "include/finclude/petscmat.h"
>>>> #include "include/finclude/petscao.h"
>>>>
>>>>
>>>> I compiled it with
>>>>
>>>> ifort -assume byterecl  -g  -I/usr/local/petsc/
>>>> -I/usr/local/petsc//macx/include -I/usr/X11R6/include/X11
>>>> -DPETSC_HAVE_PARMETIS -DPETSC_USE_DEBUG -DPETSC_USE_LOG - 
>>>> DPETSC_USE_BOPT_g
>>>> -DPETSC_USE_STACK -DPETSC_AVOID_MPIF_H -c toto.fpp
>>>>
>>>>
>>>> I have the following kind of errors
>>>>
>>>> petsc.h(6): #error: can't find include file: petscversion.h
>>>> petsc.h(7): #error: can't find include file: finclude/petscdef.h
>>>> petscvec.h(5): #error: can't find include file: finclude/ 
>>>> petscvecdef.h
>>>>
>>>>
>>>> I looked at my petsc tree and II  have the  "include/finclude/"  
>>>> directory.
>>>> I have a petsc.h file inside
>>>>
>>>> which does
>>>>
>>>> #include "petscconf.h"
>>>> #include "petscversion.h"
>>>> #include "finclude/petscdef.h"
>>>>
>>>>
>>>> Does anyone knows  why it does not find those paths or what is  
>>>> wrong with
>>>> those paths ?
>>>>
>>>> Tahar
>>



More information about the petsc-users mailing list