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

Fortran 95 syntax is not compiling in MKL 10.3

marcioy
Beginner
438 Views
Hi everyone,

I had used IMSL for some time (IVF 11.x) inverting matrices, solving linear systems, etc for Finite Element Analysis. Now I have to migrate to MKL 10.3+Intel Visual Fortran Composer XE 2011.
I followed the user guide and set the MS Visual Studio as follow:
-Properties->Fortran->General->Additional Include Directories:<...>\\mkl\\include\\ia32
-Properties->Linker->General->Additional Library Directories:<...>\\mkl\\lib\\ia32
-Properties->Linker->Additional Dependencies:mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib mkl_scalapack_core.lib mkl_blas95.lib
I can use the MKL library using the Fortran 77 syntax, but when I try to use the Fortran 95 syntax, I cannot compile, IFV gives me "error #6285" saying that the called MKL subroutine does not exist.
I think I am forgetting to set anything... Anybody has any suggestion?
Thanks in advance
Marcio Yamamoto
0 Kudos
1 Solution
mecej4
Honored Contributor III
438 Views
Error #6285 signifies that the code is attempting to call an overloaded MKL routine name with one or more arguments of the incorrect type. Some arguments may have been left out, or not in the proper sequence, or may not have the required keywords specified.

This error occurs at the compilation stage, and has almost nothing to do with which linker options are used and which libraries are specified for inclusion in the link step.

Please post the specific line(s) with the CALL, state or show the declarations of the arguments, and list the modules USEd in the subprogram with the CALL statement.

View solution in original post

0 Kudos
4 Replies
TimP
Honored Contributor III
438 Views
Surely, you get a more explicit message than that.
Does it help if you specify the libraries in order?
I see that I am able to break the link advisor by attempting to get a suggested link line with all those options. Do you need them all together?
0 Kudos
mecej4
Honored Contributor III
439 Views
Error #6285 signifies that the code is attempting to call an overloaded MKL routine name with one or more arguments of the incorrect type. Some arguments may have been left out, or not in the proper sequence, or may not have the required keywords specified.

This error occurs at the compilation stage, and has almost nothing to do with which linker options are used and which libraries are specified for inclusion in the link step.

Please post the specific line(s) with the CALL, state or show the declarations of the arguments, and list the modules USEd in the subprogram with the CALL statement.
0 Kudos
barragan_villanueva_
Valued Contributor I
438 Views
Hi,

According to http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
the list of libraries is to be as follows:

mkl_blas95.lib mkl_scalapack_core.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib mkl_blacs_intelmpi.lib /Qopenmp

and recommended compiler options

/module:$(F95ROOT)/include/ia32

Pleaseuse MKL Link Line Advisor for your settings
0 Kudos
marcioy
Beginner
438 Views
Thank you all for the replies.
I was trying a small test program to solve a linear system, namely:
program Testing
USE mkl95_LAPACK
implicit none
!
double precision, dimension(2,2)::A,C,Y
double precision, dimension(2):: x,b
! RiserSIM3D
print *, 'Hello World'
!Zeroing the vectors/matrices;
A=0.0;
x=0.0;
b=0.0;
!Defining A;
A(1,1) =-2;
A(1,2) = 3;
A(2,1) = 9;
A(2,2) =-3;
!Defining b;
b(1) = 8;
b(2) =-15;
!Solving A*x=b;
call GESV(A,b); !(Fortran 95 syntax);
endprogram Testing
The above program is now correct and the solution of system is supposed to be -1,2.
The problem before was that I declared the vector b using the following declaration:
double precision, dimension(2,1):: x,b !wrong declaration;
The IVF compiler understood the above x and b as rank 2 arrays and did not compile the program because an array (rank 1) was expected as second input of GESV (from MKL's LAPACK) using the Fortran 95.
The some compilation problem did not occur using the Fortran 77 syntax.
It was a shameable mistake of mine.
Again, thank you everyone for the replies. I am realy sorry to take your time.
My best regards,
Marcio Yamamoto
0 Kudos
Reply