[petsc-users] How to run Petsc in Fortran

Dharmendar Reddy dharmareddy84 at gmail.com
Mon Apr 29 16:05:44 CDT 2013


Hello,
         You may want to take a look at the attachment in this email..

https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2012-August/015026.html

It is an example of using petsc from fortran.  If you have PETSC_DIR and
PETSC_ARCH defined as env variables...you can run the example.

If the make file generated by code blocks does some thing similar your code
should work. See if you can get this simple example working on code block.



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.
>
> 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 :
>
> Undefined reference to __getreent in function PetscInitialize()
> Undefined reference to __errno in funciton PetscSynchronizedFGets()
>
> etc...
>
> Do those errors gives any hints on what is going wrong?
>




-- 
-----------------------------------------------------
Dharmendar Reddy Palle
Graduate Student
Microelectronics Research center,
University of Texas at Austin,
10100 Burnet Road, Bldg. 160
MER 2.608F, TX 78758-4445
e-mail: dharmareddy84 at gmail.com
Phone: +1-512-350-9082
United States of America.
Homepage: https://webspace.utexas.edu/~dpr342
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130429/4a0313dd/attachment.html>


More information about the petsc-users mailing list