I am using IMSL with Intel Virtual Fortran with MKL. I tried to use a routine from IMSL. It was compiled fine, but when I try to execute the file it came up with an error saying:
MKL ERROR: Parameter 7 was incorrect on entry to SGEEVX
*** TERMINAL ERROR 2 from EVCRG. The required storage cannot be allocated.
*** The specified N may be too large, where N = 1064682127.
The following is the code I am using:
PROGRAM test_evcrg
include 'link_fnl_static.h'
!DEC$ OBJCOMMENT lib:'libiomp5mt.lib'
IMPLICIT NONE
REAL, Dimension(2,2) :: p,vr
REAL, Dimension(2) :: w
p = RESHAPE([0.7, 0.3, 0.5,0.5],[2,2])
CALL EVCRG (p,w,vr)
WRITE (*,*), w
WRITE (*,*)
WRITE (*,*), vr
END PROGRAM test_evcrg
How can I fix this problem?
AFTER I ADDED USE EVCRG_INT
IT GIVES THE ERROR INFOMATION:
test_evcrg.f90(14): error #6285: There is no matching specific subroutine for this generic subroutine call. [EVCRG]
CALL EVCRG(p,w,vr)
---------^
compilation aborted for test_evcrg.f90 (code 1)
THANKS.
In the IMSL USER'S GUIDE, it says:
FORTRAN 90 Interface
Generic: CALL EVCRG (A, EVAL, EVEC [,…])
Specific: The specific interface names are S_EVCRG and D_EVCRG.
I don't know IMSL enough, but I think there is a mismatch of interfaces. Because you do not
use
any IMSL module, you are not using the Fortran 90 interface, but the Fortran 77 interface, which requires more arguments. See IMSL manual. Eitheruse
the module, or change the call to something likeCALL EVCRG (2, p, 2,w, vr, 2)
.The use statement you can use is probably
USE numerical_libraries
.---- EDIT ----
It means, that adding the use was the good thing. Now it exposes, that there really was an error in the call. The arguments are wrong. Arguments 2 and 3, i.e. EVAL and EVEC must be
COMPLEX
!