<?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 Problem with  Intel MKL ILP64 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-Intel-MKL-ILP64/m-p/833455#M5832</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;ILP64 interface means that your integer parameters passed to MKL routineshave 64-bit (or 8-byte) size. So, you should replace all the integer variables/arrays in your programwith MKL_INT type instead of plain int.&lt;BR /&gt;&lt;BR /&gt;MKL_INT is declared in mkl_types.h header file and equal either to int or long long int depending on the -DMKL_ILP64 macro. So, once again:&lt;BR /&gt;1) Add #include "mkl_types.h"&lt;BR /&gt;2) Replace "int" with "MKL_INT"&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Konstantin</description>
    <pubDate>Fri, 09 Sep 2011 02:36:25 GMT</pubDate>
    <dc:creator>Konstantin_A_Intel</dc:creator>
    <dc:date>2011-09-09T02:36:25Z</dc:date>
    <item>
      <title>Problem with  Intel MKL ILP64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-Intel-MKL-ILP64/m-p/833454#M5831</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I am testing some lapack routines from MKL library on our linux cluster running Red Hat Enterprise 5.4. The Fortran code works with both LP64 and ILP64 interfaces; the C code can only work with the LP64 interface. When compiling it with the ILP64 interface, I either get a segmentation fault or an error message similar to the following:&lt;BR /&gt; &lt;BR /&gt; MKL ERROR: Parameter 4 was incorrect on entry to DGESV&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My intel compiler is version 11.1.073 and my mkl library is version 10.2.6.038. The code is taken from Intel MKL LAPACK examples. One is listed at the end.&lt;BR /&gt;&lt;BR /&gt;The command line used to compile and link the code is:&lt;BR /&gt;&lt;BR /&gt;icc dgesv.c -DMKL_ILP64 -L${MKLPATH} -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread&lt;BR /&gt;&lt;BR /&gt;Any idea what's wrong? &lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Ping&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;&lt;BR /&gt;/* DGESV prototype &lt;BR /&gt;extern void dgesv( int* n, int* nrhs, double* a, int* lda, int* ipiv,&lt;BR /&gt; double* b, int* ldb, int* info );&lt;BR /&gt;*/&lt;BR /&gt;/* Auxiliary routines prototypes */&lt;BR /&gt;extern void print_matrix( char* desc, int m, int n, double* a, int lda );&lt;BR /&gt;extern void print_int_vector( char* desc, int n, int* a );&lt;BR /&gt;&lt;BR /&gt;/* Parameters */&lt;BR /&gt;#define N 5&lt;BR /&gt;#define NRHS 3&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 n = N, nrhs = NRHS, lda = LDA, ldb = LDB, info;&lt;BR /&gt; /* Local arrays */&lt;BR /&gt; int ipiv&lt;N&gt;;&lt;BR /&gt; double a[LDA*N] = {&lt;BR /&gt; 6.80, -2.11, 5.66, 5.97, 8.23,&lt;BR /&gt; -6.05, -3.30, 5.36, -4.44, 1.08,&lt;BR /&gt; -0.45, 2.58, -2.70, 0.27, 9.04,&lt;BR /&gt; 8.32, 2.71, 4.35, -7.17, 2.14,&lt;BR /&gt; -9.67, -5.14, -7.26, 6.08, -6.87&lt;BR /&gt; };&lt;BR /&gt; double b[LDB*NRHS] = {&lt;BR /&gt; 4.02, 6.19, -8.22, -7.57, -3.03,&lt;BR /&gt; -1.56, 4.00, -8.67, 1.75, 2.86,&lt;BR /&gt; 9.81, -4.09, -4.57, -8.61, 8.99&lt;BR /&gt; };&lt;BR /&gt; /* Executable statements */&lt;BR /&gt; printf( " DGESV Example Program Results\\n" );&lt;BR /&gt; /* Solve the equations A*X = B */&lt;BR /&gt; dgesv( &amp;amp;n, &amp;amp;nrhs, a, &amp;amp;lda, ipiv, b, &amp;amp;ldb, &amp;amp;info );&lt;BR /&gt; /* Check for the exact singularity */&lt;BR /&gt;//exit(0);&lt;BR /&gt; if( info &amp;gt; 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 LU factorization */&lt;BR /&gt; print_matrix( "Details of LU factorization", n, n, a, lda );&lt;BR /&gt; /* Print pivot indices */&lt;BR /&gt; print_int_vector( "Pivot indices", n, ipiv );&lt;BR /&gt; exit( 0 );&lt;BR /&gt;} /* End of DGESV Example */&lt;BR /&gt;&lt;BR /&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;BR /&gt;&lt;BR /&gt;/* Auxiliary routine: printing a vector of integers */&lt;BR /&gt;void print_int_vector( char* desc, int n, int* 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( " %6i", a&lt;J&gt; );&lt;BR /&gt; printf( "\\n" );&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/J&gt;&lt;/N&gt;&lt;/STDIO.H&gt;&lt;/STDLIB.H&gt;</description>
      <pubDate>Thu, 08 Sep 2011 21:48:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-Intel-MKL-ILP64/m-p/833454#M5831</guid>
      <dc:creator>Ping1</dc:creator>
      <dc:date>2011-09-08T21:48:42Z</dc:date>
    </item>
    <item>
      <title>Problem with  Intel MKL ILP64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-Intel-MKL-ILP64/m-p/833455#M5832</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;ILP64 interface means that your integer parameters passed to MKL routineshave 64-bit (or 8-byte) size. So, you should replace all the integer variables/arrays in your programwith MKL_INT type instead of plain int.&lt;BR /&gt;&lt;BR /&gt;MKL_INT is declared in mkl_types.h header file and equal either to int or long long int depending on the -DMKL_ILP64 macro. So, once again:&lt;BR /&gt;1) Add #include "mkl_types.h"&lt;BR /&gt;2) Replace "int" with "MKL_INT"&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Konstantin</description>
      <pubDate>Fri, 09 Sep 2011 02:36:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-Intel-MKL-ILP64/m-p/833455#M5832</guid>
      <dc:creator>Konstantin_A_Intel</dc:creator>
      <dc:date>2011-09-09T02:36:25Z</dc:date>
    </item>
    <item>
      <title>Problem with  Intel MKL ILP64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-Intel-MKL-ILP64/m-p/833456#M5833</link>
      <description>or for this example, You can just link with LP64 interfaces.&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;in this case You don't need to change the source code but just link with LP64 libraries&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;icc dgesv.c &lt;SPAN style="text-decoration: line-through;"&gt;-DMKL_ILP64&lt;/SPAN&gt; -L${MKLPATH}&lt;SPAN style="text-decoration: line-through;"&gt; -lmkl_intel_ilp64&lt;/SPAN&gt; -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Sep 2011 05:05:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-Intel-MKL-ILP64/m-p/833456#M5833</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2011-09-09T05:05:26Z</dc:date>
    </item>
  </channel>
</rss>

