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

oneAPI mkl library

I-Lok_C_
Beginner
626 Views

I installed Microsoft Visual Studio Professional 2022, Intel oneAPI Base Toolkit, Intel oneAPI HPC ToolKit.  The operating system I am using is Windows 11 Professional. I am using Intel Fortran Compiler.  I failed to run a Fortran program that uses mkl library to solve a linear algebra problem (eigen-decomposition problem).  At the linking stage I received an error message of "cannot open the file intel_mkl_c.lib."  This program ran successfully when I used Intel Parallel Studio XE with Visual Studio 2017.   The problem seems to be the failure to link with the mkl library in oneAPI HPC Toolkit.  Thank you for any help and suggestions.

I-Lok Chang

0 Kudos
1 Solution
mecej4
Honored Contributor III
597 Views

The library that you attempted to use, intel_mkl_c.lib, was not provided with any version of Parallel Studio as far as I know. I have a file named mkl_intel_c.lib in an installation of Parallel Studio 2016.

However, current versions of MKL do not provide a file with that name. To find out the appropriate compiler options and linker options for using MKL in current versions of OneAPI, please consult the MKL LInk Line Advisor at https://software.intel.com/content/www/us/en/develop/articles/intel-mkl-link-line-advisor.html .

View solution in original post

2 Replies
mecej4
Honored Contributor III
598 Views

The library that you attempted to use, intel_mkl_c.lib, was not provided with any version of Parallel Studio as far as I know. I have a file named mkl_intel_c.lib in an installation of Parallel Studio 2016.

However, current versions of MKL do not provide a file with that name. To find out the appropriate compiler options and linker options for using MKL in current versions of OneAPI, please consult the MKL LInk Line Advisor at https://software.intel.com/content/www/us/en/develop/articles/intel-mkl-link-line-advisor.html .

I-Lok_C_
Beginner
587 Views

Thank you very much Mecej4 for your most helpful information on MKL Link Line Advisor!  My problem with linking to mkl library is now completely resolved.  My eigenvalue Fortran program using mkl library is now running well.  My previous problem was due to running a project created using Visual Studio 2017 and Intel Parallel Studio XE of 2020.  When this old project was run in the new environment of Visual Studio 2022 and Inte oneAPI Toolkits, the linker could not locate of the mkl library created in this new environment.  I created a new project for this Fortran-MKL program, all compiling and linking proceeded successfully.

0 Kudos
Reply