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

mkl link line adviser

fort
Beginner
216 Views

The mkl link line adviser recommended that I add the ifort compiler option:

 

/module:"%MKLROOT%\include\intel64\lp64"

 

I also had the option:

 

/warn:interfaces

 

This gives the error:   Unable to open directory (echoes directory above)

 

I removed the /module option and that eliminated the error.  From which I guess the compiler was trying to write the generated module files to the above directory. 

0 Kudos
4 Replies
Steve_Lionel
Black Belt Retired Employee
207 Views

Right - it should have used /include instead.

fort
Beginner
190 Views

It recommended BOTH the /module and /include options.

All's well that ends well.  I was stumped on using blas95 until I signed up as a developer.

 

Thanks

Ron_Green
Moderator
174 Views

/module option is correct for MKL.  For example, MKL provides F95 interfaces for LAPACK and BLAS built for Intel Fortran. The .mod files are provided for Intel Fortran in the path you have mentioned from MKL Link Line Advisor

But MKL also tries to be compiler agnostic so they also provide sources for the interfaces that can be built with Gfortran or any other  Fortran 95 compiler. These have to be hand-built with nmake on Windows, or make on Linux and macOS.  this will create .mod files that can be used for these libraries.  Information for Windows is HERE and Linux is HERE

and macOS HERE

 

 

Steve_Lionel
Black Belt Retired Employee
168 Views

The problem with /module is, as @fort found, it specifies the folder to write module files, in addition to giving a location to search. Asking to write .mod files into the MKL product folder will fail. /include is what they wanted here.

Reply