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

Using lapack in fortran code

crdafisica
Beginner
1,394 Views
Hello friends,
Im facing a problem when I compile my fortran file (.f90) calling a routine from lapack.
I want to use the routine GETRS to solve linear systems. My exemple .f90 file is described below.

*** file Text1.f90 ***

PROGRAM TEST_IFORT
USE mkl95_lapack
USE mkl95_precision
IMPLICIT NONE


COMPLEX(8) :: Atild(2,2), Btild (2)
INTEGER :: ipiv(2)

Atild = reshape( (/ 1,1,1,-1 /) , (/2,2/) )
Btild = (/ 3,1 /)

print*, Atild(1,1),Atild(1,2)
print*, Atild(2,1),Atild(2,2)
print*, "--"
print*, Btild

CALL GETRS( Atild, ipiv, Btild )

print*,Btild


END PROGRAM
**********************

When I use the command "ifort Text1.f90" I get the following message:
>ifort Text1.f90
Intel Visual Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20090930 Package ID: w_cprof_p_11.1.048
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

Text1.f90(2): error #7002: Error in opening the compiled module file. Check INC
LUDE paths. [MKL95_LAPACK]
USE mkl95_lapack
----^
Text1.f90(3): error #7002: Error in opening the compiled module file. Check INC
LUDE paths. [MKL95_PRECISION]
USE mkl95_precision
----^
compilation aborted for Text1.f90 (code 1)

>

I dont know what to do since I have used the USE command following the instructions from the reference manual C:/Program Files/Intel/Compiler/11.1/048/Documentation/en_US/mkl/mklman.pdf
I have MS visual studio 2008 and visual fortran 11.1.048 installed on my pc and I wanna use the command line compiler.

Thankyou in advance.
0 Kudos
2 Replies
haifeng2009
Beginner
1,394 Views
Quoting - crdafisica
Hello friends,
Im facing a problem when I compile my fortran file (.f90) calling a routine from lapack.
I want to use the routine GETRS to solve linear systems. My exemple .f90 file is described below.

*** file Text1.f90 ***

PROGRAM TEST_IFORT
USE mkl95_lapack
USE mkl95_precision
IMPLICIT NONE


COMPLEX(8) :: Atild(2,2), Btild (2)
INTEGER :: ipiv(2)

Atild = reshape( (/ 1,1,1,-1 /) , (/2,2/) )
Btild = (/ 3,1 /)

print*, Atild(1,1),Atild(1,2)
print*, Atild(2,1),Atild(2,2)
print*, "--"
print*, Btild

CALL GETRS( Atild, ipiv, Btild )

print*,Btild


END PROGRAM
**********************

When I use the command "ifort Text1.f90" I get the following message:
>ifort Text1.f90
Intel Visual Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20090930 Package ID: w_cprof_p_11.1.048
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

Text1.f90(2): error #7002: Error in opening the compiled module file. Check INC
LUDE paths. [MKL95_LAPACK]
USE mkl95_lapack
----^
Text1.f90(3): error #7002: Error in opening the compiled module file. Check INC
LUDE paths. [MKL95_PRECISION]
USE mkl95_precision
----^
compilation aborted for Text1.f90 (code 1)

>

I dont know what to do since I have used the USE command following the instructions from the reference manual C:/Program Files/Intel/Compiler/11.1/048/Documentation/en_US/mkl/mklman.pdf
I have MS visual studio 2008 and visual fortran 11.1.048 installed on my pc and I wanna use the command line compiler.

Thankyou in advance.

You should include those modules (mkl95_**)in your compiling and linking. Those module files are inside (MKL directory)include.

0 Kudos
haifeng2009
Beginner
1,394 Views
This thread has offered answer to your question

http://software.intel.com/en-us/forums/showthread.php?t=69661

0 Kudos
Reply