[petsc-users] EXTERNAL: How to run Petsc in Fortran

Matthew Knepley knepley at gmail.com
Mon Apr 29 07:38:54 CDT 2013


On Mon, Apr 29, 2013 at 7:09 AM, Sonya Blade <sonyablade2010 at hotmail.com>wrote:

> > What is the compilation command you are executing? It is probably
> > because you are not running the pre-processor in Fortran which is
> > switched off in the PGI compiler by default.
> > Regards,
> >
> > Wadud.
> >
>
> What it's got anything to do with PGI compiler I'm using Gnu Fortran?
> I try to compile program with the given command lines executions.
>
> -------------- Build: Debug in Petsc_Fortran (compiler: GNU GFortran
> Compiler)---------------
>
> gfortran.exe -Wall  -g  -Wall
> -IC:\Users\....\Downloads\petsc-3.3-p6\include\finclude
> -IC:\Users\...\Downloads\petsc-3.3-p6\arch-mswin-c-debug\include  -c
> D:\....\PROJECTS\CBFortran\Petsc_Fortran\main.f90 -o obj\Debug\main.o
>
>
>
>
> >Are you sure that your compiler is preprocessing the file? You usually
> need
> >to name it *.F.
> >
> >   Matt
>
> I've tried with every possible fortran file extension, I'm sure that file
> is being
> pre-processed because if I comment the line of "PetscReal norm" it
> compiles and runs


That is not evidence for the file being preprocessed. Preprocessing means
that the #include
statements bring in other code from the headers.


> normally and produces the print statement on console screen.
>

So the examples run? If so, there is a problem with your build, and we
would recommend
building with the makefiles we provide.

  Thanks,

     Matt


> Regards,




-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130429/31295ad6/attachment.html>


More information about the petsc-users mailing list