使用IMSL时出现MKL错误

时间:2012-04-17 07:16:02

标签: fortran intel intel-mkl imsl

我正在使用带有MKL的Intel Virtual Fortran的IMSL。我试图使用IMSL的例程。它编译得很好,但是当我尝试执行该文件时,它出现了一个错误说:

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.

以下是我正在使用的代码:

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

如何解决此问题?

我加入之后       使用EVCRG_INT

IT给出了错误信息:

    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)

感谢。

在IMSL用户指南中,它说:

   FORTRAN 90 Interface
   Generic:  CALL EVCRG (A, EVAL, EVEC [,…])
   Specific:  The specific interface names are S_EVCRG and D_EVCRG. 

1 个答案:

答案 0 :(得分:2)

我不太了解IMSL,但我认为接口不匹配。因为您没有use任何IMSL模块,所以您不使用Fortran 90接口,而是使用Fortran 77接口,这需要更多参数。见IMSL manualuse模块,或将调用更改为CALL EVCRG (2, p, 2,w, vr, 2)

您可以使用的使用声明可能是USE numerical_libraries

----编辑----

这意味着,添加使用是好事。现在它暴露出来,呼叫中确实存在错误。争论是错误的。参数2和3,即EVAL和EVEC必须为COMPLEX