[petsc-users] static linking MKL without mpi

Jianbo Ye yelpoo at gmail.com
Fri Nov 29 15:05:44 CST 2013


Hi, I am trying to build static lib petsc by static linking MKL without
mpi. Here is a command I use initially:

./configure PETSC_ARCH=linux-gnu-c-static-seq --with-clanguage=cxx
-with-fc=0 --with-mpi=0 --with-blas-lapack-dir=$(MKLROOT)/lib/intel64
--download-umfpack --download-blacs --with-shared-libraries=0
--with-dynamic-loading=0

It is however automatically create a linking option which link MKL
dynamically.

BLAS/LAPACK:
-Wl,-rpath,/gpfs/apps/x86_64-rhel5/intel/composer_xe/2013.0.079/mkl/lib/intel64
-L/gpfs/apps/x86_64-rhel5/intel/composer_xe/2013.0.079/mkl/lib/intel64
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm


But if we want to static link MKL, using option like

 -Wl,--start-group  $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a
$(MKLROOT)/lib/intel64/libmkl_core.a
$(MKLROOT)/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm

it is suggested to use -with-blas-lapack-lib
But I don't really know how to do that, it constantly gives error: invalid
libraries

Could anyone help on this? Thanks.
Jianbo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131129/654c14dd/attachment.html>


More information about the petsc-users mailing list