[petsc-users] How to run Petsc in Fortran

Matthew Knepley knepley at gmail.com
Mon Apr 29 14:21:17 CDT 2013


On Mon, Apr 29, 2013 at 1:53 PM, Sonya Blade <sonyablade2010 at hotmail.com>wrote:

> > Are you using makefiles or somthing else to build your application?
> > We suggest using PETSc makefiles.
> >
> > Satish
>
> I'm bit confused here, AFAIK makefiles are supposed to be used for
> compilation of
> Petsc source code not the intended application. Probably I'm wrong here.
>

This is wrong. Please read the manual section on this. Then we can better
help you.


> I've used gcc and gfortran in cygwin to compile the Petsc codes without
> MPI support.
> There is no error recorded at the error.log and all the examples works
> like charm in
> C language. So I think that there is no discrepancy during the compilation.
>
> But when I try to run the examples in gfortran (in Code Block editor) then
> compiler raises
> so many errors such as :
>

1) THIS IS NOT A COMPILE, IT IS A LINK.

2) Editing the output, as you do below:


> Undefined reference to __getreent in function PetscInitialize()
> Undefined reference to __errno in funciton PetscSynchronizedFGets()
>

is extremely unhelpful. Please send all input and output.

3) You are not giving the correct libraries to your "code wizard". Please
try the makefiles.

   Matt


> etc...
>
> Do those errors gives any hints on what is going wrong?
>




-- 
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/4b489440/attachment.html>


More information about the petsc-users mailing list