<?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 Re:Slow eigen value decomposition using mkl_sparse_d_gv in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1444976#M34132</link>
    <description>&lt;P&gt;Hi Haoxiang,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the details.&lt;/P&gt;&lt;P&gt;The issue is reproducible from our end as well. We are working on this issue, we will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 09 Jan 2023 13:30:30 GMT</pubDate>
    <dc:creator>VidyalathaB_Intel</dc:creator>
    <dc:date>2023-01-09T13:30:30Z</dc:date>
    <item>
      <title>Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437404#M33978</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm a rookie for intel MKL lib. I just down the lib and tried to use a generalized eigendecomposition function in MKL. But I wonder why such a function is so slow in my cases. I test a 7000*7000 sparse matrix. But it consumes about 120 s. Here is the c++ code. I am only using Eigen lib 3.37 and intel MKL for computing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#include &amp;lt;omp.h&amp;gt;&lt;BR /&gt;#include &amp;lt;set&amp;gt;&lt;BR /&gt;#include &amp;lt;map&amp;gt;&lt;BR /&gt;#include &amp;lt;queue&amp;gt;&lt;BR /&gt;#include &amp;lt;fstream&amp;gt;&lt;BR /&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#include &amp;lt;iomanip&amp;gt;&lt;BR /&gt;#include &amp;lt;sstream&amp;gt;&lt;BR /&gt;#include &amp;lt;thread&amp;gt;&lt;BR /&gt;#include &amp;lt;Eigen/Core&amp;gt;&lt;BR /&gt;#include &amp;lt;Eigen/Dense&amp;gt;&lt;BR /&gt;#include &amp;lt;Eigen/Sparse&amp;gt;&lt;BR /&gt;#include &amp;lt;Eigen/SparseCore&amp;gt;&lt;BR /&gt;#include &amp;lt;Eigen/Eigenvalues&amp;gt;&lt;BR /&gt;#include &amp;lt;unsupported/Eigen/KroneckerProduct&amp;gt;&lt;BR /&gt;#include &amp;lt;unsupported/Eigen/ArpackSupport&amp;gt;&lt;BR /&gt;#include &amp;lt;unsupported/Eigen/CXX11/Tensor&amp;gt;&lt;BR /&gt;#include "unsupported/Eigen/ArpackSupport"&lt;BR /&gt;#include &amp;lt;unsupported/Eigen/SparseExtra&amp;gt;&lt;BR /&gt;#include "mkl.h"&lt;BR /&gt;using vec2i = Eigen::Vector2i;&lt;BR /&gt;using vec2 = Eigen::Vector2d;&lt;BR /&gt;using vec3 = Eigen::Vector3d;&lt;BR /&gt;using vec4 = Eigen::Vector4d;&lt;BR /&gt;using vec3f = Eigen::Vector3f;&lt;BR /&gt;using mat3 = Eigen::Matrix3d;&lt;BR /&gt;using DMatrix = Eigen::MatrixXd;&lt;BR /&gt;using IMatrix = Eigen::MatrixXi;&lt;BR /&gt;using DSparse = Eigen::SparseMatrix&amp;lt;double&amp;gt;;&lt;BR /&gt;using DVector = Eigen::VectorXd;&lt;BR /&gt;using IVector = Eigen::VectorXi;&lt;/P&gt;
&lt;P&gt;static void EigenSparseToCuSparseTranspose(&lt;BR /&gt;//const Eigen::SparseMatrix&amp;lt;double, Eigen::RowMajor&amp;gt; &amp;amp;mat, int *row, int *col, double *val)&lt;BR /&gt;const DSparse &amp;amp;mat, int *row, int *col, double *val)&lt;BR /&gt;{&lt;BR /&gt;const int num_non0 = mat.nonZeros();&lt;BR /&gt;const int num_outer = mat.cols() + 1;&lt;/P&gt;
&lt;P&gt;memcpy(row, mat.outerIndexPtr(), sizeof(int) * num_outer);&lt;/P&gt;
&lt;P&gt;memcpy(col, mat.innerIndexPtr(), sizeof(int) * num_non0);&lt;/P&gt;
&lt;P&gt;memcpy(val, mat.valuePtr(), sizeof(double) * num_non0);&lt;/P&gt;
&lt;P&gt;for (int el = 0; el &amp;lt; num_outer; el++) {&lt;BR /&gt;row[el] = row[el] + 1;&lt;BR /&gt;}&lt;BR /&gt;for (int el = 0; el &amp;lt; num_non0; el++) {&lt;BR /&gt;col[el] = col[el] + 1;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;// Define the sparse matrix object&lt;BR /&gt;Eigen::SparseMatrix&amp;lt;double&amp;gt; Lap;&lt;BR /&gt;Eigen::SparseMatrix&amp;lt;double&amp;gt; Vol;&lt;BR /&gt;// Read the matrix from the text file&lt;BR /&gt;Eigen::loadMarket(Lap,"Lap.txt");&lt;BR /&gt;Eigen::loadMarket(Vol, "Vol.txt");&lt;BR /&gt;// Print the matrix to the console&lt;BR /&gt;MKL_INT N = Lap.rows();&lt;BR /&gt;int num_non0 = Lap.nonZeros();&lt;BR /&gt;int num_outer = Lap.cols() + 1;&lt;BR /&gt;MKL_INT* ia = new MKL_INT[num_outer];&lt;BR /&gt;MKL_INT* ja = new MKL_INT[num_non0];&lt;BR /&gt;double* Vala = new double[num_non0];&lt;BR /&gt;EigenSparseToCuSparseTranspose(Lap, ia, ja, Vala);&lt;BR /&gt;int num_non0b = Vol.nonZeros();&lt;BR /&gt;int num_outerb = Vol.cols() + 1;&lt;BR /&gt;MKL_INT* ib = new MKL_INT[num_outerb];&lt;BR /&gt;MKL_INT* jb = new MKL_INT[num_non0b];&lt;BR /&gt;double* Valb = new double[num_non0b];&lt;BR /&gt;EigenSparseToCuSparseTranspose(Vol, ib, jb, Valb);&lt;BR /&gt;int nr = 3;&lt;BR /&gt;////exact for a 3*3 matrix, not my matrix&lt;BR /&gt;double Eig[3] = { 1.0, 9.0, 27.0 }; //&lt;/P&gt;
&lt;P&gt;/* mkl_sparse_d_gv input parameters */&lt;BR /&gt;char which = 'S'; /* Which eigenvalues to calculate. ('L' - largest (algebraic) eigenvalues, 'S' - smallest (algebraic) eigenvalues) */&lt;BR /&gt;MKL_INT pm[128]; /* This array is used to pass various parameters to Extended Eigensolver Extensions routines. */&lt;BR /&gt;MKL_INT k0 = nr; /* Desired number of max/min eigenvalues */&lt;/P&gt;
&lt;P&gt;/* mkl_sparse_d_gv output parameters */&lt;BR /&gt;MKL_INT k; /* Number of eigenvalues found (might be less than k0). */&lt;BR /&gt;double* E = new double[k0];&lt;BR /&gt;//double E[3]; /* Eigenvalues */&lt;BR /&gt;double* X = new double[k0*N];&lt;BR /&gt;//double X[3 * 3]; /* Eigenvectors */&lt;BR /&gt;double* res = new double[k0];&lt;BR /&gt;//double res[k0]; /* Residual */&lt;/P&gt;
&lt;P&gt;/* Local variables */&lt;BR /&gt;MKL_INT info; /* Errors */&lt;BR /&gt;MKL_INT compute_vectors = 0;/* Flag to compute eigenvectors */&lt;BR /&gt;MKL_INT tol = 7; /* Tolerance */&lt;BR /&gt;MKL_INT i;&lt;/P&gt;
&lt;P&gt;//Eigen::PardisoLDLT &amp;lt;Eigen::SparseMatrix&amp;lt;double&amp;gt; slo;&lt;BR /&gt;/* Sparse BLAS IE variables */&lt;BR /&gt;sparse_matrix_t A = NULL, B = NULL; /* Handle containing sparse matrix in internal data structure */&lt;BR /&gt;struct matrix_descr descrA, descrB; /* Structure specifying sparse matrix properties */&lt;BR /&gt;/////&lt;BR /&gt;//SPARSE_MATRIX_TYPE_GENERAL = 20, /* General case */&lt;BR /&gt;// SPARSE_MATRIX_TYPE_SYMMETRIC = 21, /* Triangular part of */&lt;BR /&gt;// SPARSE_MATRIX_TYPE_HERMITIAN = 22, /* the matrix is to be processed */&lt;BR /&gt;// SPARSE_MATRIX_TYPE_TRIANGULAR = 23,&lt;BR /&gt;// SPARSE_MATRIX_TYPE_DIAGONAL = 24, /* diagonal matrix; only diagonal elements will be processed */&lt;BR /&gt;// SPARSE_MATRIX_TYPE_BLOCK_TRIANGULAR = 25,&lt;BR /&gt;// SPARSE_MATRIX_TYPE_BLOCK_DIAGONAL = 26 /* block-diagonal matrix; only diagonal blocks will be processed */&lt;/P&gt;
&lt;P&gt;////////////&lt;/P&gt;
&lt;P&gt;/* Create handle for matrix A stored in CSR format */&lt;BR /&gt;//descrA.type = SPARSE_MATRIX_TYPE_GENERAL; /* Full matrix is stored */&lt;BR /&gt;descrA.type = SPARSE_MATRIX_TYPE_SYMMETRIC;&lt;BR /&gt;descrA.mode = SPARSE_FILL_MODE_UPPER;&lt;BR /&gt;descrA.diag = SPARSE_DIAG_NON_UNIT;&lt;BR /&gt;//descrA.type = SPARSE_MATRIX_TYPE_DIAGONAL;&lt;BR /&gt;// struct matrix_descr {&lt;BR /&gt;// sparse_matrix_type_t type; /* matrix type: general, diagonal or triangular / symmetric / hermitian */&lt;BR /&gt;// sparse_fill_mode_t mode; /* upper or lower triangular part of the matrix ( for triangular / symmetric / hermitian case) */&lt;BR /&gt;// sparse_diag_type_t diag; /* unit or non-unit diagonal ( for triangular / symmetric / hermitian case) */&lt;BR /&gt;//};&lt;/P&gt;
&lt;P&gt;//mkl_sparse_d_create_csr(&amp;amp;A, SPARSE_INDEX_BASE_ONE, N, N, ia, ia + 1, ja, EigenSPTest.valuePtr());&lt;BR /&gt;sparse_status_t Astate = mkl_sparse_d_create_csr(&amp;amp;A, SPARSE_INDEX_BASE_ONE, N, N, ia, ia + 1, ja, Vala);&lt;BR /&gt;//mkl_ccsrcsc();&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "Astate:" &amp;lt;&amp;lt; Astate &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;//mkl_sparse_d_create_csr(&amp;amp;A, SPARSE_INDEX_BASE_ONE, N, N, ia, ia + 1, ja, a);&lt;BR /&gt;//descrB.type = SPARSE_MATRIX_TYPE_GENERAL; /* Full matrix is stored */&lt;BR /&gt;descrB.type = SPARSE_MATRIX_TYPE_SYMMETRIC;&lt;BR /&gt;descrB.mode = SPARSE_FILL_MODE_UPPER;&lt;BR /&gt;descrB.diag = SPARSE_DIAG_NON_UNIT;&lt;BR /&gt;//descrB.type = SPARSE_MATRIX_TYPE_DIAGONAL;&lt;BR /&gt;/*mkl_sparse_d_create_csr(&amp;amp;B, SPARSE_INDEX_BASE_ONE, N, N, ib, ib + 1, jb, EigenSPTestB.valuePtr());*/&lt;BR /&gt;sparse_status_t Bstate = mkl_sparse_d_create_csr(&amp;amp;B, SPARSE_INDEX_BASE_ONE, N, N, ib, ib + 1, jb, Valb);&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "Bstate:" &amp;lt;&amp;lt; Bstate &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;/////////////////&lt;BR /&gt;//SPARSE_STATUS_SUCCESS = 0, /* the operation was successful */&lt;BR /&gt;// SPARSE_STATUS_NOT_INITIALIZED = 1, /* empty handle or matrix arrays */&lt;BR /&gt;// SPARSE_STATUS_ALLOC_FAILED = 2, /* internal error: memory allocation failed */&lt;BR /&gt;// SPARSE_STATUS_INVALID_VALUE = 3, /* invalid input value */&lt;BR /&gt;// SPARSE_STATUS_EXECUTION_FAILED = 4, /* e.g. 0-diagonal element for triangular solver, etc. */&lt;BR /&gt;// SPARSE_STATUS_INTERNAL_ERROR = 5, /* internal error */&lt;BR /&gt;// SPARSE_STATUS_NOT_SUPPORTED = 6 /* e.g. operation for double precision doesn't support other types */&lt;BR /&gt;////////////////////////////////////&lt;BR /&gt;/* Step 2. Call mkl_sparse_ee_init to define default input values */&lt;BR /&gt;mkl_sparse_ee_init(pm);&lt;BR /&gt;//dfeast_scsrgv();&lt;BR /&gt;pm[1] = 6; /* Set tolerance */&lt;BR /&gt;pm[2] = 0;&lt;BR /&gt;pm[6] = 1;&lt;BR /&gt;/* Step 3. Solve the standard Ax = ex eigenvalue problem. */&lt;BR /&gt;for (i = 0; i &amp;lt; 10; i++)&lt;BR /&gt;{&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "pm_" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; ":" &amp;lt;&amp;lt; pm[i] &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;}&lt;BR /&gt;info = mkl_sparse_d_gv(&amp;amp;which, pm, A, descrA, B, descrB, k0, &amp;amp;k, E, X, res);&lt;BR /&gt;printf("mkl_sparse_d_gv output info after \n");&lt;BR /&gt;for (i = 0; i &amp;lt; 10; i++)&lt;BR /&gt;{&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "pm_" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; ":" &amp;lt;&amp;lt; pm[i] &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;}&lt;BR /&gt;//info = mkl_sparse_d_ev(&amp;amp;which, pm, A, descrA, k0, &amp;amp;k, E, X, res);&lt;BR /&gt;printf("mkl_sparse_d_gv output info %d \n", info);&lt;BR /&gt;if (info != 0)&lt;BR /&gt;{&lt;BR /&gt;printf("Routine mkl_sparse_d_gv returns code of ERROR: %i", (int)info);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;printf("*************************************************\n");&lt;BR /&gt;printf("************** REPORT ***************************\n");&lt;BR /&gt;printf("*************************************************\n");&lt;BR /&gt;printf("#mode found/subspace %d %d \n", k, k0);&lt;BR /&gt;printf("Index/Exact Eigenvalues/Estimated Eigenvalues/Residuals\n");&lt;BR /&gt;for (i = 0; i &amp;lt; k; i++)&lt;BR /&gt;{&lt;BR /&gt;printf(" %d %.15e %.15e %.15e \n", i, Eig[i], E[i], res[i]);&lt;BR /&gt;}&lt;BR /&gt;mkl_sparse_destroy(A);&lt;BR /&gt;mkl_sparse_destroy(B);&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "End!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;getchar();&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Here, I also attach the txt file for the matrix. Currently, I use C++ 17 in visual studio 2017 and MKLversion 2022.2.1. I'll appreciate it if anyone could help me. Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know why I cannot upload my txt file. It keeps saying:&lt;SPAN&gt;The attachment's vol.txt content type (text/plain) does not match its file extension and has been removed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I hereby attach the link for the matrix:&lt;A href="https://entuedu-my.sharepoint.com/:t:/g/personal/haoxiang002_e_ntu_edu_sg/ES7ixewE5CBMuTzzA4IBHKwBctW6tMHhpm3L3sHZ1r4BFw?e=M1GPnB" target="_self"&gt;https://entuedu-my.sharepoint.com/:t:/g/personal/haoxiang002_e_ntu_edu_sg/ES7ixewE5CBMuTzzA4IBHKwBctW6tMHhpm3L3sHZ1r4BFw?e=M1GPnB&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 12:49:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437404#M33978</guid>
      <dc:creator>haoxiang002</dc:creator>
      <dc:date>2022-12-10T12:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437406#M33979</link>
      <description>&lt;P&gt;And here is the link for Vol Matrix:&lt;A href="https://entuedu-my.sharepoint.com/:t:/g/personal/haoxiang002_e_ntu_edu_sg/EdrTMYb_iCBNoQDJLOnZaO4Br7PiWvGLSTqsAYHu3WPXBA?e=8mCb3C" target="_self"&gt;https://entuedu-my.sharepoint.com/:t:/g/personal/haoxiang002_e_ntu_edu_sg/EdrTMYb_iCBNoQDJLOnZaO4Br7PiWvGLSTqsAYHu3WPXBA?e=8mCb3C&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 12:53:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437406#M33979</guid>
      <dc:creator>haoxiang002</dc:creator>
      <dc:date>2022-12-10T12:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437660#M33984</link>
      <description>&lt;P&gt;Hi Haoxiang,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us and providing us with the details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;But I wonder why such a function is so slow in my cases&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Could you please let us know if you have set /Qmkl option under configuration properties &amp;gt; Intel oneAPI libraries &amp;gt; Use Intel oneMKL to &lt;STRONG&gt;parallel&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;But it consumes about 120 s&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Please do let us know how you are measuring the time taken by oneMKL routine and also the time taken by the Eigen library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vidya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 09:16:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437660#M33984</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-12-12T09:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437725#M33987</link>
      <description>&lt;P&gt;Yes, I set it as parallel. Here is the figure for the properties page. I'm not sure if I set something wrong with MKL lib.&lt;/P&gt;
&lt;P&gt;As for the time consumption. I use a C++ Lib from others. Just set the counter to start before&amp;nbsp;&amp;nbsp;mkl_sparse_d_gv and stop after it. E.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PerformanceCounter&amp;nbsp;substep2;&lt;/P&gt;
&lt;P&gt;substep2.StartCounter();&lt;BR /&gt;info = mkl_sparse_d_gv(&amp;amp;which, pm, A, descrA, B, descrB, k0, &amp;amp;k, E, X, res);&lt;BR /&gt;substep2.StopCounter();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Eigen lib here is just to read the sparse matrix from the txt file. And I convert it to CSR format. I believe it won't take much time to do these. I separate the code into four parts and counted the time for each part. The part2 consumes the most time, which is&amp;nbsp;mkl_sparse_d_gv. Here I also attach&amp;nbsp;PerformanceCounter header file. The time consumption for each part give me:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;substep0:0.0003518&lt;BR /&gt;substep1:0.0225588&lt;BR /&gt;substep2:111.683&lt;BR /&gt;substep3:0.0038434&lt;BR /&gt;overallT:111.71&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 12:50:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437725#M33987</guid>
      <dc:creator>haoxiang002</dc:creator>
      <dc:date>2022-12-12T12:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437730#M33988</link>
      <description>&lt;P&gt;I test the MKL lib in Sequential mode. It takes&amp;nbsp;103.175s for Eigen decomposition. That's weird. Does it mean the multi-threading does not work for my cases?&lt;/P&gt;
&lt;P&gt;For&amp;nbsp;convenience, I also attach the source code with the Counter. And this is the output in my console in&amp;nbsp;Sequential mode:&lt;/P&gt;
&lt;P&gt;Astate:0&lt;BR /&gt;Bstate:0&lt;BR /&gt;pm_0:0&lt;BR /&gt;pm_1:6&lt;BR /&gt;pm_2:0&lt;BR /&gt;pm_3:0&lt;BR /&gt;pm_4:0&lt;BR /&gt;pm_5:512&lt;BR /&gt;pm_6:1&lt;BR /&gt;pm_7:0&lt;BR /&gt;pm_8:0&lt;BR /&gt;pm_9:0&lt;BR /&gt;mkl_sparse_d_gv output info after&lt;BR /&gt;pm_0:0&lt;BR /&gt;pm_1:6&lt;BR /&gt;pm_2:0&lt;BR /&gt;pm_3:0&lt;BR /&gt;pm_4:10000&lt;BR /&gt;pm_5:512&lt;BR /&gt;pm_6:1&lt;BR /&gt;pm_7:0&lt;BR /&gt;pm_8:0&lt;BR /&gt;pm_9:-1&lt;BR /&gt;mkl_sparse_d_gv output info 0&lt;BR /&gt;*************************************************&lt;BR /&gt;************** REPORT ***************************&lt;BR /&gt;*************************************************&lt;BR /&gt;#mode found/subspace 3 3&lt;BR /&gt;Index/Exact Eigenvalues/Estimated Eigenvalues/Residuals&lt;BR /&gt;0 1.000000000000000e+00 5.410415611074628e-01 3.450940775367071e-01&lt;BR /&gt;1 9.000000000000000e+00 3.719215347399311e+07 2.728515969035386e-07&lt;BR /&gt;2 2.700000000000000e+01 4.812127510489339e+07 2.299420475540038e-05&lt;BR /&gt;substep0:0.0003271&lt;BR /&gt;substep1:0.021179&lt;BR /&gt;substep2:103.146&lt;BR /&gt;substep3:0.0074385&lt;BR /&gt;overallT:103.175&lt;BR /&gt;End!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 13:07:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1437730#M33988</guid>
      <dc:creator>haoxiang002</dc:creator>
      <dc:date>2022-12-12T13:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1438347#M33999</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Vidya:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;Yes, I set it as parallel. Here is the figure for the properties page. I'm not sure if I set something wrong with MKL lib.&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;As for the time consumption. I use a C++ Lib from others. Just set the counter to start before&amp;nbsp;&amp;nbsp;mkl_sparse_d_gv and stop after it. E.g.:&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;PerformanceCounter&amp;nbsp;substep2;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;substep2.StartCounter();&lt;BR /&gt;info = mkl_sparse_d_gv(&amp;amp;which, pm, A, descrA, B, descrB, k0, &amp;amp;k, E, X, res);&lt;BR /&gt;substep2.StopCounter();&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;The Eigen lib here is just to read the sparse matrix from the txt file. And I convert it to CSR format. I believe it won't take much time to do these. I separate the code into four parts and counted the time for each part. The part2 consumes the most time, which is&amp;nbsp;mkl_sparse_d_gv. Here I also attach&amp;nbsp;PerformanceCounter header file. The time consumption for each part gives me:&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;substep0:0.0003518&lt;BR /&gt;substep1:0.0225588&lt;BR /&gt;substep2:111.683&lt;BR /&gt;substep3:0.0038434&lt;BR /&gt;overallT:111.71&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;I also test the MKL lib in Sequential mode. It takes&amp;nbsp;103.175s for Eigen decomposition. That's weird. Does it mean the multi-threading does not work for my cases?&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;For&amp;nbsp;convenience, I also attach the source code with the Counter. And this is the output in my console in&amp;nbsp;Sequential mode:&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;Astate:0&lt;BR /&gt;Bstate:0&lt;BR /&gt;pm_0:0&lt;BR /&gt;pm_1:6&lt;BR /&gt;pm_2:0&lt;BR /&gt;pm_3:0&lt;BR /&gt;pm_4:0&lt;BR /&gt;pm_5:512&lt;BR /&gt;pm_6:1&lt;BR /&gt;pm_7:0&lt;BR /&gt;pm_8:0&lt;BR /&gt;pm_9:0&lt;BR /&gt;mkl_sparse_d_gv output info after&lt;BR /&gt;pm_0:0&lt;BR /&gt;pm_1:6&lt;BR /&gt;pm_2:0&lt;BR /&gt;pm_3:0&lt;BR /&gt;pm_4:10000&lt;BR /&gt;pm_5:512&lt;BR /&gt;pm_6:1&lt;BR /&gt;pm_7:0&lt;BR /&gt;pm_8:0&lt;BR /&gt;pm_9:-1&lt;BR /&gt;mkl_sparse_d_gv output info 0&lt;BR /&gt;*************************************************&lt;BR /&gt;************** REPORT ***************************&lt;BR /&gt;*************************************************&lt;BR /&gt;#mode found/subspace 3 3&lt;BR /&gt;Index/Exact Eigenvalues/Estimated Eigenvalues/Residuals&lt;BR /&gt;0 1.000000000000000e+00 5.410415611074628e-01 3.450940775367071e-01&lt;BR /&gt;1 9.000000000000000e+00 3.719215347399311e+07 2.728515969035386e-07&lt;BR /&gt;2 2.700000000000000e+01 4.812127510489339e+07 2.299420475540038e-05&lt;BR /&gt;substep0:0.0003271&lt;BR /&gt;substep1:0.021179&lt;BR /&gt;substep2:103.146&lt;BR /&gt;substep3:0.0074385&lt;BR /&gt;overallT:103.175&lt;BR /&gt;End!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 03:00:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1438347#M33999</guid>
      <dc:creator>haoxiang002</dc:creator>
      <dc:date>2022-12-14T03:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1439532#M34014</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="sub_section_element_selectors"&gt;Vidya:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="sub_section_element_selectors"&gt;Any further suggestions?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="sub_section_element_selectors"&gt;Regards.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="sub_section_element_selectors"&gt;haoxiang&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 09:57:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1439532#M34014</guid>
      <dc:creator>haoxiang002</dc:creator>
      <dc:date>2022-12-18T09:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1439681#M34016</link>
      <description>&lt;P&gt;HI Haoxiang,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried running the code that you have provided but I'm getting an exception while running it in VS 2022.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VidyalathaB_Intel_0-1671440739293.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/36314i21951DE3221FD9F1/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="VidyalathaB_Intel_0-1671440739293.png" alt="VidyalathaB_Intel_0-1671440739293.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Could you please provide us with your project file or else let me know if I miss something here?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vidya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 09:05:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1439681#M34016</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-12-19T09:05:51Z</dc:date>
    </item>
    <item>
      <title>Re:Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1441638#M34060</link>
      <description>&lt;P&gt;Hi Haoxiang,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As we haven't heard back from you, could you please provide us with an update regarding the issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Dec 2022 10:39:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1441638#M34060</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-12-26T10:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1442442#M34088</link>
      <description>&lt;P&gt;Oh, sorry &lt;SPAN&gt;Vidya&lt;/SPAN&gt;. Since you didn't reply for about one week, I thought you were on vacation these days. I didn't get this exception. Maybe you can run in debug mode and tell me where the error happens (because its seems like the code problem).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Previously I tried many different options and still could not solve the problem. So I switch to Matlab c++ engine. It can solve the&amp;nbsp;&lt;SPAN&gt;5e5*5e5 sparse matrix within 100s. For my current project file, I'm not sure whether some options are different from the beginning. But since I still cannot solve it with mkl lib, for convenience, I directly zip my sln file. Attached is the file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 07:48:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1442442#M34088</guid>
      <dc:creator>haoxiang002</dc:creator>
      <dc:date>2022-12-29T07:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1442477#M34093</link>
      <description>&lt;P&gt;Hi Haoxiang,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried running the code and here is the output I'm getting. Please see the below screenshot.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VidyalathaB_Intel_0-1672306508005.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/36624i80FE72FFD6E6A85D/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="VidyalathaB_Intel_0-1672306508005.png" alt="VidyalathaB_Intel_0-1672306508005.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't get an exception this time but I think it doesn't execute either from line 174.&lt;/P&gt;
&lt;P&gt;Please let me know if I miss anything here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vidya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 09:35:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1442477#M34093</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-12-29T09:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1442909#M34101</link>
      <description>&lt;P&gt;Hi Vidya.&lt;/P&gt;
&lt;P&gt;Are u sure you successfully read these two matrices (Mat Lap and Vol) at the beginning?&lt;/P&gt;
&lt;P&gt;Astate and Bstate should be 0 if you read them successfully.&lt;/P&gt;
&lt;P&gt;I mean u might need to download these two matrices first and change the path to these txt files in your computer.&lt;/P&gt;
&lt;P&gt;I previously provided these files in the link. In case you miss it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the link is here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://entuedu-my.sharepoint.com/:t:/g/personal/haoxiang002_e_ntu_edu_sg/ES7ixewE5CBMuTzzA4IBHKwBctW6tMHhpm3L3sHZ1r4BFw?e=gKOWnI" target="_blank"&gt;Lap.txt&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://entuedu-my.sharepoint.com/:t:/g/personal/haoxiang002_e_ntu_edu_sg/EdrTMYb_iCBNoQDJLOnZaO4Br7PiWvGLSTqsAYHu3WPXBA?e=LBzZCv" target="_blank"&gt;Vol.txt&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot directly upload these file because the system keeps saying that The attachment's vol.txt content type (text/plain) does not match its file extension and has been removed.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;haoxiang&lt;/P&gt;</description>
      <pubDate>Sat, 31 Dec 2022 06:53:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1442909#M34101</guid>
      <dc:creator>haoxiang002</dc:creator>
      <dc:date>2022-12-31T06:53:00Z</dc:date>
    </item>
    <item>
      <title>Re:Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1444976#M34132</link>
      <description>&lt;P&gt;Hi Haoxiang,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the details.&lt;/P&gt;&lt;P&gt;The issue is reproducible from our end as well. We are working on this issue, we will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Jan 2023 13:30:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1444976#M34132</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2023-01-09T13:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1446348#M34159</link>
      <description>&lt;P&gt;Ok, thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 04:13:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1446348#M34159</guid>
      <dc:creator>haoxiang002</dc:creator>
      <dc:date>2023-01-13T04:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1493999#M34650</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your patience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;EM&gt;I test the MKL lib in Sequential mode. It takes 103.175s for Eigen decomposition. That's weird. Does it mean the multi-threading does not work for my cases?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below are the observations and recommendations of our developers:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the sequential result, the solver is not converged (pm_9=-1), while it is converged in the parallel result. The poor performance is because the smallest eigenvalue is close to zero and at least 8 orders of magnitude smaller than the others.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The smallest eigenvalue is ~10e-1 and the largest is ~10e+14.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The matrices provided by you are very sparse. More precisely the first matrix is the diagonal one, and the sparsity of the second matrix is a bit higher than 1%. mkl_sparse_d_ev is a sparse eigensolver and as a consequence, sparse matrix-vector multiply is the most time-consuming operation. Since the sparsity of the second matrix is very and very low it's impossible to provide efficient parallelization of sparse matrix-vector multiply for a matrix with roughly 70K of non-zeros simply because it's not enough computational work for many threads. This explains why only 1 thread is faster than 2 or 4 threads in this case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are several options to find the smallest eigenvalues faster when they are close to zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. First of all, it is recommended to shift and invert spectral transformation. More precisely, instead of looking smallest eigenvalues for&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ax= lambda Bx&lt;/P&gt;
&lt;P&gt;we'll be looking for the largest eigenvalues mu for the eigenvalue problem&lt;/P&gt;
&lt;P&gt;( A - shift B)^(-1) B x= mu x&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where mu = 1 / (lambda - shift) or your original eigenvalues are lambda_j = shift + 1/ mu_j. Also, it might be any shift smaller than the smallest eigenvalue provides faster convergence. It's well known that the convergence rate for the largest eigenvalues is essentially larger than for the smallest eigenvalues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Transform the initial problem for finding the smallest eigenvalues to the problem of finding eigenvalues within a given interval. That means you must set an interval containing the smallest eigenvalues and use setting pm[2] = 2 for mkl_sparse_d_gv. In this case, the subspace iteration technique based on the FEAST algorithm will be used instead of the Krylov_Shur algorithm. However, it's better to call dfeast_scsrgv directly (mkl_sparse_d_gv calls dfeast_scsrgv for the case pm[2] = 2) since direct call to dfeast_scsrgv provides more options and it's more flexible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At last, we suggest you try the recommendations and let us know if you need any other information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Varsha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 12:45:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1493999#M34650</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-06-08T12:45:32Z</dc:date>
    </item>
    <item>
      <title>Re:Slow eigen value decomposition using mkl_sparse_d_gv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1496148#M34666</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We assume that your query is resolved. If you have any other queries, please start a new thread.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a good day!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Jun 2023 14:30:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Slow-eigen-value-decomposition-using-mkl-sparse-d-gv/m-p/1496148#M34666</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-06-15T14:30:57Z</dc:date>
    </item>
  </channel>
</rss>

