<?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 Hello.  We confirmed the bug in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956290#M15519</link>
    <description>&lt;P&gt;Hello. &amp;nbsp;We confirmed the bug into MKL with gfortran. As a temporary workarond the problem you can try to add options "-ff2c -fno-second-underscore" and check if it will help. &amp;nbsp;We will keep you update when the fix would be available in the product version of MKL.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jan 2014 05:28:26 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2014-01-13T05:28:26Z</dc:date>
    <item>
      <title>mkl_rt has no way to specify fortran interface</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956288#M15517</link>
      <description>&lt;P&gt;I am attempting to compile the python libraries numpy and scipy using the GNU compiler and using MKL for the blas library. &amp;nbsp;Explicitly linking to the appropriate fortran interface library using&amp;nbsp;-lmkl_gf_lp64 -lmkl_core -lmkl_sequential -lpthread causes the failure to find mkl_avx and mkl_def bug.&lt;/P&gt;

&lt;P&gt;Instead, the code links fine when -lmkl_rt is used, but then complex blas functions fail with segfaults.&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;The attached fortran program illustrates this problem (exists for MKL 10.3 and 11):&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;[bash]&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;$ gfortran test_cdotu.f -lmkl_gf_lp64 -lmkl_core -lmkl_sequential -lpthread&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;$ ./a.out&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;( &amp;nbsp;2.0000000 &amp;nbsp; &amp;nbsp;, &amp;nbsp;0.0000000 &amp;nbsp; &amp;nbsp;)&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;$ gfortran test_cdotu.f -lmkl_rt -lpthread&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;$ ./a.out&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Segmentation fault&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;$ ifort test_cdotu.f -lmkl_rt -lpthread&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;$ ./a.out&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;(2.000000,0.0000000E+00)&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;[/bash]&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 22:43:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956288#M15517</guid>
      <dc:creator>Douglas_Rudd</dc:creator>
      <dc:date>2014-01-10T22:43:20Z</dc:date>
    </item>
    <item>
      <title>I see segmentation fault with</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956289#M15518</link>
      <description>&lt;P&gt;I see segmentation fault with 11.1 version too:&lt;/P&gt;

&lt;P&gt;[root@nntssg118-x64 u499188]# ./a.out&amp;nbsp;&lt;BR /&gt;
	Intel(R) Math Kernel Library Version 11.1.1 Product Build 20131010 for Intel(R) 64 architecture applications &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Segmentation fault (core dumped)&lt;/P&gt;

&lt;P&gt;the problem is escalated and we will back to you if any updates.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 08:05:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956289#M15518</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2014-01-11T08:05:25Z</dc:date>
    </item>
    <item>
      <title>Hello.  We confirmed the bug</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956290#M15519</link>
      <description>&lt;P&gt;Hello. &amp;nbsp;We confirmed the bug into MKL with gfortran. As a temporary workarond the problem you can try to add options "-ff2c -fno-second-underscore" and check if it will help. &amp;nbsp;We will keep you update when the fix would be available in the product version of MKL.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 05:28:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956290#M15519</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2014-01-13T05:28:26Z</dc:date>
    </item>
    <item>
      <title>Hi Gennady,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956291#M15520</link>
      <description>Hi Gennady,

Thanks for your comment, I should have added the following to the bug report.  -ff2c corrects the problem with the complex blas functions, but then breaks the non-complex functions in a much more dangerous way (the values returned are incorrect rather than generating a crash).

The attached code adds a real function to the previous test example.  

[bash]
$ gfortran test_cdotu_sdot.f -lmkl_gf_lp64 -lmkl_core -lmkl_sequential -lpthread
$ ./a.out
   2.0000000     (  2.0000000    ,  0.0000000    )
$ gfortran test_cdotu_sdot.f -lmkl_rt -lpthread
$ ./a.out
Segmentation fault
$ gfortran test_cdotu_sdot.f -lmkl_rt -lpthread -ff2c -fno-second-underscore
$ ./a.out
   0.0000000     (  2.0000000    ,  0.0000000    )
[/bash]

I am currently using a set of wrapper functions that translate the complex fortran blas functions to cblas functions, and this allows the use of -lmkl_rt without the -ff2c flag.  These were developed by the scipy team to fix similar issues with the blas library on OS X, and I'll let them know of the possible workaround.</description>
      <pubDate>Mon, 13 Jan 2014 16:33:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956291#M15520</guid>
      <dc:creator>Douglas_Rudd</dc:creator>
      <dc:date>2014-01-13T16:33:01Z</dc:date>
    </item>
    <item>
      <title>The fix is available since</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956292#M15521</link>
      <description>&lt;P&gt;The fix is available since MKL 11.1.3, and also present in MKL 11.2.x line. &amp;nbsp;Please use proper environment setting:&lt;BR /&gt;
	export MKL_INTERFACE_LAYER=LP64,GNU&amp;nbsp;&lt;/P&gt;

&lt;P&gt;it works on my side. here is the output I see:&lt;/P&gt;

&lt;P&gt;gfortran test_cdotu_sdot.f -lmkl_rt -lpthread -o 2.out&lt;/P&gt;

&lt;P&gt;export MKL_INTERFACE_LAYER=LP64,GNU&lt;BR /&gt;
	./2.out&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;2.00000000 &amp;nbsp; &amp;nbsp; ( &amp;nbsp;2.00000000 &amp;nbsp; &amp;nbsp;, &amp;nbsp;0.00000000 &amp;nbsp; &amp;nbsp;)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2015 06:59:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-rt-has-no-way-to-specify-fortran-interface/m-p/956292#M15521</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2015-03-24T06:59:05Z</dc:date>
    </item>
  </channel>
</rss>

