<div dir="ltr">Hi, I am trying to build static lib petsc by static linking MKL without mpi. Here is a command I use initially:<div><br></div><div>./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<br>
</div><div><br></div><div style>It is however automatically create a linking option which link MKL dynamically. </div><div style><br></div><div style><div>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</div>
<div><br></div></div><div style><br></div><div style>But if we want to static link MKL, using option like </div><div style><br></div><div style> -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<br>
</div><div style><br></div><div style>it is suggested to use -with-blas-lapack-lib</div><div style>But I don't really know how to do that, it constantly gives error: invalid libraries</div><div style><br></div><div style>
Could anyone help on this? Thanks.</div><div style>Jianbo</div></div>