Hi Satish,

I've looked at the Intel docs and find that to have ifort use static MKL 
libraries I need to add /Qopenmp-link:static to the ifort command. Given this 
information, is the correct form for the config script (options preceded by - 
and space separated)?

--FOPTFLAGS='-Qopenmp-link:static -O3'

and the libraries I need are: mkl_intel_lp64.lib, mkl_intel_thread.lib, 
mkl_core.lib, libiomp5mt.lib

Is the correct form full-pathname-comma-separated?

--with-blas-lapack-lib='/cygdrive/
c/mkl/lib/intel64/mkl_intel_lp64.lib,/cygdrive/c/mkl/lib/intel64/mkl_intel_thread.lib,/cygdrive/c/mkl/lib/intel64/mkl_core.lib,/cygdrive/c/Program\
 Files\ \(x86\)/Intel/ComposerXE-2011/compiler/lib/intel64/libiomp5mt.lib'

I've tried various things but keep getting the error

Invalid library: 
/cygdrive/c/mkl/lib/intel64/mkl_intel_lp64.lib,/cygdrive/c/mkl/lib/intel64/mkl_intel_thread.lib,/cygdrive/c/mkl/lib/intel64/mkl_core.lib,/cygdrive/c/Program\
 Files\ \(x86\)/Intel/ComposerXE-2011/compiler/lib/intel64/libiomp5mt.lib for 
key with-blas-lapack-lib


The following link is helpful for those of us trying to link MKL statically 
http://software.intel.com/en-us/forums/showthread.php?t=64254

Cheers,
Rob



-----Original Message-----
From: petsc-users-bounces at mcs.anl.gov 
[mailto:[email protected]] On Behalf Of Satish Balay
Sent: Wednesday, March 09, 2011 10:31 AM
To: PETSc users list
Subject: Re: [petsc-users] MKL library - how to force static linking

If you know the correct MLK library list for static linking- you can
try specifying with --with-blas-lapack-lib option

Satish


On Wed, 9 Mar 2011, Robert Ellis wrote:

> Hi PETSc Experts,
> 
> Environment: Win, Cygwin, ifort, MKL to produce Win exes.
> 
> I'm using the MKL blas-lapack with the configure parameter  
> --with-blas-lapack-dir=/cygdrive/c/mkl/lib/intel64. The resultant executable 
> requires MKL dlls to run, specifically fmpich2.dll, libiomp5md.dll, 
> mkl_core.dll, mkl_intel_thread.dll, mpich2mpi.dll. Can I force a static PETSc 
>  build using the MKL libraries? (BTW, using --download-f-blas-lapack produces 
> a statically linked exe.)
> 
> Thanks for any help,
> Cheers,
> Rob
> 

Reply via email to