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.

error in compiling in intel fortran

dhananjay_k_1
Beginner
941 Views

I am new to intel fortran.I am using math kernel library in my program.I am using getrf,getrs function in my program.

before compiling ,I set the environment variables using the following commands in terminal

source /opt/intel/bin/compilervars.sh ia32

source /opt/intel/mkl/bin/mklvars/sh ia32

for compiling i used the following command

ifort beta4.f90 -mkl

i am getting the following error message

 error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [LAPACK95]
use lapack95
----^
compilation aborted for beta4.f90 (code 1)

0 Kudos
7 Replies
Casey
Beginner
941 Views

try adding this to your ifort command line

[bash]-I $MKLROOT/include/ia32[/bash]

0 Kudos
dhananjay_k_1
Beginner
941 Views

now i am getting another error.

dhananjay@ubuntu:~/Desktop/fortran_practice$ ifort beta4.f90 -I $MKLROOT/include/ia32
beta4.f90(302): error #6285: There is no matching specific subroutine for this generic subroutine call.   [GETRF]
call getrf(Kglobal,ipiv)
-----^
beta4.f90(303): error #6285: There is no matching specific subroutine for this generic subroutine call.   [GETRS]
call getrs(Kglobal,ipiv,force)
-----^
compilation aborted for beta4.f90 (code 1)

0 Kudos
mecej4
Honored Contributor III
941 Views

When the error message contains "There is no matching specific subroutine..", the implication is that the compiler knows the proper interface (because you have a USE that covers the subroutine in question, in this case), and you have to check the types, number and sequence of the subroutine arguments. You did not show the declarations of Kglobal, ipiv and force; that is where the answers to the question are likely to be found.

0 Kudos
dhananjay_k_1
Beginner
941 Views

here is the relevant part of my code

USE LAPACK95
IMPLICIT NONE

real ,dimension(882,1) :: force,displacement

integer ,dimension(882,1) :: piv

real ,dimension(882,882) :: Kglobal

!using math kernel library

call getrf(Kglobal,piv)
call getrs(Kglobal,piv,force)
do ii = 1,50
  print *,displacement(ii,1)
end do

i am getting the same error......suggest me how solve this error

thanks!

0 Kudos
mecej4
Honored Contributor III
941 Views

The arrays pivot and force are not matched to the requirement (from the interface declaration of getrf and getrs) that they be one-dimensional arrays. EIther change the declarations of these two or change the calls to call getrf(Kglobal,piv(:,1)) and call getrs(Kglobal,piv(:,1),force(:,1)).

0 Kudos
dhananjay_k_1
Beginner
941 Views

anpther error

dhananjay@ubuntu:~/Desktop/fortran_practice$ ifort beta4.f90 -mkl -I$MKLROOT/include/ia32
/tmp/ifortimvmYV.o: In function `MAIN__':
beta4.f90:(.text+0x242b): undefined reference to `sgetrf_f95_'
beta4.f90:(.text+0x250d): undefined reference to `sgetrs1_f95_'

0 Kudos
Casey
Beginner
941 Views

You need to give the linker information on where to find the lapack95 library.   Add this to your ifort command

[bash]$MKLROOT/lib/ia32/libmkl_lapack95.a[/bash]

In general when you put a "use" statement in your code you'll need to pass a -I option with a path that include the .mod for the module and also either a path to the .a (static) file for the library or -L path -l module (dynamic) to specify path and name of the library.

You can use this as a quick reference to get hints on what paths and flags you need to pass the compiler for various uses of MKL: /opt/intel/composer_xe_2013.3.163/Documentation/en_US/mkl/mkl_link_line_advisor.htm  (assuming your installation is in /opt/intel, adjust accordingly)

0 Kudos
Reply