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

lapack95 errors

Vishnu
Novice
2,260 Views

I am trying to use an eigenvalue routine through the lapack95 interface of the mkl. But I end up with this:

$ ifort Eigen.f90 -mkl

/opt/intel/compilers_and_libraries_2016.3.210/linux/mkl/include/lapack.f90(28): error #6218: This statement is positioned incorrectly and/or has syntax errors.
MODULE F95_PRECISION
^
/opt/intel/compilers_and_libraries_2016.3.210/linux/mkl/include/lapack.f90(31): error #6790: This is an invalid statement; an END [PROGRAM]  statement is required.
END MODULE F95_PRECISION
^
/opt/intel/compilers_and_libraries_2016.3.210/linux/mkl/include/lapack.f90(31): error #6785: This name does not match the unit name.   [F95_PRECISION]
END MODULE F95_PRECISION
-----------^
Eigen.f90(86): error #6785: This name does not match the unit name.   [EIGEN]
END PROGRAM Eigen
------------^
Eigen.f90(23): warning #5427: Program may contain only one main entry routine
IMPLICIT NONE
^
compilation aborted for Eigen.f90 (code 1)

Also, in the program, I have:

PROGRAM Eigen

INCLUDE 'mkl.fi'
INCLUDE 'lapack.f90'

IMPLICIT NONE
.
.
.

Any idea what the trouble might be?
 

0 Kudos
1 Solution
Dmitry_B_Intel
Employee
2,249 Views

Hi Vishnu,

The lapack.f90 file is not supposed to be included inside a program/subroutine/function. Either compile it separately, and then 'use lapack95' inside your program, or put the include statement outside of the program, at file level (possibly replacing include with #include and preprocessing the file).


Dima

View solution in original post

0 Kudos
22 Replies
mecej4
Honored Contributor III
200 Views

Vishnu wrote:

So you're saying that I should stick to  the LP64 even while I require 64bit reals, as long as I do not require 64bit integers. Is that right?

Precisely. The 'L' and 'P' stand for 'longs' and 'pointers', respectively. Floats are not part of this story at all. See https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models for details.

0 Kudos
Vishnu
Novice
198 Views

mecej4 wrote:

Precisely. The 'L' and 'P' stand for 'longs' and 'pointers', respectively. Floats are not part of this story at all. See https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models for details.

Thanks for that. I had no clue.

0 Kudos
Reply