[petsc-users] Including user made shared library in makefile.

Klaus Zimmermann klaus.zimmermann at physik.uni-freiburg.de
Mon Oct 21 15:06:29 CDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Anthony,

is it actually used, i.e. do you in this test setup call a function
that is implemented in the library?

On a side note: Why do you remove the object files? This seems a bit
unorthodox in a makefile.

Cheers
Klaus

Am 21.10.2013 21:53, schrieb Anthony Vergottis:
> Thanks for the replies. Unfortunatly this has still not worked.
> When using the ldd command the shared library libpro.so is not
> listed there. Any other ideas why this may be not linking?
> 
> Thanks again.
> 
> 
> On 21 October 2013 20:35, Satish Balay <balay at mcs.anl.gov 
> <mailto:balay at mcs.anl.gov>> wrote:
> 
> On Mon, 21 Oct 2013, Anthony Vergottis wrote:
> 
>> Dear All,
>> 
>> I was wondering how does one include a .so object when compiling
> with a
>> PETSc makefile? I have made various .so object for many projects
> and they
>> work properly by specifying the -L location and the -lLibrary
> name. But
>> when I try to link the .so object via a PETSc make file (after
> compilation
>> with no errors) the ldd command does not show the library as
>> being
> linked.
>> 
>> Is there any internal behaviour of PETSc I should be aware of?
> Have tried
>> everything possible.
>> 
>> I have configure PETSc with the following flags (if this helps).
>> 
>> --download-mpich --with-clanguage=c++ --download-f-blas-lapack 
>> --download-metis --download-parmetis --with-shared-libraries=1 
>> --with-dynamic-loading=1
>> 
>> This is the sample makefile:
>> 
>> include ${PETSC_DIR}/conf/variables include
>> ${PETSC_DIR}/conf/rules 
>> LIBS=-L/home/adonis/Dropbox/ParallelSolver -lpro
> 
> you need:
> 
> LIBS=-L/home/adonis/Dropbox/ParallelSolver 
> -Wl,-rpath,/home/adonis/Dropbox/ParallelSolver -lpro
> 
> Satish
> 
>> 
>> pro: pro.o 2D_CBS_Solver.o ${CLINKER} -o pro pro.o
>> 2D_CBS_Solver.o ${PETSC_LIB}
> ${LIBS}
>> ${RM} pro.o 2D_CBS_Solver.o
>> 
>> After this makefile is run still ldd does not show linkage.
>> 
>> Any help would be appreciated. Thanks in advance.
>> 
>> Best regards, Anthony
>> 
> 
> 
> 
> 
> 
> 
> -- Anthony Vergottis
> 
> PhD Student Department of Mechanical Engineering University College
> London Gower Street London WC1E 6BT
> 
> E-mail: a.vergottis at ucl.ac.uk <mailto:i.stojanovic at ucl.ac.uk> Tel
> (UK Mobile): (+44) 079 1263 0064

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSZYlFAAoJEHGtO1AgqpgxI+wH/3ItAioJSqUoZKQt5uwTbxlI
SQqtYtwgyw8Xt6PvK6Nua5lPz7wbWTlTl+O3B6u/qqvLjFbQzVF+lVgIlxlil0Ik
5o9pSPuiSjHP06msZ7bDZUeErAX8X2y6q9xlo0QiVfmDGoQgZnarpjdHg8/yzfBW
hGNkGU8pUlVkIGqXObIJiElUw8PnFRG+c/OzOnMZV5Eoa67njBY2tXhW5FmgRszc
0nbMZa6tgiRvhxgEcTS+oxw+l1RT+opebUDIX3v5bKPhiSwAgrtfrQ4yhQi2oceZ
bVSUD2fZFAGbkpJJLESyznABlp/5ffE24RxvmHcNEmXICjvc4vJ7IAigYjdg7Os=
=xt5K
-----END PGP SIGNATURE-----


More information about the petsc-users mailing list