PETSc normally removes duplicates from its library link lines, but there
are some contexts (with static linking) where it's hard to show that
it's safe because some projects ship library sets with circular
dependencies.  This is generally harmless unless you have a specific
need to avoid overlinking (e.g., if you're packaging for binary
distribution to machines that need to be able to minimally upgrade
components).

"Y. Shidi" <[email protected]> writes:

> Dear developers,
>
> I stated to use certain libraries in the Makefile of my code,
> but it turns out that Petsc automatically uses all the libraries.
> Some are listed twice.
> I am wondering how does this happen.
>
> -Wl,-rpath,/home/ys453/Sources/petsc/arch-linux2-c-debug/lib 
> -L/home/ys453/Sources/petsc/arch-linux2-c-debug/lib 
> -Wl,-rpath,/home/ys453/Sources/petsc/arch-linux2-c-debug/lib 
> -Wl,-rpath,/usr/lib/openmpi/lib -L/usr/lib/openmpi/lib 
> -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/5 
> -L/usr/lib/gcc/x86_64-linux-gnu/5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu 
> -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu 
> -L/lib/x86_64-linux-gnu -lpetsc -lcmumps -ldmumps -lsmumps -lzmumps 
> -lmumps_common -lpord -lscalapack -lsuperlu_dist -lHYPRE -llapack -lblas 
> -lparmetis -lmetis -lptesmumps -lptscotch -lptscotcherr -lesmumps 
> -lscotch -lscotcherr -lm -lX11 -lstdc++ -ldl -lmpi_usempif08 
> -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm 
> -lgcc_s -lquadmath -lpthread -lrt -lm -lpthread -lz -lstdc++ -ldl 
> -lparmetis -lmetis -lpetsc -lboost_timer -lboost_system
>
> Thank you for your time.
>
> Kind Regards,
> Shidi

Reply via email to