Hello everyone, i'm trying to integrate petsc code into one big software. petsc would act as a solver for the program. The way that i try to integrate my petsc code is like that:
######################## program myoldnonpetsccode use mymodule implicit none call process_petsc end myoldnonpetsccode ######################## module mymodule implicit none #include "finclude/petsc.h" contains subroutine process_petsc call PetscInitialize(PETSC_NULL_CHARACTER,ierr) call PetscFinalize(ierr) end subroutine process_petsc end module mymodule ############### The compiler used for petsc, mpich and the non-petsc code is the same (PGI). I'm perfectly making my module file (.mod) for mymodule and object one (.o). This one is inserted into a library file (libtest.a). When i try to make my binary "myoldnonpetsccode" my compiler tells me during the linking process that there's two undefined reference for 'petscinitialize_' and 'petscfinalize_'. I verified that petsc libraries where included during linking process (with -L/mypathtopetsclib and -lpetsc). I don't find any answer to this on the internet and documentation. Do you have any clue on what would be the problem ? Thanks a lot Best regards PYA -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090421/de8fdc2f/attachment.htm>
