<?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 Segmentation Fault in dgemv in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809852#M3774</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have a very simple test file for calling dgemv in my C-Application: &lt;A onclick="ndownload('http://software.intel.com/file/27441')"&gt;useblas.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I compile and link it in this way:&lt;BR /&gt;&lt;BR /&gt;icc -I/opt/intel/Compiler/11.1/069/mkl/include -g -c useblas.c&lt;BR /&gt;&lt;BR /&gt;ifort -nofor_main -L/opt/intel/Compiler/11.1/069/mkl/lib/intel64 -lpthread -openmp -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -g useblas.o -lm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;When executing the a.out file i get a segmentation fault in line 27 (which is the function call of dgemv):&lt;BR /&gt;&lt;BR /&gt;Program received signal SIGSEGV, Segmentation fault.&lt;BR /&gt;0x00002aaaaaba31f7 in dgemv_ ()&lt;BR /&gt; from /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_intel_lp64.so&lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0 0x00002aaaaaba31f7 in dgemv_ ()&lt;BR /&gt; from /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_intel_lp64.so&lt;BR /&gt;#1 0x00000000004012c5 in main () at useblas.c:27&lt;BR /&gt;&lt;BR /&gt;My code was running on: Intel Xeon CPU X7460 @ 2.66GHz. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;A ldd give me the following:&lt;BR /&gt;&lt;BR /&gt;$ ldd a.out&lt;BR /&gt; libpthread.so.0 =&amp;gt; /lib64/libpthread.so.0 (0x0000003921000000)&lt;BR /&gt; libmkl_intel_lp64.so =&amp;gt; /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_intel_lp64.so (0x00002aaaaaad6000)&lt;BR /&gt; libmkl_intel_thread.so =&amp;gt; /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_intel_thread.so (0x00002aaaaaed0000)&lt;BR /&gt; libmkl_core.so =&amp;gt; /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_core.so (0x00002aaaabf35000)&lt;BR /&gt; libm.so.6 =&amp;gt; /lib64/libm.so.6 (0x0000003920800000)&lt;BR /&gt; libiomp5.so =&amp;gt; /opt/intel/Compiler/11.1/069/lib/intel64/libiomp5.so (0x00002aaaac2f4000)&lt;BR /&gt; libc.so.6 =&amp;gt; /lib64/libc.so.6 (0x0000003920400000)&lt;BR /&gt; libgcc_s.so.1 =&amp;gt; /lib64/libgcc_s.so.1 (0x0000003925c00000)&lt;BR /&gt; libdl.so.2 =&amp;gt; /lib64/libdl.so.2 (0x0000003920c00000)&lt;BR /&gt; /lib64/ld-linux-x86-64.so.2 (0x0000003920000000)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What's wrong? Or is there Bug? Btw, the same code works fine with "AMD Core Math Library (ACML)" and the intel compiler. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Tim&lt;BR /&gt;</description>
    <pubDate>Thu, 27 May 2010 15:41:16 GMT</pubDate>
    <dc:creator>Tim</dc:creator>
    <dc:date>2010-05-27T15:41:16Z</dc:date>
    <item>
      <title>Segmentation Fault in dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809852#M3774</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have a very simple test file for calling dgemv in my C-Application: &lt;A onclick="ndownload('http://software.intel.com/file/27441')"&gt;useblas.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I compile and link it in this way:&lt;BR /&gt;&lt;BR /&gt;icc -I/opt/intel/Compiler/11.1/069/mkl/include -g -c useblas.c&lt;BR /&gt;&lt;BR /&gt;ifort -nofor_main -L/opt/intel/Compiler/11.1/069/mkl/lib/intel64 -lpthread -openmp -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -g useblas.o -lm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;When executing the a.out file i get a segmentation fault in line 27 (which is the function call of dgemv):&lt;BR /&gt;&lt;BR /&gt;Program received signal SIGSEGV, Segmentation fault.&lt;BR /&gt;0x00002aaaaaba31f7 in dgemv_ ()&lt;BR /&gt; from /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_intel_lp64.so&lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0 0x00002aaaaaba31f7 in dgemv_ ()&lt;BR /&gt; from /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_intel_lp64.so&lt;BR /&gt;#1 0x00000000004012c5 in main () at useblas.c:27&lt;BR /&gt;&lt;BR /&gt;My code was running on: Intel Xeon CPU X7460 @ 2.66GHz. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;A ldd give me the following:&lt;BR /&gt;&lt;BR /&gt;$ ldd a.out&lt;BR /&gt; libpthread.so.0 =&amp;gt; /lib64/libpthread.so.0 (0x0000003921000000)&lt;BR /&gt; libmkl_intel_lp64.so =&amp;gt; /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_intel_lp64.so (0x00002aaaaaad6000)&lt;BR /&gt; libmkl_intel_thread.so =&amp;gt; /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_intel_thread.so (0x00002aaaaaed0000)&lt;BR /&gt; libmkl_core.so =&amp;gt; /opt/intel/Compiler/11.1/069/mkl/lib/intel64/libmkl_core.so (0x00002aaaabf35000)&lt;BR /&gt; libm.so.6 =&amp;gt; /lib64/libm.so.6 (0x0000003920800000)&lt;BR /&gt; libiomp5.so =&amp;gt; /opt/intel/Compiler/11.1/069/lib/intel64/libiomp5.so (0x00002aaaac2f4000)&lt;BR /&gt; libc.so.6 =&amp;gt; /lib64/libc.so.6 (0x0000003920400000)&lt;BR /&gt; libgcc_s.so.1 =&amp;gt; /lib64/libgcc_s.so.1 (0x0000003925c00000)&lt;BR /&gt; libdl.so.2 =&amp;gt; /lib64/libdl.so.2 (0x0000003920c00000)&lt;BR /&gt; /lib64/ld-linux-x86-64.so.2 (0x0000003920000000)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What's wrong? Or is there Bug? Btw, the same code works fine with "AMD Core Math Library (ACML)" and the intel compiler. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Tim&lt;BR /&gt;</description>
      <pubDate>Thu, 27 May 2010 15:41:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809852#M3774</guid>
      <dc:creator>Tim</dc:creator>
      <dc:date>2010-05-27T15:41:16Z</dc:date>
    </item>
    <item>
      <title>Segmentation Fault in dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809853#M3775</link>
      <description>Hi Tim,&lt;DIV&gt;please try C intreface of dgemv (cblas_dgemv )&lt;/DIV&gt;&lt;DIV&gt;--Gennady&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 May 2010 15:57:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809853#M3775</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2010-05-27T15:57:05Z</dc:date>
    </item>
    <item>
      <title>Segmentation Fault in dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809854#M3776</link>
      <description>Hi Gennady,&lt;BR /&gt;&lt;BR /&gt;thanks for the hint. Using the C interface works fine. But why cant i use the Fortran lib directly. And why does this work with acml?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Tim&lt;BR /&gt;</description>
      <pubDate>Thu, 27 May 2010 16:12:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809854#M3776</guid>
      <dc:creator>Tim</dc:creator>
      <dc:date>2010-05-27T16:12:35Z</dc:date>
    </item>
    <item>
      <title>Segmentation Fault in dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809855#M3777</link>
      <description>Calling the Fortran library from C is possible but the calling conventions are not the same. See the Mixed Language Programming chapters in the Intel Fortran Users' Guide. &lt;BR /&gt;&lt;BR /&gt;Depending on the compilers and platform used, it may be possible to make it &lt;I&gt;appear&lt;/I&gt; as if you are calling one library routine from either C or Fortran. For example, if in C you have dgemv(...), in the compiled code there may be a reference to _dgemv, where as a corresponding call in Fortran may result in a reference to _DGEMV. The linker matches up the reference with the appropriate library routine. Users who know only one of the two languages may find this method easier to use.&lt;BR /&gt;&lt;BR /&gt;On the other hand, one may want the Fortran library routine to be called directly from C, without going through a C wrapper around the Fortran library routine. In this case, one has to know how the two languages correspond as to types, call by value/call by reference, etc.</description>
      <pubDate>Thu, 27 May 2010 17:29:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809855#M3777</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2010-05-27T17:29:26Z</dc:date>
    </item>
    <item>
      <title>Segmentation Fault in dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809856#M3778</link>
      <description>The problem is that Fortran expects call by reference and some of your parameters to DGEMV are call-by-value. Changing your BLAS call to: &lt;BR /&gt;&lt;BR /&gt;dgemv("N", &amp;amp;m, &amp;amp;n, α, a, &amp;amp;n, x, &amp;amp;one, β, y, &amp;amp;one); &lt;BR /&gt;&lt;BR /&gt;works fine.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 May 2010 19:32:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809856#M3778</guid>
      <dc:creator>Melvin_Robinson</dc:creator>
      <dc:date>2010-05-27T19:32:26Z</dc:date>
    </item>
    <item>
      <title>Segmentation Fault in dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809857#M3779</link>
      <description>If the Fortran Lapack routines are called directly from C, it should be kept in mind that C and Fortran have different conversions for representing two-dimensional arrays. The difference may not matter if a full, symmetric matrix is being passed but, in all other cases, care is necessary.&lt;BR /&gt;</description>
      <pubDate>Fri, 28 May 2010 01:53:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809857#M3779</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2010-05-28T01:53:12Z</dc:date>
    </item>
    <item>
      <title>Segmentation Fault in dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809858#M3780</link>
      <description>I would throw my 2 cents in this discussion: Tim, as an additional info please look at the MKL User'sGuide. See Chapter7,Mixed-language Programming with Intel MKL. You can find there link to the 2 examples ( 7.2 and 7.3) show how to call Fortran routines from&lt;SPAN style="font-family: verdana, sans-serif;"&gt;C-languageprograms.&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN style="font-family: verdana, sans-serif;"&gt;--Gennady&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 28 May 2010 05:35:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809858#M3780</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2010-05-28T05:35:27Z</dc:date>
    </item>
    <item>
      <title>Segmentation Fault in dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809859#M3781</link>
      <description>Thank you very much for the detailed information and explanations. Now I understood how to use the MKL in the correct way. :-)&lt;DIV style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;" id="_mcePaste"&gt;&lt;TABLE id="results" width="100%" border="1" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD width="5%" nowrap="nowrap"&gt;&lt;SPAN class="spirit s_info_l" onclick="getMoreInfo(event,'1113459');"&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD valign="middle" width="43%"&gt;&lt;A href="http://dict.leo.org/ende?lp=ende&amp;amp;p=Ci4HO3kMAA&amp;amp;search=explanation&amp;amp;trestr=0x8001"&gt;explanation&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 28 May 2010 07:14:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809859#M3781</guid>
      <dc:creator>Tim</dc:creator>
      <dc:date>2010-05-28T07:14:58Z</dc:date>
    </item>
    <item>
      <title>Segmentation Fault in dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809860#M3782</link>
      <description>Here's an &lt;A href="http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-blas-cblas-and-lapack-compilinglinking-functions-fortran-and-cc-calls/"&gt;article&lt;/A&gt; that summarizes some of the what has already been said on this thread. &lt;BR /&gt;&lt;BR /&gt;Todd</description>
      <pubDate>Fri, 28 May 2010 17:33:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-dgemv/m-p/809860#M3782</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2010-05-28T17:33:08Z</dc:date>
    </item>
  </channel>
</rss>

