[petsc-users] How to run Petsc in Fortran
Sonya Blade
sonyablade2010 at hotmail.com
Mon Apr 29 05:58:58 CDT 2013
Dear All,I'm experiencing the difficulties with running the Petsc in Fortran Language, I'm using gfortran integrated in the CodeBlock editor. I've compiled/installed the Petsc , Slepc and having noproblems calling the Petsc/Slepc functions in C, it works perfectly.
When it comes to using Petsc in Fortran I follow the instructions given in that article, especially the item 3http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/UsingFortran.html
but so far I couldn't succeed to run them succesfully in Fortran, my main code is as follow:
program mainimplicit none#include <finclude/petscsys.h>#include <finclude/petscvec.h>#include <finclude/petscvec.h90>
PetscReal norm
print *,"Hello World "end
I've added all the related include folders to search path (Petsc_Dir\include\finclude etc..) and library file "libpetsc.a" which results after Petsc compilation, but still compiler complains about the "Error: Unclassifiable statement at (1)" PetscReal norm. Which means that compiler is unaware of type identifier PetscReal. What am I missing here ?
Your help will be appreciated,
Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130429/bcfa61f2/attachment.html>
More information about the petsc-users
mailing list