Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

mkl_spblas .mod files

Hemming_S_
Beginner
537 Views

Hi,

I have previously used mkl routines just by having the fortran statement 'use blas95' in my fortran source files. This did not work out for me when trying to use sparse blas, so (under MS VS2013(Shell) using Intel Parallel Studio XE Update 2 Composer Edition for Fortran Windows), I added C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016\windows\mkl\include\mkl_spblas.f90 to my project source files to get that .mod file that I could not locate anywhere. I wonder if this is the correct way of doing it, or if I have e.g. missed something during the installation that would have provided the compiled routines? I am worried that I might not set the optimal compiler options. Thanks!

 

0 Kudos
1 Reply
mecej4
Honored Contributor III
537 Views

All that you need to do to generate a module file that you wish to use is to place the corresponding source file (mkl_spblas.f90, for example) into a working directory, and compile the file (ifort -c mkl_spblas.f90). You then copy the .mod file into the proper place (...\mkl\include\ia32 or ...\mkl\include\intel64, depending on your target). Once you have done this, you can forget about this issue until you install the next version of the compiler.

The generation of module files is a chore that does not quite fit into the "solution:project:sources" paradigm. After all, you wish to produce a module file so that it will be usable in any project/solution that you may conceive in the future. You can, however, use a stratagem such as adding the mkl_spblas.f90 to your sources, selecting the file in the solution explorer and compiling that file.

0 Kudos
Reply