<?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: pdgetrf in mixed language in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864139#M7725</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/444537"&gt;phaser75&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Thank you for replying but it still doesn't work. Error message is same.
&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;check &lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=65786"&gt;this thread&lt;/A&gt;. You have double indexed matrices here.&lt;BR /&gt;&lt;BR /&gt;for statically allocated matrices example of using LAPACK &lt;A href="http://www.physics.utah.edu/~detar/phys6720/handouts/lapack.html"&gt;is here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;</description>
    <pubDate>Fri, 25 Sep 2009 02:28:48 GMT</pubDate>
    <dc:creator>ArturGuzik</dc:creator>
    <dc:date>2009-09-25T02:28:48Z</dc:date>
    <item>
      <title>pdgetrf in mixed language</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864134#M7720</link>
      <description>I exercise LAPACK in c language. I want to factorize a matrix(2X2) but it doesn't work.
&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;I don't have any idea what is the problem.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;The simple code is like this. The error message says there is a problem in 4th parameter(lda).&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;MATH.H&gt;&lt;BR /&gt;#include "mkl.h"&lt;BR /&gt;&lt;BR /&gt;#define NRANSI&lt;BR /&gt;#include "NRUTIL.h"&lt;BR /&gt;&lt;BR /&gt;#define PI (3.141592653589793)&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char* argv[])&lt;BR /&gt;{&lt;BR /&gt; int m, n, lda, info;&lt;BR /&gt; double **A, d;&lt;BR /&gt; int *ipiv;&lt;BR /&gt; &lt;BR /&gt; A = dmatrix(1,2,1,2);&lt;BR /&gt; ipiv = ivector(1,2);&lt;BR /&gt;&lt;BR /&gt; m = 2;&lt;BR /&gt; n = 2;&lt;BR /&gt; lda = 2;&lt;BR /&gt; A[1][1] = 4.0;&lt;BR /&gt; A[1][2] = 1.0;&lt;BR /&gt; A[2][1] = 3.0;&lt;BR /&gt; A[2][2] = -1.0;&lt;BR /&gt;&lt;BR /&gt; printf("This is TEST!!!\n");&lt;BR /&gt; &lt;BR /&gt; dgetrf(&amp;amp;m, &amp;amp;n, &amp;amp;A[1][1], &amp;amp;lda, &amp;amp;ipiv[1], &amp;amp;info);&lt;BR /&gt; printf("info = %d\n",info);&lt;BR /&gt;&lt;BR /&gt; free_dmatrix(A,1,2,1,2);&lt;BR /&gt; free_ivector(ipiv,1,2);&lt;BR /&gt;&lt;BR /&gt; return 1;&lt;BR /&gt;}&lt;BR /&gt;&lt;/MATH.H&gt;&lt;/STDIO.H&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Sep 2009 09:20:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864134#M7720</guid>
      <dc:creator>phaser75</dc:creator>
      <dc:date>2009-09-24T09:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: pdgetrf in mixed language</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864135#M7721</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/444537"&gt;phaser75&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;I exercise LAPACK in c language. I want to factorize a matrix(2X2) but it doesn't work.
&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;I don't have any idea what is the problem.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;The simple code is like this. The error message says there is a problem in 4th parameter(lda).&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;MATH.H&gt;&lt;BR /&gt;#include "mkl.h"&lt;BR /&gt;&lt;BR /&gt;#define NRANSI&lt;BR /&gt;#include "NRUTIL.h"&lt;BR /&gt;&lt;BR /&gt;#define PI (3.141592653589793)&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char* argv[])&lt;BR /&gt;{&lt;BR /&gt;int m, n, lda, info;&lt;BR /&gt;double **A, d;&lt;BR /&gt;int *ipiv;&lt;BR /&gt;&lt;BR /&gt;A = dmatrix(1,2,1,2);&lt;BR /&gt;ipiv = ivector(1,2);&lt;BR /&gt;&lt;BR /&gt;m = 2;&lt;BR /&gt;n = 2;&lt;BR /&gt;lda = 2;&lt;BR /&gt;A[1][1] = 4.0;&lt;BR /&gt;A[1][2] = 1.0;&lt;BR /&gt;A[2][1] = 3.0;&lt;BR /&gt;A[2][2] = -1.0;&lt;BR /&gt;&lt;BR /&gt;printf("This is TEST!!!n");&lt;BR /&gt;&lt;BR /&gt;dgetrf(&amp;amp;m, &amp;amp;n, &amp;amp;A[1][1], &amp;amp;lda, &amp;amp;ipiv[1], &amp;amp;info);&lt;BR /&gt;printf("info = %dn",info);&lt;BR /&gt;&lt;BR /&gt;free_dmatrix(A,1,2,1,2);&lt;BR /&gt;free_ivector(ipiv,1,2);&lt;BR /&gt;&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;BR /&gt;&lt;/MATH.H&gt;&lt;/STDIO.H&gt;&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;please try in that way:&lt;BR /&gt;&lt;BR /&gt;A[0][0] = 4.0;&lt;BR /&gt;A[0][1] = 1.0;&lt;BR /&gt;A[1][0] = 3.0;&lt;BR /&gt;A[1][1] = -1.0;&lt;BR /&gt;&lt;BR /&gt;dgetrf(&amp;amp;m, &amp;amp;n, &amp;amp;A[0][0], &amp;amp;lda, &amp;amp;ipiv[1], &amp;amp;info);&lt;BR /&gt;&lt;BR /&gt;it should work.&lt;BR /&gt;&lt;BR /&gt;--Gennady</description>
      <pubDate>Thu, 24 Sep 2009 10:44:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864135#M7721</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2009-09-24T10:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: pdgetrf in mixed language</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864136#M7722</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/444537"&gt;phaser75&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;I still have the error.&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;The message is "MKL ERROR : Parameter 4 was incorrect on entry to DGETRF&lt;BR /&gt;info = -4".&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Sep 2009 10:54:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864136#M7722</guid>
      <dc:creator>phaser75</dc:creator>
      <dc:date>2009-09-24T10:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: pdgetrf in mixed language</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864137#M7723</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/334681"&gt;Gennady Fedorov (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/444537"&gt;phaser75&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;I exercise LAPACK in c language. I want to factorize a matrix(2X2) but it doesn't work.
&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;I don't have any idea what is the problem.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;The simple code is like this. The error message says there is a problem in 4th parameter(lda).&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;MATH.H&gt;&lt;BR /&gt;#include "mkl.h"&lt;BR /&gt;&lt;BR /&gt;#define NRANSI&lt;BR /&gt;#include "NRUTIL.h"&lt;BR /&gt;&lt;BR /&gt;#define PI (3.141592653589793)&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char* argv[])&lt;BR /&gt;{&lt;BR /&gt;int m, n, lda, info;&lt;BR /&gt;double **A, d;&lt;BR /&gt;int *ipiv;&lt;BR /&gt;&lt;BR /&gt;A = dmatrix(1,2,1,2);&lt;BR /&gt;ipiv = ivector(1,2);&lt;BR /&gt;&lt;BR /&gt;m = 2;&lt;BR /&gt;n = 2;&lt;BR /&gt;lda = 2;&lt;BR /&gt;A[1][1] = 4.0;&lt;BR /&gt;A[1][2] = 1.0;&lt;BR /&gt;A[2][1] = 3.0;&lt;BR /&gt;A[2][2] = -1.0;&lt;BR /&gt;&lt;BR /&gt;printf("This is TEST!!!n");&lt;BR /&gt;&lt;BR /&gt;dgetrf(&amp;amp;m, &amp;amp;n, &amp;amp;A[1][1], &amp;amp;lda, &amp;amp;ipiv[1], &amp;amp;info);&lt;BR /&gt;printf("info = %dn",info);&lt;BR /&gt;&lt;BR /&gt;free_dmatrix(A,1,2,1,2);&lt;BR /&gt;free_ivector(ipiv,1,2);&lt;BR /&gt;&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;BR /&gt;&lt;/MATH.H&gt;&lt;/STDIO.H&gt;&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;please try in that way:&lt;BR /&gt;&lt;BR /&gt;A[0][0] = 4.0;&lt;BR /&gt;A[0][1] = 1.0;&lt;BR /&gt;A[1][0] = 3.0;&lt;BR /&gt;A[1][1] = -1.0;&lt;BR /&gt;&lt;BR /&gt;dgetrf(&amp;amp;m, &amp;amp;n, &amp;amp;A[0][0], &amp;amp;lda, &amp;amp;ipiv[1], &amp;amp;info);&lt;BR /&gt;&lt;BR /&gt;it should work.&lt;BR /&gt;&lt;BR /&gt;--Gennady&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;the same with &amp;amp;ipiv[0] not &amp;amp;ipiv[1]&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Sep 2009 10:55:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864137#M7723</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2009-09-24T10:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: pdgetrf in mixed language</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864138#M7724</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/334681"&gt;Gennady Fedorov (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;the same with &amp;amp;ipiv[0] not &amp;amp;ipiv[1]&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Thank you for replying but it still doesn't work. Error message is same.
&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Sep 2009 01:16:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864138#M7724</guid>
      <dc:creator>phaser75</dc:creator>
      <dc:date>2009-09-25T01:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: pdgetrf in mixed language</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864139#M7725</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/444537"&gt;phaser75&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Thank you for replying but it still doesn't work. Error message is same.
&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;check &lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=65786"&gt;this thread&lt;/A&gt;. You have double indexed matrices here.&lt;BR /&gt;&lt;BR /&gt;for statically allocated matrices example of using LAPACK &lt;A href="http://www.physics.utah.edu/~detar/phys6720/handouts/lapack.html"&gt;is here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Sep 2009 02:28:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864139#M7725</guid>
      <dc:creator>ArturGuzik</dc:creator>
      <dc:date>2009-09-25T02:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: pdgetrf in mixed language</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864140#M7726</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/342379"&gt;ArturGuzik&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;check &lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=65786"&gt;this thread&lt;/A&gt;. You have double indexed matrices here.&lt;BR /&gt;&lt;BR /&gt;for statically allocated matrices example of using LAPACK &lt;A href="http://www.physics.utah.edu/~detar/phys6720/handouts/lapack.html"&gt;is here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Thank you. But it is the same.
&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;I tried static allocation and one dimensional array as well. But the same error occurred.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;What's the problem?&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;phaser.&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Sep 2009 04:07:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864140#M7726</guid>
      <dc:creator>phaser75</dc:creator>
      <dc:date>2009-09-25T04:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: pdgetrf in mixed language</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864141#M7727</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/444537"&gt;phaser75&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Thank you. But it is the same.
&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;I tried static allocation and one dimensional array as well. But the same error occurred.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;What's the problem?&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;phaser.&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
OK then. This is working for me (static for simplicity).&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[cpp]//&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;#include "mkl_lapack.h"&lt;BR /&gt;#define MAX 2&lt;BR /&gt;&lt;BR /&gt;int main(){&lt;BR /&gt;   &lt;BR /&gt;  // data&lt;BR /&gt;   int n, m;&lt;BR /&gt;   int nrhs = 1;&lt;BR /&gt;   double A[MAX][MAX];&lt;BR /&gt;   double b[1][MAX];&lt;BR /&gt;   int lda = MAX;&lt;BR /&gt;   int ldb = MAX;&lt;BR /&gt;   int ipiv[MAX];&lt;BR /&gt;   int info;&lt;BR /&gt;   // Other values&lt;BR /&gt;   int i,j;&lt;BR /&gt;&lt;BR /&gt;	// dimension(s)&lt;BR /&gt;	m=2;&lt;BR /&gt;	n=2;&lt;BR /&gt;&lt;BR /&gt;	// value(s)&lt;BR /&gt;	A[0][0] = 2.0;&lt;BR /&gt;	A[0][1] = 0.0;&lt;BR /&gt;	A[1][0] = 0.0;&lt;BR /&gt;	A[1][1] = -2.0;&lt;BR /&gt;	b[0][0]=1.0;&lt;BR /&gt;	b[0][1]=2.0;&lt;BR /&gt;&lt;BR /&gt;	// factorize&lt;BR /&gt;	dgetrf(&amp;amp;m, &amp;amp;n, &amp;amp;A[0][0], &amp;amp;lda, &amp;amp;ipiv[0], &amp;amp;info);&lt;BR /&gt;	// solve&lt;BR /&gt;	dgetrs("N", &amp;amp;n, &amp;amp;nrhs, &amp;amp;A[0][0], &amp;amp;lda, &amp;amp;ipiv[0], &amp;amp;b[0][0], &amp;amp;ldb, &amp;amp;info);&lt;BR /&gt;&lt;BR /&gt;   // Check for success&lt;BR /&gt;   if(info == 0)&lt;BR /&gt;   {&lt;BR /&gt;      // Write the answer&lt;BR /&gt;      std::cout &amp;lt;&amp;lt; "The answer isn";&lt;BR /&gt;      for(i = 0; i &amp;lt; n; i++)&lt;BR /&gt;        std::cout &amp;lt;&amp;lt; "b[" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; "]t" &amp;lt;&amp;lt; b[0]&lt;I&gt; &amp;lt;&amp;lt; "n";&lt;BR /&gt;   }&lt;BR /&gt;   else&lt;BR /&gt;   {&lt;BR /&gt;      // Write an error message&lt;BR /&gt;      std::cerr &amp;lt;&amp;lt; "dgetrf returned error " &amp;lt;&amp;lt; info &amp;lt;&amp;lt; "n";&lt;BR /&gt;   }&lt;BR /&gt;&lt;BR /&gt;   return info;&lt;BR /&gt;}&lt;BR /&gt;[/cpp]&lt;/I&gt;&lt;/IOSTREAM&gt;&lt;/PRE&gt;
&lt;BR /&gt;A.&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Sep 2009 06:41:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864141#M7727</guid>
      <dc:creator>ArturGuzik</dc:creator>
      <dc:date>2009-09-25T06:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: pdgetrf in mixed language</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864142#M7728</link>
      <description>I've got the same problem with using the MKL library.&lt;DIV&gt;I've just found out that the problem lies in the parameters' data type.&lt;/DIV&gt;&lt;DIV&gt;Actually there's some incompatibility between Int32 and Int64.&lt;/DIV&gt;&lt;DIV&gt;Declared as MKL_INT, variables were interpreted as Int32 at compile time.&lt;/DIV&gt;&lt;DIV&gt;Nevertheless it was linked with the mkl_intel_ilp64, hence when I pass the address of an "int" instead of a "long int", the function might get a zero value. In this case the matrix leading. It leads to this error.&lt;/DIV&gt;&lt;DIV&gt;The problem is solved by simply changing the type of lda, m and n to long int.&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Aug 2011 22:58:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pdgetrf-in-mixed-language/m-p/864142#M7728</guid>
      <dc:creator>redleaf</dc:creator>
      <dc:date>2011-08-11T22:58:41Z</dc:date>
    </item>
  </channel>
</rss>

