Page 1 of 1

trouble with zgeev

PostPosted: Tue Jul 19, 2011 10:14 am
by UlrichRekenin
Hello!

I have to evaluate eigenvalues and eigenvectors for general complex matrix 3by3. I chose a zgeev subroutine to find ones.
I use the following command to link example file on my laptop
http://software.intel.com/sites/products/documentation/hpc/mkl/lapack/mkl_lapack_examples/zgeev_ex.f.htm
Code: Select all
ifort test.f -O3 -ipo8 -static -fast -parallel -align all -mp1 -mtune=pentium4m -pad -pc80 -prec-div -prec-sqrt -scalar-rep -simd -unroll4 -unroll-aggressive -finline -diag-file=diag.out  -I/opt/intel/composerxe-2011.3.174/mkl/include/intel64/ilp64 -lmkl_blas95_ilp64 -lmkl_lapack95_ilp64 -Wl,--start-group /opt/intel/composerxe-2011.3.174/mkl/lib/intel64/libmkl_intel_ilp64.a /opt/intel/composerxe-2011.3.174/mkl/lib/intel64/libmkl_sequential.a /opt/intel/composerxe-2011.3.174/mkl/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread  -o xmain

An executable file was created successful. But when execute it I have error msg out of zgeev.
MKL ERROR: Parameter 12 was incorrect on entry to ZGEEV
And lwork equals to -2147483648.

Re: trouble with zgeev

PostPosted: Tue Jul 19, 2011 11:02 am
by Julien Langou
You need to set LWORK to a valid values. Please read the header of the subroutine:
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= max(1,2*N).
* For good performance, LWORK must generally be larger.
*
* If LWORK = -1, then a workspace query is assumed; the routine
* only calculates the optimal size of the WORK array, returns
* this value as the first entry of the WORK array, and no error
* message related to LWORK is issued by XERBLA.

Re: trouble with zgeev

PostPosted: Tue Jul 19, 2011 12:34 pm
by UlrichRekenin
Julien Langou wrote:You need to set LWORK to a valid values. Please read the header of the subroutine:
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= max(1,2*N).
* For good performance, LWORK must generally be larger.
*
* If LWORK = -1, then a workspace query is assumed; the routine
* only calculates the optimal size of the WORK array, returns
* this value as the first entry of the WORK array, and no error
* message related to LWORK is issued by XERBLA.

I have already read it and done this way. I setted lwork=-1 and I got the msg above
Parameter 12 was incorrect on entry to ZGEEV

Re: trouble with zgeev

PostPosted: Wed Jul 20, 2011 11:36 pm
by cottrell
If I compile the example program (from Intel) that you cited, using
gfortran on Linux:

Code: Select all
gfortran -o zge zgeev_example.f -llapack -lblas

then I get a working program that prints exactly the results shown in the
comments of the Intel code. To be precise this is on Ubuntu 10.04 with
lapack 3.2.2.

I'm not equipped to evaluate the monstrously complex compilation command
that you used, but it seems there must be something wrong with it.