<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic For gcc linking, you would in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056546#M21434</link>
    <description>&lt;P&gt;For gcc linking, you would need to add all the -L and -l specifications (equivalent to what you used with ifort), as well as the -I ones which you may have got right, although you don't show it. &amp;nbsp;Adding -v option might be helpful to verify the order of library searching. Environment variables like MKLPATH and having libiomp5 on path would not be available in gcc unless you had set them up, e.g. by the commands by which you set up for ifort.&lt;/P&gt;

&lt;P&gt;It's unusual to set up a Makefile which over-rides the normal cc (presumably pointing to gcc) with a Fortran compiler. Environment variable name choices such as $(FC) or $(F90) are more usual. &amp;nbsp; You would need to make sure such a move doesn't interfere with use of gcc.&lt;/P&gt;</description>
    <pubDate>Sun, 06 Jul 2014 16:33:06 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2014-07-06T16:33:06Z</dc:date>
    <item>
      <title>using gcc compile this sample program</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056545#M21433</link>
      <description>&lt;P&gt;I am testing a program which diagnalize a hermitian matrix, using LAPACKE_zheev function describe in the MKL manual.&lt;/P&gt;

&lt;P&gt;When I try to compile this program, using &lt;STRONG&gt;gcc myprogram.c&lt;/STRONG&gt; command. I got an error message saying that:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="font-size: 1em; line-height: 1.5;"&gt;/tmp/cc4Xdq1R.o: In function `diag':&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG style="font-size: 1em; line-height: 1.5;"&gt;zheev_mkl.c:(.text+0x3c): undefined reference to `LAPACKE_zheev'&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;collect2: ld returned 1 exit status&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I don't know how to solve this problem. I have used fortran zheev(F77) and heev(F90) before, and I succeed in compiling the program. In fortran program I use ifort compiler when using F77 interface I just type &lt;/SPAN&gt;&lt;STRONG style="font-size: 1em; line-height: 1.5;"&gt;ifort myprogram.f .&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Using F90 interface I have a Makefile which is complicated and not written by myself. I will paste that to provide more information to you.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;By the way, in my Unbuntu system, I have only installed the intel fortran composer, i didn't install any C compiler other than gcc and g++.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Here is my C program I want to compile:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include    &amp;lt;complex.h&amp;gt;
#include    &amp;lt;math.h&amp;gt;
#include    &amp;lt;stdlib.h&amp;gt;
#include    &amp;lt;stdint.h&amp;gt;
#include    &amp;lt;stdio.h&amp;gt;
#include    &amp;lt;mkl.h&amp;gt;

lapack_int LAPACKE_zheev( int matrix_order, char jobz, char uplo, lapack_int n, lapack_complex_double* a, lapack_int lda, double* w );
//hermitian matrix, each row in output is an eigenvector, the input matrix is stored in column-major
void    diag(lapack_complex_double *mat, double *e, lapack_int n)
{
    char    jobz='V';   //also eigenvectors
    char    uplo='U';   //upper triangle
    lapack_int  info;

    info=LAPACKE_zheev(n,jobz,uplo,n,mat,n,e);
    if(info!=0){
        printf("matrix diag fail\n");
        exit(1);
    }

}

int main()
{
    lapack_complex_double *mat;
    double  *e;

    mat=(lapack_complex_double *)malloc(sizeof(lapack_complex_double)*16);
    e=(double *)malloc(sizeof(double)*4);

    mat[0].real=1.0;    mat[0].imag=0.0;
    mat[1].real=1.0;    mat[1].imag=-1.0;
    mat[2].real=1.0;    mat[2].imag=-2.0;
    mat[3].real=1.0;    mat[3].imag=-3.0;
    mat[4].real=1.0;    mat[4].imag=1.0;
    mat[5].real=2.0;    mat[5].imag=0.;
    mat[6].real=1.0;    mat[6].imag=-4.0;
    mat[7].real=1.0;    mat[7].imag=-5.0;
    mat[8].real=1.0;    mat[8].imag=2.0;
    mat[9].real=1.0;    mat[9].imag=4.0;
    mat[10].real=3.0;   mat[10].imag=0.;
    mat[11].real=1.0;   mat[11].imag=-6.0;
    mat[12].real=1.0;   mat[12].imag=3.0;
    mat[13].real=1.0;   mat[13].imag=5.0;
    mat[14].real=1.0;   mat[14].imag=6.0;
    mat[15].real=4.0;   mat[15].imag=0.;

    diag(mat,e,4);

    printf("the eigenvalue is %f,%f,%f,%f\n",e[1],e[2],e[3],e[4]);
    printf(" ");

    free(mat);
    free(e);
}
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;And Here is my fortran Makefile which I think may provide some useful information:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;NAME=zg
OBJECTS = $(NAME).f90
cc = ifort
MKLPATH=/opt/intel/composer_xe_2013.5.192/mkl/lib/intel64
MKLINCLUDE=/opt/intel/composer_xe_2013.5.192/mkl/include
MODPATH=/opt/intel/composer_xe_2013.5.192/mkl/include/intel64/lp64
FLAGS= -module $(MODPATH) \
 -assume byterecl -L$(MKLPATH) -I$(MKLINCLUDE)  -I$(MODPATH) -lmkl_lapack95_lp64 -lmkl_blas95_lp64  -Wl,--start-group $(MKLPATH)/libmkl_intel_lp64.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a -Wl,--end-group -liomp5 -lpthread

OUTNAME=zg.out

$(NAME): $(OBJECTS)
    $(cc) -o $(OUTNAME) $(OBJECTS) $(FLAGS)
clean:
    rm -f $(OUTNAME)
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks for you help in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jul 2014 15:12:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056545#M21433</guid>
      <dc:creator>Ming_L_1</dc:creator>
      <dc:date>2014-07-06T15:12:02Z</dc:date>
    </item>
    <item>
      <title>For gcc linking, you would</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056546#M21434</link>
      <description>&lt;P&gt;For gcc linking, you would need to add all the -L and -l specifications (equivalent to what you used with ifort), as well as the -I ones which you may have got right, although you don't show it. &amp;nbsp;Adding -v option might be helpful to verify the order of library searching. Environment variables like MKLPATH and having libiomp5 on path would not be available in gcc unless you had set them up, e.g. by the commands by which you set up for ifort.&lt;/P&gt;

&lt;P&gt;It's unusual to set up a Makefile which over-rides the normal cc (presumably pointing to gcc) with a Fortran compiler. Environment variable name choices such as $(FC) or $(F90) are more usual. &amp;nbsp; You would need to make sure such a move doesn't interfere with use of gcc.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jul 2014 16:33:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056546#M21434</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-07-06T16:33:06Z</dc:date>
    </item>
    <item>
      <title>The first argument to LAPACKE</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056547#M21435</link>
      <description>&lt;P&gt;The first argument to L&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14.30880069732666px; background-color: rgb(248, 248, 248);"&gt;APACKE_zheev should be an integer with value&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New', Courier, monospace;"&gt;LAPACK_ROW_MAJOR or&amp;nbsp;LAPACK_COL_MAJOR, not n. &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: 'Courier New', Courier, monospace;"&gt;Secondly, there is no point in using any of the libraries containing "95" in their name -- those are libraries intended for calling from Fortran 90 and later, using generic routine names. It is very doubtful that you will have any need to call those generic names from C code.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jul 2014 19:59:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056547#M21435</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-07-06T19:59:35Z</dc:date>
    </item>
    <item>
      <title>The MKL link advisor covers</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056548#M21436</link>
      <description>&lt;P&gt;The MKL link advisor covers gcc on linux with either libgomp or libiomp5.&amp;nbsp;&amp;nbsp; The environment variable MKLROOT could be set by sourceing mklvars script in the MKL installation.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jul 2014 20:50:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056548#M21436</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-07-06T20:50:17Z</dc:date>
    </item>
    <item>
      <title>Hi Ming L. </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056549#M21437</link>
      <description>&lt;P&gt;Hi Ming L.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The latest version of the tool is available at &lt;SPAN id="GUID-E92EF819-6A17-48C7-B31D-CB3700AC48FA"&gt;&lt;A href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor" target="_blank"&gt;http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor&lt;/A&gt;&lt;/SPAN&gt;.&lt;/P&gt;

&lt;P&gt;The link command of gcc is almost same as ifort in mkl useguide link example. &amp;nbsp;just repace the ifort with gcc.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;for example, you may try to&amp;nbsp;&lt;/P&gt;

&lt;P&gt;$ gcc le_zheev.c -ole_zheev -Iopt/intel/composer_xe_2013.5.192/mkl/include -L/opt/intel/composer_xe_2013.5.192/mkl/lib/intel64 -L/opt/intel/composer_xe_2013.5.192/compiler/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lm -lpthread&lt;BR /&gt;
	$ ./le_zheev&lt;BR /&gt;
	Wrong parameter 1 in LAPACKE_zheev&lt;BR /&gt;
	matrix diag fail&lt;/P&gt;

&lt;P&gt;As mecej4 mentioned, the parameter in the function is wrong, you may refer to MKL manual for the details.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2014 02:38:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056549#M21437</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2014-07-07T02:38:43Z</dc:date>
    </item>
    <item>
      <title>Quote:Ying H (Intel) wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056550#M21438</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Ying H (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi Ming L.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The latest version of the tool is available at &lt;A href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor"&gt;http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;The link command of gcc is almost same as ifort in mkl useguide link example. &amp;nbsp;just repace the ifort with gcc.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;for example, you may try to&amp;nbsp;&lt;/P&gt;

&lt;P&gt;$ gcc le_zheev.c -ole_zheev -Iopt/intel/composer_xe_2013.5.192/mkl/include -L/opt/intel/composer_xe_2013.5.192/mkl/lib/intel64 -L/opt/intel/composer_xe_2013.5.192/compiler/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lm -lpthread&lt;BR /&gt;
	&lt;BR /&gt;
	$ ./le_zheev&lt;BR /&gt;
	&lt;BR /&gt;
	Wrong parameter 1 in LAPACKE_zheev&lt;BR /&gt;
	&lt;BR /&gt;
	matrix diag fail&lt;/P&gt;

&lt;P&gt;As mecej4 mentioned, the parameter in the function is wrong, you may refer to MKL manual for the details.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hi Ying H:&lt;/P&gt;

&lt;P&gt;Copying your code, I succeed in passing the compilation. Thank you very much! Also thanks other guys, they may at the right point, but a little bit abstract for me.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2014 11:50:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056550#M21438</guid>
      <dc:creator>Ming_L_1</dc:creator>
      <dc:date>2014-07-07T11:50:30Z</dc:date>
    </item>
    <item>
      <title>Quote:mecej4 wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056551#M21439</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;mecej4 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The first argument to LAPACKE_zheev should be an integer with value&amp;nbsp;LAPACK_ROW_MAJOR or&amp;nbsp;LAPACK_COL_MAJOR, not n.&lt;/P&gt;

&lt;P&gt;Secondly, there is no point in using any of the libraries containing "95" in their name -- those are libraries intended for calling from Fortran 90 and later, using generic routine names. It is very doubtful that you will have any need to call those generic names from C code.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thank you very much for pointing out the wrong use of the first argument! I have correct that and my sample program passed the compiling!&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2014 11:55:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056551#M21439</guid>
      <dc:creator>Ming_L_1</dc:creator>
      <dc:date>2014-07-07T11:55:16Z</dc:date>
    </item>
    <item>
      <title>Quote:Ming L. wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056552#M21440</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Ming L. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Quote:&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thank you very much for pointing out the wrong use of the first argument! I have correct that and my sample program passed the compiling!&amp;nbsp;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Argument value checks are made at run time; therefore, being able to compile and link is not enough to establish that correct arguments are being provided. You need a test case for which you can find the correct solution (by hand calculation or other means) and then you should compare that solution with the output of the program in question.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2014 12:21:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056552#M21440</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-07-07T12:21:00Z</dc:date>
    </item>
    <item>
      <title>Quote:mecej4 wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056553#M21441</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;mecej4 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Quote:&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;&lt;EM&gt;Ming L.&lt;/EM&gt; wrote:

	&lt;P&gt;&lt;STRONG&gt;Quote:&lt;/STRONG&gt;&lt;/P&gt;

	&lt;BLOCKQUOTE&gt;
		&lt;P&gt;Thank you very much for pointing out the wrong use of the first argument! I have correct that and my sample program passed the compiling!&amp;nbsp;&lt;/P&gt;
	&lt;/BLOCKQUOTE&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Argument value checks are made at run time; therefore, being able to compile and link is not enough to establish that correct arguments are being provided. You need a test case for which you can find the correct solution (by hand calculation or other means) and then you should compare that solution with the output of the program in question.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks for reminding me, I correct another mistake in my program, that is: eigenvalue starts form e[0] not e[1].&lt;/P&gt;

&lt;P&gt;May I ask you a little question: if I choose my matrix_order to be&amp;nbsp;LAPACK_ROW_MAJOR, do this mean the output eigenvectors also put in the row order. In my example, is that mean that mat[0],mat[1],mat[2],mat[3] form the eigenvector of the first eigenvalue?&lt;/P&gt;

&lt;P&gt;And, if I choose my matrix_order to be&amp;nbsp;LAPACK_COL_MAJOR, is the output eigenvectors also put in the column major. In my example, then , mat[0], mat[4], mat[8], mat[12] form the eigenvector of the first eigenvalue?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2014 12:53:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056553#M21441</guid>
      <dc:creator>Ming_L_1</dc:creator>
      <dc:date>2014-07-07T12:53:00Z</dc:date>
    </item>
    <item>
      <title>Hi Ming L, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056554#M21442</link>
      <description>&lt;P&gt;Hi Ming L,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If you choose LAPACK_ROW_MAJOR, you can take the mat as &amp;nbsp;the matrix in Math concept, &amp;nbsp;as you know, &amp;nbsp;in math concept, the eigenvector is the column of output matrix. &amp;nbsp;So in your example, mat[0], mat[1], mat[2], mat[3] is the first row of matrix. &amp;nbsp;They are not the eigenvector of the first eigenvalues.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Based on the same rule, if LAPACK_COL_MAJOR, the mat[0], mat[1], mat[2], mat[3] is the first column of matrix. So they are the eignevector of the first eigenvalues.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;There are exact cheev 4x4 matrix example code in MKL install directory, for example,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;lt;MKL example&amp;gt;\lapacke\source\lapacke_cheev_col.c and lapacke_cheev_row.c&lt;/P&gt;

&lt;P&gt;You may refer to them.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2014 03:58:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056554#M21442</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2014-07-08T03:58:34Z</dc:date>
    </item>
    <item>
      <title>Quote:Ying H (Intel) wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056555#M21443</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Ying H (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi Ming L,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If you choose LAPACK_ROW_MAJOR, you can take the mat as &amp;nbsp;the matrix in Math concept, &amp;nbsp;as you know, &amp;nbsp;in math concept, the eigenvector is the column of output matrix. &amp;nbsp;So in your example, mat[0], mat[1], mat[2], mat[3] is the first row of matrix. &amp;nbsp;They are not the eigenvector of the first eigenvalues.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Based on the same rule, if LAPACK_COL_MAJOR, the mat[0], mat[1], mat[2], mat[3] is the first column of matrix. So they are the eignevector of the first eigenvalues.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;There are exact cheev 4x4 matrix example code in MKL install directory, for example,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;lt;MKL example&amp;gt;\lapacke\source\lapacke_cheev_col.c and lapacke_cheev_row.c&lt;/P&gt;

&lt;P&gt;You may refer to them.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks for your explanation and the reference provided. I think I got this rule. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2014 06:16:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/using-gcc-compile-this-sample-program/m-p/1056555#M21443</guid>
      <dc:creator>Ming_L_1</dc:creator>
      <dc:date>2014-07-09T06:16:39Z</dc:date>
    </item>
  </channel>
</rss>

