[petsc-users] Failed to build Petsc statically linked to MKL for Windows

Thuc Bui bui at calcreek.com
Tue Sep 29 19:29:36 CDT 2020


Hi Barry & Satish,

I also did a configuration to have a full path for each library as follows

./configure --with-cc='win32fe cl' --with-cxx='win32fe cl' --with-fc=0
--with-openmp --with-debugging=0 --with-mpi=0
--with-blas-lapack-lib="/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/m
kl/lib/mkl_intel_lp64.lib
/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_core.lib
/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_intel_thread.
lib
/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/libiomp5md.lib"

and also got the same error message. Attached is the configure.log.

         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for
details):
----------------------------------------------------------------------------
---
You set a value for --with-blaslapack-lib=<lib>, but
['/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_intel_lp64.
lib',
'/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_core.lib',
'/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_intel_thread
.lib',
'/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/libiomp5md.lib']
cannot be used
****************************************************************************
***

Thanks,
Thuc

-----Original Message-----
From: Thuc Bui [mailto:bui at calcreek.com] 
Sent: Tuesday, September 29, 2020 5:17 PM
To: petsc-users
Cc: Barry Smith
Subject: RE: [petsc-users] Failed to build Petsc statically linked to MKL
for Windows

Hi Barry & Satish,

I really appreciate you are getting back to me. Because libiomp5md.lib is
not in the mkl/lib directory, I just copy it to the same directory and per
your suggestion use the followings

./configure --with-cc='win32fe cl' --with-cxx='win32fe cl' --with-fc=0
--with-openmp --with-debugging=0 --with-mpi=0
--with-blas-lapack-lib="-L/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows
/mkl/lib mkl_intel_lp64.lib mkl_core.lib mkl_intel_thread.lib
libiomp5md.lib"

Unfortunately, I got the same error message as below. I am attaching
configure log, and hopefully you can see what I am doing icorrectly.

Many thanks,
Thuc

----------------------------------------------------------------------------
---
You set a value for --with-blaslapack-lib=<lib>, but
['-L/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib',
'mkl_intel_lp64.lib', 'mkl_core.lib', 'mkl_intel_thread.lib',
'libiomp5md.lib'] cannot be used
****************************************************************************
***

-----Original Message-----
From: Satish Balay [mailto:balay at mcs.anl.gov]
Sent: Tuesday, September 29, 2020 4:12 PM
To: Thuc Bui
Cc: petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] Failed to build Petsc statically linked to MKL
for Windows

https://software.intel.com/content/www/us/en/develop/articles/intel-mkl-link
-line-advisor.html

Checking for MS compilers - [MKL2018+] it gives:

mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib

i.e no -Wl,--start-group [MS compiler most likely does not use this option]

So you can try:

--with-blaslapack-lib="-L/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/
mkl/lib/ mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib
libiomp5md.lib"

Satish


On Tue, 29 Sep 2020, Thuc Bui wrote:

> Dear Petsc Users,
> 
>  
> 
> I have successfully built Petsc v3.13.5 for Windows 10 VS2015 without 
> Fortran compiler and without MPI. These successful  builds are either 
> linked statically with Blas-Lapack or dynamically with Intel MKL. 
> However, when linking dynamically to MKL, I would have to include 4 
> more Intel DLLs for building applications. I would like to have Petsc 
> linking statically to MKL to avoid having these extra DLLs, but have 
> not been successful. Here is how I run configure for static link
> 
>  
> 
> ./configure --with-cc='win32fe cl' --with-cxx='win32fe cl' --with-fc=0 
> --with-openmp --with-debugging=0 --with-mpi=0 
> --with-blas-lapack-lib="-Wl,--start-group
> /cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_intel_l
> p64.li b 
> /cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_core.li
> b 
>
/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_intel_thread.
> lib -Wl,--end-group"
> 
>  
> 
> I got this configuration error,
> 
>  
> 
> ======================================================================
> ======
> === TESTING: checkLib from
> config.packages.BlasLapack(config/BuildSystem/config/pack*************
> ******
> ************************************************************
> 
>          UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for
> details):
> 
> ----------------------------------------------------------------------
> ------
> ---
> 
> You set a value for --with-blaslapack-lib=<lib>, but 
> ['-Wl,--start-group', 
> '/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_intel_
> lp64.l
> ib',
> '/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_core.l
> ib', 
> '/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_intel_
> thread .lib', '-Wl,--end-group'] cannot be used
> 
> **********************************************************************
> ******
> ***
> 
>  
> 
> Can someone point me to a proper syntax to link to MKL statically? 
> Attached is the configure.log if you need it.
> 
>  
> 
> I have also tried unsuccessfuly,
> 
> --with-blas-lapack-lib="/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/win
> dows/m
> kl/lib/mkl_intel_lp64.lib
> /cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_core.li
> b 
>
/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows/mkl/lib/mkl_intel_thread.
> lib"
> 
> or
> 
> --with-blas-lapack-lib="-L/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/w
> indows /mkl/lib -lmkl_intel_lp64.lib -lmkl_core.lib 
> -lmkl_intel_thread.lib",
> 
> or
> 
> --with-blas-lapack-lib="-L/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/w
> indows /mkl/lib mkl_intel_lp64.lib mkl_core.lib mkl_intel_thread.lib"
> 
> and all gave the similar error message.
> 
>  
> 
> Many thanks in advance for your help,
> 
> Thuc Bui
> 
> Senior R&D Engineer
> 
> Calabazas Creek Research, Inc.
> 
> (650) 948-5361 (Office)
> 
> (650) 948-7562 (Fax)                
> 
>  
> 
>  
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: application/octet-stream
Size: 3748700 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200929/c6ca6fb9/attachment-0001.obj>


More information about the petsc-users mailing list