<?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 ERROR WITH ZGELSS PARA METERS  in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/ERROR-WITH-ZGELSS-PARA-METERS/m-p/769684#M518</link>
    <description>Hi &lt;BR /&gt;I ma trying following code on Mac Ox 10.6 using MKL 10.3 and C++ composer Xe update 5&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;&lt;BR /&gt;/* Complex datatype */&lt;BR /&gt;struct _dcomplex { double re, im; };&lt;BR /&gt;typedef struct _dcomplex dcomplex;&lt;BR /&gt;&lt;BR /&gt;/* ZGELSS prototype */&lt;BR /&gt;extern "C" { // LAPACK routines&lt;BR /&gt; void zgelss_(int*m, int* n, int* nrhs, dcomplex* a, int* lda, dcomplex* b, int* ldb, double* s, double* rcond, int* rank, dcomplex* work, int* lwork, double* rwork, int* info );}&lt;BR /&gt;/* Auxiliary routines prototypes */&lt;BR /&gt;extern void print_matrix( char* desc, int m, int n, dcomplex* a, int lda );&lt;BR /&gt;extern void print_double_vector( char* desc, int n, double* a );&lt;BR /&gt;&lt;BR /&gt;/* Parameters */&lt;BR /&gt;#define N 4&lt;BR /&gt;#define NRHS 2&lt;BR /&gt;#define LDA N&lt;BR /&gt;#define LDB N&lt;BR /&gt;&lt;BR /&gt;/* Main program */&lt;BR /&gt;int main() {&lt;BR /&gt; /* Locals */&lt;BR /&gt; int m = N, n = N, nrhs = NRHS, lda = LDA, ldb = 4, info, lwork = -1, rank;&lt;BR /&gt; double rcond = 0, rwork[20];&lt;BR /&gt; /* Local arrays */&lt;BR /&gt; double s[4];&lt;BR /&gt; dcomplex work[264];&lt;BR /&gt; dcomplex a[LDA*N] = {&lt;BR /&gt;  { 1.23, -5.50}, {-2.14, -1.12}, {-4.30, -7.10}, { 1.27, 7.29},&lt;BR /&gt;  { 7.91, -5.38}, {-9.92, -0.79}, {-6.47, 2.52}, { 8.90, 6.92},&lt;BR /&gt;  {-9.80, -4.86}, {-9.18, -1.12}, {-6.51, -2.67}, {-8.82, 1.25},&lt;BR /&gt;  {-7.32, 7.57}, { 1.37, 0.43}, {-5.86, 7.38}, { 5.41, 5.37}&lt;BR /&gt; };&lt;BR /&gt; dcomplex b[LDB*NRHS] = {&lt;BR /&gt;  { 8.33, -7.32}, {-6.18, -4.80}, {-5.71, -2.80}, {-1.60, 3.08},&lt;BR /&gt;  {-6.11, -3.81}, { 0.14, -7.71}, { 1.41, 3.40}, { 8.54, -4.05}&lt;BR /&gt; };&lt;BR /&gt; /* Executable statements */&lt;BR /&gt; printf( " ZGELSS Example Program Results\\n" );&lt;BR /&gt; /* Solve the equations A*X = B */&lt;BR /&gt;&lt;BR /&gt; zgelss_( &amp;amp;m, &amp;amp;n, &amp;amp;nrhs, a, &amp;amp;lda, b, &amp;amp;ldb, s, &amp;amp;rcond, &amp;amp;rank, work, &amp;amp;lwork, rwork, &amp;amp;info );&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; /* Check for the exact singularity */&lt;BR /&gt; if( info != 0 ) {&lt;BR /&gt;  printf( "The diagonal element of the triangular factor of A,\\n" );&lt;BR /&gt;  printf( "U(%i,%i) is zero, so that A is singular;\\n", info, info );&lt;BR /&gt;  printf( "the solution could not be computed.\\n" );&lt;BR /&gt;  exit( 1 );&lt;BR /&gt; }&lt;BR /&gt; /* Print solution */&lt;BR /&gt; print_matrix( "Solution", n, nrhs, b, ldb );&lt;BR /&gt; /* Print details of sv decomposition */&lt;BR /&gt; print_matrix( "Details of LU factorization", n, n, a, lda );&lt;BR /&gt; /* Print singular values */&lt;BR /&gt; print_double_vector( "Pivot indices", n, s );&lt;BR /&gt; &lt;BR /&gt; cout &amp;lt;&amp;lt; "work = " &amp;lt;&lt;WORK&gt;&lt;/WORK&gt; exit( 0 );&lt;BR /&gt;} /* End of ZGESV Example */&lt;BR /&gt;&lt;BR /&gt;/* Auxiliary routine: printing a matrix */&lt;BR /&gt;void print_matrix( char* desc, int m, int n, dcomplex* a, int lda ) {&lt;BR /&gt; int i, j;&lt;BR /&gt; printf( "\\n %s\\n", desc );&lt;BR /&gt; for( i = 0; i &amp;lt; m; i++ ) {&lt;BR /&gt;  for( j = 0; j &amp;lt; n; j++ )&lt;BR /&gt;   printf( " (%6.2f,%6.2f)", a[i+j*lda].re, a[i+j*lda].im );&lt;BR /&gt;  printf( "\\n" );&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/* Auxiliary routine: printing a vector of integers */&lt;BR /&gt;void print_double_vector( char* desc, int n, double* a ) {&lt;BR /&gt; int j;&lt;BR /&gt; printf( "\\n %s\\n", desc );&lt;BR /&gt; for( j = 0; j &amp;lt; n; j++ ) printf( " %6.2f", a&lt;J&gt; );&lt;BR /&gt; printf( "\\n" );&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;compiler statement&lt;BR /&gt;&lt;BR /&gt;icpc main.cpp -o result_t -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread -DMKL_ILP64&lt;BR /&gt;&lt;BR /&gt;but this is giving error for para meter 7 i.e. LDB&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;&lt;BR /&gt;MKL ERROR: Parameter 7 was incorrect on entry to ZGELSS&lt;BR /&gt;The diagonal element of the triangular factor of A,&lt;BR /&gt;U(-7,-7) is zero, so that A is singular;&lt;BR /&gt;the solution could not be computed.&lt;BR /&gt;&lt;BR /&gt;Although the code gives perfect result when used with GCC and Lapack provided by Apple&lt;BR /&gt;&lt;BR /&gt;please help:&lt;BR /&gt;&lt;/J&gt;&lt;/IOSTREAM&gt;&lt;/STDIO.H&gt;&lt;/STDLIB.H&gt;</description>
    <pubDate>Wed, 17 Aug 2011 05:56:03 GMT</pubDate>
    <dc:creator>Sunny_Beast</dc:creator>
    <dc:date>2011-08-17T05:56:03Z</dc:date>
    <item>
      <title>ERROR WITH ZGELSS PARA METERS</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/ERROR-WITH-ZGELSS-PARA-METERS/m-p/769684#M518</link>
      <description>Hi &lt;BR /&gt;I ma trying following code on Mac Ox 10.6 using MKL 10.3 and C++ composer Xe update 5&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;&lt;BR /&gt;/* Complex datatype */&lt;BR /&gt;struct _dcomplex { double re, im; };&lt;BR /&gt;typedef struct _dcomplex dcomplex;&lt;BR /&gt;&lt;BR /&gt;/* ZGELSS prototype */&lt;BR /&gt;extern "C" { // LAPACK routines&lt;BR /&gt; void zgelss_(int*m, int* n, int* nrhs, dcomplex* a, int* lda, dcomplex* b, int* ldb, double* s, double* rcond, int* rank, dcomplex* work, int* lwork, double* rwork, int* info );}&lt;BR /&gt;/* Auxiliary routines prototypes */&lt;BR /&gt;extern void print_matrix( char* desc, int m, int n, dcomplex* a, int lda );&lt;BR /&gt;extern void print_double_vector( char* desc, int n, double* a );&lt;BR /&gt;&lt;BR /&gt;/* Parameters */&lt;BR /&gt;#define N 4&lt;BR /&gt;#define NRHS 2&lt;BR /&gt;#define LDA N&lt;BR /&gt;#define LDB N&lt;BR /&gt;&lt;BR /&gt;/* Main program */&lt;BR /&gt;int main() {&lt;BR /&gt; /* Locals */&lt;BR /&gt; int m = N, n = N, nrhs = NRHS, lda = LDA, ldb = 4, info, lwork = -1, rank;&lt;BR /&gt; double rcond = 0, rwork[20];&lt;BR /&gt; /* Local arrays */&lt;BR /&gt; double s[4];&lt;BR /&gt; dcomplex work[264];&lt;BR /&gt; dcomplex a[LDA*N] = {&lt;BR /&gt;  { 1.23, -5.50}, {-2.14, -1.12}, {-4.30, -7.10}, { 1.27, 7.29},&lt;BR /&gt;  { 7.91, -5.38}, {-9.92, -0.79}, {-6.47, 2.52}, { 8.90, 6.92},&lt;BR /&gt;  {-9.80, -4.86}, {-9.18, -1.12}, {-6.51, -2.67}, {-8.82, 1.25},&lt;BR /&gt;  {-7.32, 7.57}, { 1.37, 0.43}, {-5.86, 7.38}, { 5.41, 5.37}&lt;BR /&gt; };&lt;BR /&gt; dcomplex b[LDB*NRHS] = {&lt;BR /&gt;  { 8.33, -7.32}, {-6.18, -4.80}, {-5.71, -2.80}, {-1.60, 3.08},&lt;BR /&gt;  {-6.11, -3.81}, { 0.14, -7.71}, { 1.41, 3.40}, { 8.54, -4.05}&lt;BR /&gt; };&lt;BR /&gt; /* Executable statements */&lt;BR /&gt; printf( " ZGELSS Example Program Results\\n" );&lt;BR /&gt; /* Solve the equations A*X = B */&lt;BR /&gt;&lt;BR /&gt; zgelss_( &amp;amp;m, &amp;amp;n, &amp;amp;nrhs, a, &amp;amp;lda, b, &amp;amp;ldb, s, &amp;amp;rcond, &amp;amp;rank, work, &amp;amp;lwork, rwork, &amp;amp;info );&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; /* Check for the exact singularity */&lt;BR /&gt; if( info != 0 ) {&lt;BR /&gt;  printf( "The diagonal element of the triangular factor of A,\\n" );&lt;BR /&gt;  printf( "U(%i,%i) is zero, so that A is singular;\\n", info, info );&lt;BR /&gt;  printf( "the solution could not be computed.\\n" );&lt;BR /&gt;  exit( 1 );&lt;BR /&gt; }&lt;BR /&gt; /* Print solution */&lt;BR /&gt; print_matrix( "Solution", n, nrhs, b, ldb );&lt;BR /&gt; /* Print details of sv decomposition */&lt;BR /&gt; print_matrix( "Details of LU factorization", n, n, a, lda );&lt;BR /&gt; /* Print singular values */&lt;BR /&gt; print_double_vector( "Pivot indices", n, s );&lt;BR /&gt; &lt;BR /&gt; cout &amp;lt;&amp;lt; "work = " &amp;lt;&lt;WORK&gt;&lt;/WORK&gt; exit( 0 );&lt;BR /&gt;} /* End of ZGESV Example */&lt;BR /&gt;&lt;BR /&gt;/* Auxiliary routine: printing a matrix */&lt;BR /&gt;void print_matrix( char* desc, int m, int n, dcomplex* a, int lda ) {&lt;BR /&gt; int i, j;&lt;BR /&gt; printf( "\\n %s\\n", desc );&lt;BR /&gt; for( i = 0; i &amp;lt; m; i++ ) {&lt;BR /&gt;  for( j = 0; j &amp;lt; n; j++ )&lt;BR /&gt;   printf( " (%6.2f,%6.2f)", a[i+j*lda].re, a[i+j*lda].im );&lt;BR /&gt;  printf( "\\n" );&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/* Auxiliary routine: printing a vector of integers */&lt;BR /&gt;void print_double_vector( char* desc, int n, double* a ) {&lt;BR /&gt; int j;&lt;BR /&gt; printf( "\\n %s\\n", desc );&lt;BR /&gt; for( j = 0; j &amp;lt; n; j++ ) printf( " %6.2f", a&lt;J&gt; );&lt;BR /&gt; printf( "\\n" );&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;compiler statement&lt;BR /&gt;&lt;BR /&gt;icpc main.cpp -o result_t -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread -DMKL_ILP64&lt;BR /&gt;&lt;BR /&gt;but this is giving error for para meter 7 i.e. LDB&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;&lt;BR /&gt;MKL ERROR: Parameter 7 was incorrect on entry to ZGELSS&lt;BR /&gt;The diagonal element of the triangular factor of A,&lt;BR /&gt;U(-7,-7) is zero, so that A is singular;&lt;BR /&gt;the solution could not be computed.&lt;BR /&gt;&lt;BR /&gt;Although the code gives perfect result when used with GCC and Lapack provided by Apple&lt;BR /&gt;&lt;BR /&gt;please help:&lt;BR /&gt;&lt;/J&gt;&lt;/IOSTREAM&gt;&lt;/STDIO.H&gt;&lt;/STDLIB.H&gt;</description>
      <pubDate>Wed, 17 Aug 2011 05:56:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/ERROR-WITH-ZGELSS-PARA-METERS/m-p/769684#M518</guid>
      <dc:creator>Sunny_Beast</dc:creator>
      <dc:date>2011-08-17T05:56:03Z</dc:date>
    </item>
    <item>
      <title>ERROR WITH ZGELSS PARA METERS</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/ERROR-WITH-ZGELSS-PARA-METERS/m-p/769685#M519</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Your program doesn't use mkl.h (and MKL_INT type) using &lt;STRONG&gt;LP64&lt;/STRONG&gt;-model for m, n, lda, .... for &lt;STRONG&gt;zgelss&lt;BR /&gt;&lt;/STRONG&gt;&lt;EM&gt;void zgelss_(int*m, int* n, int* nrhs, dcomplex* a, int* lda, ....&lt;/EM&gt;&lt;BR /&gt;but linked with &lt;STRONG&gt;ILP64&lt;/STRONG&gt; MKL interface.&lt;BR /&gt;Please try &lt;STRONG&gt;-lmkl_intel_lp64 &lt;/STRONG&gt;instead of &lt;EM&gt;-lmkl_intel_ilp64.&lt;BR /&gt;&lt;/EM&gt;</description>
      <pubDate>Wed, 17 Aug 2011 06:37:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/ERROR-WITH-ZGELSS-PARA-METERS/m-p/769685#M519</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2011-08-17T06:37:26Z</dc:date>
    </item>
    <item>
      <title>ERROR WITH ZGELSS PARA METERS</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/ERROR-WITH-ZGELSS-PARA-METERS/m-p/769686#M520</link>
      <description>Thanks alot Victor</description>
      <pubDate>Wed, 17 Aug 2011 06:47:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/ERROR-WITH-ZGELSS-PARA-METERS/m-p/769686#M520</guid>
      <dc:creator>Sunny_Beast</dc:creator>
      <dc:date>2011-08-17T06:47:11Z</dc:date>
    </item>
  </channel>
</rss>

