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

Satish Balay balay at mcs.anl.gov
Tue Sep 29 18:12:00 CDT 2020


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_lp64.li
> b /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 -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.lib',
> '/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/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"
> 
> or
> 
> --with-blas-lapack-lib="-L/cygdrive/c/PROGRA~2/INTELS~1/COMPIL~1.279/windows
> /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/windows
> /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)                
> 
>  
> 
>  
> 
> 



More information about the petsc-users mailing list