We can't tell anything unless you send<br><br> a) the WHOLE error message<br><br> b) the exact command line executed<br><br> Matt<br><br><div class="gmail_quote">On Tue, Apr 21, 2009 at 10:27 AM, Pierre-Yves Aquilanti <span dir="ltr"><<a href="mailto:sperif@gmail.com">sperif@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello everyone,<br><br>i'm trying to integrate petsc code into one big software. petsc would act as a solver for the program.<br>
The way that i try to integrate my petsc code is like that:<br><br>########################<br>
program myoldnonpetsccode<br><br>use mymodule<br><br>implicit none<br><br>call process_petsc<br><br>end myoldnonpetsccode<br>########################<br>module mymodule<br>implicit none<br><br>
#include "finclude/petsc.h"<br><br>contains<br>subroutine process_petsc<br>call PetscInitialize(PETSC_NULL_CHARACTER,ierr)<br><br>call PetscFinalize(ierr)<br><br>end subroutine process_petsc<br>end module mymodule<br>
###############<br><br><br>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).<br>
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).<br>
I don't find any answer to this on the internet and documentation.<br><br>Do you have any clue on what would be the problem ?<br><br>Thanks a lot<br><br>Best regards<br><font color="#888888"><br>PYA<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>