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

Is the command "ifort -c mkl_vsl.fi" right?

xu_jocelyn
Beginner
760 Views

A program contains mkl_vsl functions. Before the source file being compiled , it has to use the command "ifort -c mkl_vsl.fi" to creat "mkl_vsl.mod". And I have set the path, "path C:Program Files (x86)IntelCompilerFortran10.1.011em64tin;C:Program Files (x86)IntelMKL10.0.012include". Is there any mistake? Why does it show like that below,

ifort: command line warning #10161: unrecognized source type "mkl_vsl.fi"; object file assumed

ifort: warning #10146: no action performed for specified object file(s)

btw: I have use the mkl_dfti funcions in the same program quite well.. What problem occurs in the mkl_vsl?

Thanks a lot!

0 Kudos
6 Replies
TimP
Honored Contributor III
760 Views
The .fi files are meant to be referred to by INCLUDE in your Fortran source code. In most cases, this is an alternative, probably less desirable than the USE syntax for including files from the MKL include directory. The compiler has no way to use include files directly. The reason for the USE or INCLUDE files is to permit the compiler to check syntax of your MKL calls.
Your MKL installation should include mklvars scripts for setting the environment variables, if you want to use those directly, rather than opening an MKL window from the start menu. It may be mkl10.0.012 oolsenvironmentmklvarsem64t.bat, for example. This would show how MKL library and include paths are set.
0 Kudos
xu_jocelyn
Beginner
760 Views

Thank you so much for the reply.

1) Do you mean that it is impossible to creat mkl_vsl.mod file from mkl_vsl.fi, as the situation ofcreatingmkl_dfti.modby mkl_dfti.f90? And in fact we need not to do that tocompile the proram?

2) According to your instruction, after running the mklvarsem64t.bat file, compilation is not completed yet. it still show that,

F:....f90(384) : Error: Error in opening the compiled module file. Check INCLUDE paths. [MKL_VSL]
F:....f90(389) : Error: This derived type name has not been declared. [VSL_CONV_TASK]
F:....f90(416) : Error: This name does not have a type, and must have an explicit type. [TASK]
F:...(416) : Error: This name does not have a type, and must have an explicit type. [VSL_CONV_MODE_DIRECT]
F:....f90(416) : Error: This name does not have a type, and must have an explicit type. [VSLDCONVNEWTASKX1D]
F:....f90(417) : Error: This name does not have a type, and must have an explicit type. [VSLDCONVEXECX1D]
F:...f90(418) : Error: This name does not have a type, and must have an explicit type. [VSLCONVDELETETASK]

...

I have some codes that,

"Use MKL_VSL
TYPE(VSL_CONV_TASK) :: task

status = vsldConvNewTaskX1D(task,VSL_CONV_MODE_DIRECT,Nt,Nt,Nt,Ram_par,1)
status = vsldConvExecX1D(task,It_1D,1,Ram,1)
errcode = vslConvDeleteTask(task)"

Why it happened?

3) Actually, I have already set the Tools-Options-Compiler Seletion (Libraries-C:Program Files (x86)IntelMKL10.0.012em64tlib, Includes-C:Program Files (x86)IntelMKL10.0.012include) and the Project--Linker-Input-additional dependencies(mkl_dll.lib libguide40.lib). Moreover, the beginning of the program contains "Use MKL_VSL". What else could I do?

Thank you!

0 Kudos
TimP
Honored Contributor III
760 Views
Your USE MKL_VSL depends on the INCLUDE path being set, or specified with -I in your compile line. If you don't have the MKL environment variable set in your Windows environment variable setting, and don't choose to specify the INCLUDE path with -I, you should refer to the mklvars script to see how it should be set.
0 Kudos
xu_jocelyn
Beginner
760 Views

Thanks a lot. But I still do not know it very clearly...

1) How to check the INCLUDE path?For IVF, I have set Tools-Options-Compiler Seletion-Includes-C:Program Files (x86)IntelMKL10.0.012include. Is that not enough?

2) In IVF, how to specified with -I in thecompile line? Could you give me the centain command?

3) I have run the mklvarsem64t.bat,does that mean theinclude and pathhave beenset?

btw, in mklvarsem64t.bat below, what do cpath and fpath mean?

''set lib=C:Program Files (x86)IntelMKL10.0.012em64tlib;%lib%
set include=C:Program Files (x86)IntelMKL10.0.012include;%include%
set path=C:Program Files (x86)IntelMKL10.0.012em64tin;%path%
set LIBRARY_PATH=C:Program Files (x86)IntelMKL10.0.012em64tlib;%LIBRARY_PATH%
set CPATH=C:Program Files (x86)IntelMKL10.0.012include;%CPATH%
set FPATH=C:Program Files (x86)IntelMKL10.0.012include;%FPATH%''

Thanks for your attention!

0 Kudos
TimP
Honored Contributor III
760 Views
Yes, those include environment variables should be sufficient to satisfy the MKL USE, if that is the correct path to your MKL include folder.
It sets the include path in include, cpath, and fpath environment variables, to cater for various C and Fortran compilers.
0 Kudos
xu_jocelyn
Beginner
760 Views

1) I am sure thepath tomyMKL include folder is correct, but why the compilationstill does not work and it displays the error information above.Is there any other mistake?

2) In IVF, how to specified with -I in thecompile line? Could you give me the centain command? If set the correct environment variables, "-I" is not needed?

Thanks a lot!

0 Kudos
Reply