Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29295 Discussions

Error with MKL in IVFC (INCLUDE path)

jose-sebastian
Beginner
967 Views
Hi, I'm a newbie using IVFC and MKL. I'm trying to do a simple program but, I get some errors when I compile it. Being more specific, it is about the INCLUDE path. Simply I don't know what is wrong, so it would be nice get some help.
Details about the configuration and directories:

Fortran
General
Additional Include Directories
C:\Archivos de programa\Intel\Compiler\11.1\038\mkl\include

Linker
General
Additional Libraries Directories
C:\Archivos de programa\Intel\Compiler\11.1\038\mkl\ia32\lib

Linker
Input
Additional Dependencies
mkl_intel_c.lib libguide.lib

Note 1: Archivos de programa "equivalent to" Program files
Note 2: I don't have a directory C:\Archivos de programa\Intel\mkl\
(The comment is because I have read in other posts the reference to this folder)

The program:

I want to find a inverse matrix and the result of its multiplication by other.

The code:

INCLUDE 'lapack.f90'
PROGRAM Matrix
USE GETRI
IMPLICIT NONE
REAL, DIMENSION(3, 3) :: A
REAL, DIMENSION(3, 1) :: b
REAL, DIMENSION(3, 1) :: x
A=RESHAPE(SOURCE=(/ 1.0, 1.0, 2.0, 3.0, 1.0, 3.0, 1.0, 2.0, 4.0 /), &
SHAPE=(/ 3, 3 /))
b=RESHAPE(SOURCE=(/ 1.0, 2.0, 3.0 /), &
SHAPE=(/ 3, 1 /))
CALL GETRI(A, b)
x=MATMUL(A, b)
PRINT*, x
END Matrix

The errors:

Error 1 error #7002: Error in opening the compiled module file. Check INCLUDE paths. [GETRI] C:\Documents and Settings\Administrador\Mis documentos\Visual Studio 2008\Projects\Project1\Matrix\Matrix\Source1.F90

Error 2 error #6450: This name has already been used as an external module name. [GETRI] C:\Documents and Settings\Administrador\Mis documentos\Visual Studio 2008\Projects\Project1\Matrix\Matrix\Source1.F90

Error 3 Compilation Aborted (code 1) C:\Documents and Settings\Administrador\Mis documentos\Visual Studio 2008\Projects\Project1\Matrix\Matrix\Source1.F90

I don't know if it's clear. In other way, let me now please.
I hope your answer and thanks everyone for the help!
0 Kudos
3 Replies
rogcar
Beginner
967 Views
Hello there,

Instead of adding the path to the project, add in options tab:

Open: Tools > Options > Intel Visual Fortran > Compilers. Click on the ... button next to "Includes". Include both:

$(IFortInstallDir)mklinclude
$(IFortInstallDir)mklincludeia32

Also click on the ... button next to "Libraries" and include:

$(IFortInstallDir)mklia32lib

The macro $(IFortInstallDir) is automatically replaced by the correct path. Otherwise, you will get an error when youupdate.

In the project properties, (Configuration Properties > Linker > Input > Additional Dependencies) you must add the following files: mkl_intel_c.lib mkl_intel_thread.lib mkl_lapack95.lib mkl_core.lib libiomp5md.lib.

Additionally, you may sellect the kind of mkl library you want to use in "Configuration Properties > Fortran > Libraries > Use Intel Math Kernel Library". You may then select if you are going to use sequential, parallel, cluster and others libraries.

There is one more thing. Instead of "USE GETRI", use "USE mkl95_precision" and "USE mkl95_lapack". They are the core libraries, and has link to all functions. You may then use your function. By the way, GETRI is a computational routine, not a driver routine. You should call GETRF before to factorize your matrix.

Good luck,
And if need some more help, just post.

Regards,
Roger
0 Kudos
rogcar
Beginner
967 Views
Ow, I forgot to mention

I stated the ia32 library, but if you are using em64t mkl library or intel64 mkl library, you should change it accordingly.

Regards,
Roger

0 Kudos
jose-sebastian
Beginner
967 Views
Hey, thanks, Roger!

I have done all that you said, but I get new errors. I have used the routines GETRF and then GETRI (exactly with those names). When I compile:

Error 1 error #6285: There is no matching specific subroutine for this generic subroutine call. [GETRF]

Error 2 error #6285: There is no matching specific subroutine for this generic subroutine call. [GETRI]

Error 3 Compilation Aborted (code 1)

Reading a little, I found that some people use these routines with initial letters D or S, a FORTRAN 77 peculiarity.
So, I changed the names, in my case DGETRF and DGETRI and the code has worked, at least "partially", a "strange" thing if I have in mind I'm using a Fortran 95 code. But, unfortunately, I get another error:

Error 1 rc.exe not found.

Reading one more time, it seems to be it's an installation problem. I'm using Microsoft Visual Studio 2008 Shell, installed later to IVFC. So, I don't know if I must uninstall something and reinstall it again or not.

What you say me about all this?

Thanks!

P.D.: All the code is similar to the posted before. The only modifications are:

...
CALL GETRF(A, b)
CALL GETRI(A, b)
...

Or if you want:

...
CALL DGETRF(A, b)
CALL DGETRI(A, b)
...

Parameters are OK, isn't?
0 Kudos
Reply