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

MKL ERROR: Parameter 8 was incorrect on entry to DSYEV

Charulatha_V_
Beginner
2,266 Views

Hi, I'm trying to use the lapack and blas libraries. I tried a simple example program that uses DSYEV. I get the following error on running the program: MKL ERROR: Parameter 8 was incorrect on entry to DSYEV. I issued the following commands to load the modules and compiled them.

>module load intel/2012.0.032

>ifort -O3  example.f -lmkl_intel_ilp64 -lmkl_core -lmkl_sequential  -lpthread -lm

I would appreciate any help in solving this problem.

thanks,

charu.

--------------------------------------------------------------

The example.f program is :

       program main

       implicit none
*     .. Parameters ..
      INTEGER          N
      PARAMETER        ( N = 5 )
      INTEGER          LDA
      PARAMETER        ( LDA = N )
      INTEGER          LWMAX
      PARAMETER        ( LWMAX = 1000 )
*
*     .. Local Scalars ..
      INTEGER          INFO, LWORK
      integer :: i, j
*
*     .. Local Arrays ..
      DOUBLE PRECISION A( LDA, N ), W( N ), WORK( LWMAX )
      DATA             A/
     $  1.96, -6.49, -0.47, -7.20, -0.65,
     $ -6.49,  3.80, -6.39,  1.50, -6.34,
     $ -0.47, -6.39,  4.17, -1.51,  2.67,
     $ -7.20,  1.50, -1.51,  5.70,  1.80,
     $ -0.65, -6.34,  2.67,  1.80, -7.10
     $                  /
*
*     .. External Subroutines ..
      EXTERNAL         DSYEV
      EXTERNAL         PRINT_MATRIX
*
*     .. Intrinsic Functions ..
      INTRINSIC        INT, MIN
*
*     .. Executable Statements ..
      WRITE(*,*)'DSYEV Example Program Results'

      LWORK = LWMAX
      CALL DSYEV( 'Vectors', 'Upper', N, A, LDA, W, WORK, LWORK, INFO )

      IF( INFO.GT.0 ) THEN
         WRITE(*,*)'The algorithm failed to compute eigenvalues.'
         STOP
      END IF
*
*     Print eigenvalues.
*
      CALL PRINT_MATRIX( 'Eigenvalues', 1, N, W, 1 )
*
*     Print eigenvectors.
*
      CALL PRINT_MATRIX( 'Eigenvectors (stored columnwise)', N, N, A,
     $                   LDA )

      STOP
      END

*     End of DSYEV Example.
*
*  =============================================================================
*
*     Auxiliary routine: printing a matrix.
*
      SUBROUTINE PRINT_MATRIX( DESC, M, N, A, LDA )
      CHARACTER*(*)    DESC
      INTEGER          M, N, LDA
      DOUBLE PRECISION A( LDA, * )
*
      INTEGER          I, J
*
      WRITE(*,*)
      WRITE(*,*) DESC
      DO I = 1, M
         WRITE(*,9998) ( A( I, J ), J = 1, N )
      END DO
*
 9998 FORMAT( 11(:,1X,F6.2) )
      RETURN
      END

 

0 Kudos
2 Replies
TimP
Honored Contributor III
2,266 Views

Apparently, you are using default (32-bit) integers, but you have selected the ilp64 (64-bit integer) library.  The lp64 library is the one which expects default integers.

0 Kudos
Charulatha_V_
Beginner
2,266 Views

Hey Thanks, That fixed the problem !

0 Kudos
Reply