Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

[HELP] Calling geev

terranigmus
Beginner
2,792 Views
Hello.

I am trying to call the geev routine to get the eigenvalues of a 9 x 9 double precision complex matrix, namely a hamilton matrix in fortran 95.

The documentation says

call geev(a, w [,vl] [,vr] [,info])

and my call is

call geev(hamilton,eigen)

where "eigen" is a (1:9) array.

Compiling works but I get a segmentation fault when running the program.

Any help?

Sorry if this is in the wrong section.

0 Kudos
4 Replies
mecej4
Honored Contributor III
2,792 Views
You probably wanted to call the Fortran 95 interface. If you do not include

USE mkl95_lapack

in your source code, your program may link but fail with access violations at run time, because there are many overloaded routine names, and the Fortran 77 routine will probably crash if called with the Fortran 95 argument list.
0 Kudos
terranigmus
Beginner
2,792 Views
Getting
undefined reference to `zgeev_mkl95_'

now :(


I am an amateur here but could it be because I am saving as .f90 ? So ifort doesn't see it as Fortran 95 ?
0 Kudos
TimP
Honored Contributor III
2,792 Views
No, it appears that the llinker wasn't asked to search the MKL libraries. ifort doesn't even provide for .f95 files by default.
It could be as simple as adding -mkl. Beyond that, the link advisor at the top of the MKL forum comes into play.
0 Kudos
mecej4
Honored Contributor III
2,792 Views
The file suffix is not used in selecting which Fortran standard to use as the reference. It is only used to signify whether the source file is fixed- or free-format. Secondly, the "undefined reference" is a linker error, not a compiler error.

You can use the compiler option -mkl and the linker options -lmkl_lapack95 -lmkl_blas95. Please consult the Link-Line-Advisor.
0 Kudos
Reply