<?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 mkl lapack zgesdd example in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819795#M4622</link>
    <description>&lt;DIV id="tiny_quote"&gt;
                &lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=551526" class="basic" href="https://community.intel.com/en-us/profile/551526/"&gt;jangerrit&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;I&gt;&lt;BR /&gt;g++ -c -m64 -pipe -O2 -D_REENTRANT -Wall -W -I/usr/include -I. -I. -o main.o main.cpp&lt;BR /&gt;&lt;BR /&gt;g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-O1 -o zgesdd main.o -lpthread -llapack &lt;BR /&gt;&lt;BR /&gt;but i forced the usage of the mkl lapack with ld_preload.. i don't know if this linking can be responsibe for this..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;Here you appear to be linking against the (non-threaded) lapack and blas for gfortran which come with your OS. There isn't a separate lapack library in recent MKL versions, so it's not clear whether your LD_PRELOAD had any effect.&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu 
-Wl,-O1 -o sizeOftest main.o -LPATH_TO_matlab/bin/glnxa64/ -lmkl 
-LPATH_TO_matlab/sys/os/glnxa64/ -liomp5 -lpthread -lpthread_nonshared&lt;BR /&gt;&lt;BR /&gt;if get an error:&lt;BR /&gt;libiomp5.so: undefined reference to `pthread_atfork'&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;That message normally indicates that you neglected to link libpthread after libiomp5, which doesn't agree with the link command you quote (unless you failed to mention a warning at link time). You do need the 64-bit libpthread.so on relevant paths at both link and run time.&lt;BR /&gt;ldd ./sizeOftest&lt;BR /&gt;should show you which .so files will be used according to the run environment you have set up (and also the unresolved .so references).&lt;BR /&gt;</description>
    <pubDate>Mon, 30 Jan 2012 18:50:26 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2012-01-30T18:50:26Z</dc:date>
    <item>
      <title>mkl lapack zgesdd example</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819792#M4619</link>
      <description>Hey,&lt;BR /&gt;I'm trying to use the svd with the example function [1].&lt;BR /&gt;My system is a 64bit linux and i'm linking against the mkl-lapack supplied by matlab 2011a.&lt;BR /&gt;building and linking works (after some manipulation to get the link working) [2]&lt;BR /&gt;&lt;BR /&gt;But the call results in the error:&lt;BR /&gt;MKL ERROR: Parameter 5 was incorrect on entry to ZGESDD&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i use the gcc compiler.&lt;BR /&gt;&lt;BR /&gt;hopefully you can help my :)&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;Jan&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[1] &lt;A href="http://software.intel.com/sites/products/documentation/hpc/mkl/lapack/mkl_lapack_examples/zgesdd_ex.c.htm" target="_blank"&gt;http://software.intel.com/sites/products/documentation/hpc/mkl/lapack/mkl_lapack_examples/zgesdd_ex.c.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;[2]&lt;BR /&gt;extern "C" {extern void zgesdd_( char* jobz, int* m, int* n, dcomplex* a,&lt;BR /&gt; myInt* lda, double* s, dcomplex* u, int* ldu, dcomplex* vt, int* ldvt,&lt;BR /&gt; dcomplex* work, int* lwork, double* rwork, int* iwork, int* info );&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Jan 2012 16:29:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819792#M4619</guid>
      <dc:creator>jangerrit</dc:creator>
      <dc:date>2012-01-30T16:29:48Z</dc:date>
    </item>
    <item>
      <title>mkl lapack zgesdd example</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819793#M4620</link>
      <description>You may be using MKL-Lapack in a non-standard way. In particular, what is the definition of type myInt? What is the command line used to compile, and which version of Matlab did the shared library come with? Is the function call in C++ code?</description>
      <pubDate>Mon, 30 Jan 2012 17:13:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819793#M4620</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-01-30T17:13:07Z</dc:date>
    </item>
    <item>
      <title>mkl lapack zgesdd example</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819794#M4621</link>
      <description>sorry.. i didn't see that.. &lt;BR /&gt;the myInt is a typedef for int&lt;BR /&gt;typedef int myInt;&lt;BR /&gt;i played around a little bit, because i found something in a different thread that states, that you need 8 bit integer (which i don't have and which doesn't make sense to me)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while checking the gcc commands again i found a mistake, although this works, i am linking against a custom lapack version.&lt;BR /&gt;&lt;BR /&gt;g++ -c -m64 -pipe -O2 -D_REENTRANT -Wall -W -I/usr/include -I. -I. -o main.o main.cpp&lt;BR /&gt;&lt;BR /&gt;g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-O1 -o zgesdd main.o -lpthread -llapack &lt;BR /&gt;&lt;BR /&gt;but i forced the usage of the mkl lapack with ld_preload.. i don't know if this linking can be responsibe for this..&lt;BR /&gt;&lt;BR /&gt;if i change it to&lt;BR /&gt;g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-O1 -o sizeOftest main.o -LPATH_TO_matlab/bin/glnxa64/ -lmkl -LPATH_TO_matlab/sys/os/glnxa64/ -liomp5 -lpthread -lpthread_nonshared&lt;BR /&gt;&lt;BR /&gt;if get an error:&lt;BR /&gt;libiomp5.so: undefined reference to `pthread_atfork'&lt;BR /&gt;&lt;BR /&gt;Jan&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Jan 2012 18:26:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819794#M4621</guid>
      <dc:creator>jangerrit</dc:creator>
      <dc:date>2012-01-30T18:26:49Z</dc:date>
    </item>
    <item>
      <title>mkl lapack zgesdd example</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819795#M4622</link>
      <description>&lt;DIV id="tiny_quote"&gt;
                &lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=551526" class="basic" href="https://community.intel.com/en-us/profile/551526/"&gt;jangerrit&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;I&gt;&lt;BR /&gt;g++ -c -m64 -pipe -O2 -D_REENTRANT -Wall -W -I/usr/include -I. -I. -o main.o main.cpp&lt;BR /&gt;&lt;BR /&gt;g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-O1 -o zgesdd main.o -lpthread -llapack &lt;BR /&gt;&lt;BR /&gt;but i forced the usage of the mkl lapack with ld_preload.. i don't know if this linking can be responsibe for this..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;Here you appear to be linking against the (non-threaded) lapack and blas for gfortran which come with your OS. There isn't a separate lapack library in recent MKL versions, so it's not clear whether your LD_PRELOAD had any effect.&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu 
-Wl,-O1 -o sizeOftest main.o -LPATH_TO_matlab/bin/glnxa64/ -lmkl 
-LPATH_TO_matlab/sys/os/glnxa64/ -liomp5 -lpthread -lpthread_nonshared&lt;BR /&gt;&lt;BR /&gt;if get an error:&lt;BR /&gt;libiomp5.so: undefined reference to `pthread_atfork'&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;That message normally indicates that you neglected to link libpthread after libiomp5, which doesn't agree with the link command you quote (unless you failed to mention a warning at link time). You do need the 64-bit libpthread.so on relevant paths at both link and run time.&lt;BR /&gt;ldd ./sizeOftest&lt;BR /&gt;should show you which .so files will be used according to the run environment you have set up (and also the unresolved .so references).&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Jan 2012 18:50:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819795#M4622</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-01-30T18:50:26Z</dc:date>
    </item>
    <item>
      <title>mkl lapack zgesdd example</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819796#M4623</link>
      <description>yes, i know that i am linking against my os lapack. &lt;BR /&gt;i only do that because i get the error the other way. &lt;BR /&gt;&lt;BR /&gt;i preload matlabs mkl.so and that is working&lt;BR /&gt;&lt;BR /&gt;ldd zgesdd&lt;BR /&gt;linux-vdso.so.1 =&amp;gt; (0x00007fffb07ad000)&lt;BR /&gt; /home/jangerrit/uni/matlab/bin/glnxa64/mkl.so (0x00007f8fd917f000)&lt;BR /&gt; liblapack.so.3 =&amp;gt; /usr/lib/liblapack.so.3 (0x00007f8fd8915000)&lt;BR /&gt; libc.so.6 =&amp;gt; /lib/libc.so.6 (0x00007f8fd8575000)&lt;BR /&gt; libiomp5.so =&amp;gt; path_to_matlab/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so (0x00007f8fd8396000)&lt;BR /&gt; libm.so.6 =&amp;gt; /lib/libm.so.6 (0x00007f8fd8116000)&lt;BR /&gt; /lib/ld-linux-x86-64.so.2 (0x00007f8fdb2da000)&lt;BR /&gt; libblas.so.3 =&amp;gt; /usr/lib/libblas.so.3 (0x00007f8fd7ebf000)&lt;BR /&gt; libgfortran.so.3 =&amp;gt; /usr/lib/libgfortran.so.3 (0x00007f8fd7ba6000)&lt;BR /&gt; libdl.so.2 =&amp;gt; /lib/libdl.so.2 (0x00007f8fd79a2000)&lt;BR /&gt; libpthread.so.0 =&amp;gt; /lib/libpthread.so.0 (0x00007f8fd7785000)&lt;BR /&gt; libquadmath.so.0 =&amp;gt; /usr/lib/../lib/libquadmath.so.0 (0x00007f8fd754f000)&lt;BR /&gt;&lt;BR /&gt;and even from valgrind(callgrind)&lt;BR /&gt;1,676 &amp;lt; ???:mkl_lapack_zgesdd (2x) [path_to_matlab/bin/glnxa64/mkl.so]&lt;BR /&gt;&lt;BR /&gt;there are no other errors than the strange pthread error if i try to link against mkl.so&lt;BR /&gt;&lt;BR /&gt;i would just like to mention, that if i use the lapack supplied by my os, the function works fine. unfortunately, that is not a possible solution for me, as i would like to use it within matlab (which uses the mkl)&lt;BR /&gt;&lt;BR /&gt;Jan</description>
      <pubDate>Mon, 30 Jan 2012 20:25:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819796#M4623</guid>
      <dc:creator>jangerrit</dc:creator>
      <dc:date>2012-01-30T20:25:25Z</dc:date>
    </item>
    <item>
      <title>mkl lapack zgesdd example</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819797#M4624</link>
      <description>&lt;I&gt;&amp;gt;i found something in a different thread that states, that you need 8 bit integer&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;An 8-&lt;SPAN style="text-decoration: underline;"&gt;byte &lt;/SPAN&gt;integer, possibly? The standard MKL distribution for 64-bit OSes contains two versions of MKL: LP64 (32 bit integers, 64-bit longs and pointers), and ILP64 (integers also 64-bit). You need to find out which model (LP64 or ILP64) is followed by the MKL library that you wish to use, and call it with the correct types of arguments. &lt;BR /&gt;&lt;BR /&gt;The error message (incorrect value for an integer argument) suggests that you may be using the wrong size for integers.</description>
      <pubDate>Tue, 31 Jan 2012 00:04:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819797#M4624</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-01-31T00:04:18Z</dc:date>
    </item>
    <item>
      <title>mkl lapack zgesdd example</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819798#M4625</link>
      <description>thanks.. 8byte is whate i meant. &lt;BR /&gt;at least i was on the right track. &lt;BR /&gt;&lt;BR /&gt;how do i find out which model is used?&lt;BR /&gt;&lt;BR /&gt;and how do i change the size of my integers? &lt;BR /&gt;thats what i tried with the typedef.. &lt;BR /&gt;i just cast the integer to long long int which is 8 byte long.&lt;BR /&gt;&lt;BR /&gt;there is no change in the error message. Should i replace every mention of ints to myInt and try again? i hoped that there would be at least a change in the faulty parameter ;)&lt;BR /&gt;&lt;BR /&gt;Jan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Jan 2012 02:01:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819798#M4625</guid>
      <dc:creator>jangerrit</dc:creator>
      <dc:date>2012-01-31T02:01:35Z</dc:date>
    </item>
    <item>
      <title>mkl lapack zgesdd example</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819799#M4626</link>
      <description>ok.. i changed every int to a long long int and now it is working :)&lt;BR /&gt;&lt;BR /&gt;great. thanks for the help :)&lt;BR /&gt;&lt;BR /&gt;jan</description>
      <pubDate>Tue, 31 Jan 2012 02:04:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-lapack-zgesdd-example/m-p/819799#M4626</guid>
      <dc:creator>jangerrit</dc:creator>
      <dc:date>2012-01-31T02:04:43Z</dc:date>
    </item>
  </channel>
</rss>

