Jianbo Ye <[email protected]> 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"
pgpLCMtIc87Hw.pgp
Description: PGP signature
