Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

MKL NO LONGER LINKING.

Ian_K_
New Contributor I
917 Views

I have recently updated my FORTRAN compiler and its integration into VS2017 and VS2019 and now when I try to compile a program that requires MKL it will no longer link using the previous project settings. I consistently get the error 1104 \
Error fatal error LNK1104: cannot open file 'mkl_intel_c.lib' LINK.  

 

When I look at the libraries using the tools options.  I do not see MKL  see below

$(VSInstallDir)VC\Tools\MSVC\$(VCToolsVersion)\lib\x86
$(UniversalCRTSdkDir)Lib\$(UCRTVersion)\um\x86
$(UniversalCRTSdkDir)Lib\$(UCRTVersion)\ucrt\x86
$(IFortInstallDir)compiler\lib\ia32_win
$(IFortInstallDir)..\..\..\mkl\latest\lib\ia32
$(VSInstallDir)VC\Tools\MSVC\$(VCToolsVersion)\atlmfc\lib\x86
$(WindowsSdkDir)lib\winv6.3\um\x86
$(FrameworkSDKDir)lib

It is installed under Intel libraries for one API

Ian_K__0-1654752866542.png

and performance libraries

Ian_K__1-1654752913876.png

 

Can somebody offer a clue how make this library visible

 

 

Labels (1)
0 Kudos
1 Solution
mecej4
Honored Contributor III
904 Views

You are attempting to use 32-bit MKL libraries? If so, look at the MKL Release Notes. https://www.intel.com/content/www/us/en/developer/articles/release-notes/onemkl-release-notes.html 

It says there that 

  • After installing the oneAPI Base Toolkit 2022.1, compiling applications with Win32 platform settings that require oneAPI Math Kernel Library (oneMKL) will fail. 32-bit oneMKL on Windows* OS are provided separately as part of Intel® oneAPI Base Toolkit 32-bit package. It can be downloaded here as an add-on.

 

View solution in original post

3 Replies
mecej4
Honored Contributor III
905 Views

You are attempting to use 32-bit MKL libraries? If so, look at the MKL Release Notes. https://www.intel.com/content/www/us/en/developer/articles/release-notes/onemkl-release-notes.html 

It says there that 

  • After installing the oneAPI Base Toolkit 2022.1, compiling applications with Win32 platform settings that require oneAPI Math Kernel Library (oneMKL) will fail. 32-bit oneMKL on Windows* OS are provided separately as part of Intel® oneAPI Base Toolkit 32-bit package. It can be downloaded here as an add-on.

 

Ron_Green
Moderator
889 Views

Intel oneAPI has 2 key "Toolkit" packages of interest to us in the Fortran community:  the "Base" toolkit has the C/C++ and Sycl compiler DPCPP, along with analyzers like Vtune and Advisor.  And it has libraries like Threading Building Blocks and some AI libraries.  Intel chose to put MKL in this "Base" toolkit.

Which is unfortunate for us, as the Fortran compilers are in the "HPC toolkit".  Yes, an HPC Toolkit without MKL; absurd.  Yes, I fought to change this but lost that fight.  HPC Toolkit also has Intel MPI, which you may want if you have MPI applications.  

 

Getting back to MKL 32bit:  The Base Toolkit is ENORMOUS in size.  In fact, it was pushing up against, and over, the 4GB limit of many package managers and the Windows MSI installer.  So, the packaging team asked all the component teams how to trim down the contents so that it would be just under 4GB in size.  An obvious candidate was 32bit libraries.  32bit is not so common anymore.  Hence it was removed from Base Toolkit and made a standalone download.  In this way we were able to get the Base Toolkit a little under 4GB.  

 

Which gets back to my recommendation to use the COMPONENT installations, as I outlined in my article. For Fortran + MKL using Toolkits one would need to download both Base kit (close to 4GB) and HPC kit to get both compiler and MKL.  (there are 'online' installers that let you pick specific packages.  However, one would still need to download and run 2 online Toolkit installers).   That is a lot of download and installations.  I do recommend Fortran programmers install MKL.  There are many very very well tuned math functions of great use to most technical programmers: BLAS, FFTs, Lapack, eigensolvers, etc. 

Ian_K_
New Contributor I
865 Views

Thank you for the responses, and in fact the 64 bit version does  work.  I have tried to follow the instructions for the 32 bit version of MKL with no luck!!  When I look at the MKL location below the API folder, I see the 64 bit version but no 32 bit version and the directory referred to in the VS tools is $(IFortInstallDir)..\..\..\mkl\latest\lib\ia32  which makes no sense.

 

I got into a bit of a tangle as I tried to follow the instructions so I have attached the log files of each of my attempts.  

This is list of libraries and macros

Ian_K__0-1654829320371.png

 

Later!!

 

I have now partially succeeded.  After some digging I found the MKL library at

C:\Program Files (x86)\Intel\oneAPI\mkl\2022.0.3\lib\ia32  (plus 2022.0.0) and not in the latest folder.  So now my question becomes why it does not appear in the  LATEST folder. 

As a final point I would note that just going to the pointer in the message did not entirely clarify the steps I need.

 

One final question, I now have many intel FORTRAN related components occupying a lot of memory (see below).  Are there groups that I can safely uninstall.  I only wish to use FORTRAN with MKL in 32 and 64 bit versions.

Ian_K__2-1654830536383.png

 

 

Thanks for the help

 

 

 

0 Kudos
Reply