<?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 dgesvd under gcc in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgesvd-under-gcc/m-p/1634917#M36502</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I downloaded the following file&lt;/P&gt;&lt;P&gt;and I compiled as follow&lt;/P&gt;&lt;P&gt;gcc example_svd.c -m64 -Wl,--start-group ${MKLROOT}/lib/libmkl_intel_ilp64.a ${MKLROOT}/lib/libmkl_gnu_thread.a ${MKLROOT}/lib/libmkl_core.a -Wl,--end-group -lgomp -lpthread -lm -ldl&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;running, I get&lt;/P&gt;&lt;P&gt;DGESVD Example Program Results&lt;/P&gt;&lt;P&gt;Intel oneMKL ERROR: Parameter 6 was incorrect on entry to DGESVD.&lt;/P&gt;&lt;P&gt;Intel oneMKL ERROR: Parameter 6 was incorrect on entry to DGESVD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you clarify the point ? It seems to be an issue fortran/c&lt;/P&gt;&lt;P&gt;---------------------------------------------------------&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/P&gt;&lt;P&gt;/* DGESVD prototype */&lt;BR /&gt;extern void dgesvd( char* jobu, char* jobvt, int* m, int* n, double* a,&lt;BR /&gt;int* lda, double* s, double* u, int* ldu, double* vt, int* ldvt,&lt;BR /&gt;double* work, int* lwork, int* info );&lt;BR /&gt;/* Auxiliary routines prototypes */&lt;BR /&gt;extern void print_matrix( char* desc, int m, int n, double* a, int lda );&lt;/P&gt;&lt;P&gt;/* Parameters */&lt;BR /&gt;#define M 6&lt;BR /&gt;#define N 5&lt;BR /&gt;#define LDA M&lt;BR /&gt;#define LDU M&lt;BR /&gt;#define LDVT N&lt;/P&gt;&lt;P&gt;/* Main program */&lt;BR /&gt;int main() {&lt;BR /&gt;/* Locals */&lt;BR /&gt;int m = M, n = N, lda = LDA, ldu = LDU, ldvt = LDVT, info, lwork;&lt;BR /&gt;double wkopt;&lt;BR /&gt;double* work;&lt;BR /&gt;/* Local arrays */&lt;BR /&gt;double s[N], u[LDU*M], vt[LDVT*N];&lt;BR /&gt;double a[LDA*N] = {&lt;BR /&gt;8.79, 6.11, -9.15, 9.57, -3.49, 9.84,&lt;BR /&gt;9.93, 6.91, -7.93, 1.64, 4.02, 0.15,&lt;BR /&gt;9.83, 5.04, 4.86, 8.83, 9.80, -8.99,&lt;BR /&gt;5.45, -0.27, 4.85, 0.74, 10.00, -6.02,&lt;BR /&gt;3.16, 7.98, 3.01, 5.80, 4.27, -5.31&lt;BR /&gt;};&lt;BR /&gt;/* Executable statements */&lt;BR /&gt;printf( " DGESVD Example Program Results\n" );&lt;BR /&gt;/* Query and allocate the optimal workspace */&lt;BR /&gt;lwork = -1;&lt;BR /&gt;dgesvd( "All", "All", &amp;amp;m, &amp;amp;n, a, &amp;amp;lda, s, u, &amp;amp;ldu, vt, &amp;amp;ldvt, &amp;amp;wkopt, &amp;amp;lwork,&lt;BR /&gt;&amp;amp;info );&lt;BR /&gt;lwork = (int)wkopt;&lt;BR /&gt;work = (double*)malloc( lwork*sizeof(double) );&lt;BR /&gt;/* Compute SVD */&lt;BR /&gt;dgesvd( "All", "All", &amp;amp;m, &amp;amp;n, a, &amp;amp;lda, s, u, &amp;amp;ldu, vt, &amp;amp;ldvt, work, &amp;amp;lwork,&lt;BR /&gt;&amp;amp;info );&lt;BR /&gt;/* Check for convergence */&lt;BR /&gt;if( info &amp;gt; 0 ) {&lt;BR /&gt;printf( "The algorithm computing SVD failed to converge.\n" );&lt;BR /&gt;exit( 1 );&lt;BR /&gt;}&lt;BR /&gt;/* Print singular values */&lt;BR /&gt;print_matrix( "Singular values", 1, n, s, 1 );&lt;BR /&gt;/* Print left singular vectors */&lt;BR /&gt;print_matrix( "Left singular vectors (stored columnwise)", m, n, u, ldu );&lt;BR /&gt;/* Print right singular vectors */&lt;BR /&gt;print_matrix( "Right singular vectors (stored rowwise)", n, n, vt, ldvt );&lt;BR /&gt;/* Free workspace */&lt;BR /&gt;free( (void*)work );&lt;BR /&gt;exit( 0 );&lt;BR /&gt;} /* End of DGESVD Example */&lt;/P&gt;&lt;P&gt;/* Auxiliary routine: printing a matrix */&lt;BR /&gt;void print_matrix( char* desc, int m, int n, double* 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++ ) printf( " %6.2f", a[i+j*lda] );&lt;BR /&gt;printf( "\n" );&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2024 10:29:25 GMT</pubDate>
    <dc:creator>Patrick38</dc:creator>
    <dc:date>2024-10-03T10:29:25Z</dc:date>
    <item>
      <title>dgesvd under gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgesvd-under-gcc/m-p/1634917#M36502</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I downloaded the following file&lt;/P&gt;&lt;P&gt;and I compiled as follow&lt;/P&gt;&lt;P&gt;gcc example_svd.c -m64 -Wl,--start-group ${MKLROOT}/lib/libmkl_intel_ilp64.a ${MKLROOT}/lib/libmkl_gnu_thread.a ${MKLROOT}/lib/libmkl_core.a -Wl,--end-group -lgomp -lpthread -lm -ldl&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;running, I get&lt;/P&gt;&lt;P&gt;DGESVD Example Program Results&lt;/P&gt;&lt;P&gt;Intel oneMKL ERROR: Parameter 6 was incorrect on entry to DGESVD.&lt;/P&gt;&lt;P&gt;Intel oneMKL ERROR: Parameter 6 was incorrect on entry to DGESVD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you clarify the point ? It seems to be an issue fortran/c&lt;/P&gt;&lt;P&gt;---------------------------------------------------------&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/P&gt;&lt;P&gt;/* DGESVD prototype */&lt;BR /&gt;extern void dgesvd( char* jobu, char* jobvt, int* m, int* n, double* a,&lt;BR /&gt;int* lda, double* s, double* u, int* ldu, double* vt, int* ldvt,&lt;BR /&gt;double* work, int* lwork, int* info );&lt;BR /&gt;/* Auxiliary routines prototypes */&lt;BR /&gt;extern void print_matrix( char* desc, int m, int n, double* a, int lda );&lt;/P&gt;&lt;P&gt;/* Parameters */&lt;BR /&gt;#define M 6&lt;BR /&gt;#define N 5&lt;BR /&gt;#define LDA M&lt;BR /&gt;#define LDU M&lt;BR /&gt;#define LDVT N&lt;/P&gt;&lt;P&gt;/* Main program */&lt;BR /&gt;int main() {&lt;BR /&gt;/* Locals */&lt;BR /&gt;int m = M, n = N, lda = LDA, ldu = LDU, ldvt = LDVT, info, lwork;&lt;BR /&gt;double wkopt;&lt;BR /&gt;double* work;&lt;BR /&gt;/* Local arrays */&lt;BR /&gt;double s[N], u[LDU*M], vt[LDVT*N];&lt;BR /&gt;double a[LDA*N] = {&lt;BR /&gt;8.79, 6.11, -9.15, 9.57, -3.49, 9.84,&lt;BR /&gt;9.93, 6.91, -7.93, 1.64, 4.02, 0.15,&lt;BR /&gt;9.83, 5.04, 4.86, 8.83, 9.80, -8.99,&lt;BR /&gt;5.45, -0.27, 4.85, 0.74, 10.00, -6.02,&lt;BR /&gt;3.16, 7.98, 3.01, 5.80, 4.27, -5.31&lt;BR /&gt;};&lt;BR /&gt;/* Executable statements */&lt;BR /&gt;printf( " DGESVD Example Program Results\n" );&lt;BR /&gt;/* Query and allocate the optimal workspace */&lt;BR /&gt;lwork = -1;&lt;BR /&gt;dgesvd( "All", "All", &amp;amp;m, &amp;amp;n, a, &amp;amp;lda, s, u, &amp;amp;ldu, vt, &amp;amp;ldvt, &amp;amp;wkopt, &amp;amp;lwork,&lt;BR /&gt;&amp;amp;info );&lt;BR /&gt;lwork = (int)wkopt;&lt;BR /&gt;work = (double*)malloc( lwork*sizeof(double) );&lt;BR /&gt;/* Compute SVD */&lt;BR /&gt;dgesvd( "All", "All", &amp;amp;m, &amp;amp;n, a, &amp;amp;lda, s, u, &amp;amp;ldu, vt, &amp;amp;ldvt, work, &amp;amp;lwork,&lt;BR /&gt;&amp;amp;info );&lt;BR /&gt;/* Check for convergence */&lt;BR /&gt;if( info &amp;gt; 0 ) {&lt;BR /&gt;printf( "The algorithm computing SVD failed to converge.\n" );&lt;BR /&gt;exit( 1 );&lt;BR /&gt;}&lt;BR /&gt;/* Print singular values */&lt;BR /&gt;print_matrix( "Singular values", 1, n, s, 1 );&lt;BR /&gt;/* Print left singular vectors */&lt;BR /&gt;print_matrix( "Left singular vectors (stored columnwise)", m, n, u, ldu );&lt;BR /&gt;/* Print right singular vectors */&lt;BR /&gt;print_matrix( "Right singular vectors (stored rowwise)", n, n, vt, ldvt );&lt;BR /&gt;/* Free workspace */&lt;BR /&gt;free( (void*)work );&lt;BR /&gt;exit( 0 );&lt;BR /&gt;} /* End of DGESVD Example */&lt;/P&gt;&lt;P&gt;/* Auxiliary routine: printing a matrix */&lt;BR /&gt;void print_matrix( char* desc, int m, int n, double* 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++ ) printf( " %6.2f", a[i+j*lda] );&lt;BR /&gt;printf( "\n" );&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 10:29:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgesvd-under-gcc/m-p/1634917#M36502</guid>
      <dc:creator>Patrick38</dc:creator>
      <dc:date>2024-10-03T10:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: dgesvd under gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgesvd-under-gcc/m-p/1637486#M36539</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/137604"&gt;@Patrick38&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Using compiler options from the documentation page&amp;nbsp; "&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/code-samples-lapack/2022-1/compiling-and-building-c-examples.html" target="_self"&gt;Compiling and Building C Examples&lt;/A&gt;", I built example as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;gcc -fopenmp -m64 -I${MKLROOT}/include dgesvd.c -Wl,--no-as-needed -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -lpthread -lm -ldl&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and running example produces&lt;/P&gt;
&lt;P&gt;./a.out&lt;BR /&gt;DGESVD Example Program Results&lt;/P&gt;
&lt;P&gt;Singular values&lt;BR /&gt;27.47 22.64 8.56 5.99 2.01&lt;/P&gt;
&lt;P&gt;Left singular vectors (stored columnwise)&lt;BR /&gt;-0.59 0.26 0.36 0.31 0.23&lt;BR /&gt;-0.40 0.24 -0.22 -0.75 -0.36&lt;BR /&gt;-0.03 -0.60 -0.45 0.23 -0.31&lt;BR /&gt;-0.43 0.24 -0.69 0.33 0.16&lt;BR /&gt;-0.47 -0.35 0.39 0.16 -0.52&lt;BR /&gt;0.29 0.58 -0.02 0.38 -0.65&lt;/P&gt;
&lt;P&gt;Right singular vectors (stored rowwise)&lt;BR /&gt;-0.25 -0.40 -0.69 -0.37 -0.41&lt;BR /&gt;0.81 0.36 -0.25 -0.37 -0.10&lt;BR /&gt;-0.26 0.70 -0.22 0.39 -0.49&lt;BR /&gt;0.40 -0.45 0.25 0.43 -0.62&lt;BR /&gt;-0.22 0.14 0.59 -0.63 -0.44&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this experiment was done with&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;gcc --version&lt;BR /&gt;gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;echo $MKLROOT&lt;BR /&gt;/opt/intel/oneapi/mkl/2024.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 02:02:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgesvd-under-gcc/m-p/1637486#M36539</guid>
      <dc:creator>Mark_L_Intel</dc:creator>
      <dc:date>2024-10-16T02:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: dgesvd under gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgesvd-under-gcc/m-p/1640310#M36585</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/137604"&gt;@Patrick38&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Have you tried the the options outlined in my previous post?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 19:17:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgesvd-under-gcc/m-p/1640310#M36585</guid>
      <dc:creator>Mark_L_Intel</dc:creator>
      <dc:date>2024-10-30T19:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: dgesvd under gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgesvd-under-gcc/m-p/1641854#M36612</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/137604"&gt;@Patrick38&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;With no response from you, the support will be limited to community support.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 19:13:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgesvd-under-gcc/m-p/1641854#M36612</guid>
      <dc:creator>Mark_L_Intel</dc:creator>
      <dc:date>2024-11-07T19:13:31Z</dc:date>
    </item>
  </channel>
</rss>

