[petsc-users] static linking MKL without mpi

Jed Brown jedbrown at mcs.anl.gov
Fri Nov 29 15:26:35 CST 2013


Jianbo Ye <yelpoo at gmail.com> writes:

> 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

You have to tell us exactly what you are passing, and send
configure.log.  Did you try the following?

--with-blas-lapack-lib="-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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131129/52464ed3/attachment.pgp>


More information about the petsc-users mailing list