<?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 I agree with the suspicion in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168961#M28403</link>
    <description>I agree with the suspicion that you are calling dgemm from gfortran, which makes the use of mkl on Windows difficult (unsupported).</description>
    <pubDate>Wed, 06 Dec 2017 23:08:00 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2017-12-06T23:08:00Z</dc:date>
    <item>
      <title>f2py mkl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168956#M28398</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have searched the forums and cannot find any good assistance.&amp;nbsp; I am trying to build a python module from a F77 source file. Have sourced my intel environment variables with:&lt;/P&gt;

&lt;P&gt;call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017\windows\bin\compilervars.bat" -arch intel64&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;And I am trying to compile with:&lt;/P&gt;

&lt;P&gt;f2py --fcompiler=intelvem -L"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017\windows\mkl\lib\intel64_win" -lmkl_lapack95_ilp64 -lmkl_blas95_ilp64 -c matmul2.pyf matmul2.f90&lt;/P&gt;

&lt;P&gt;I am getting a failed with exit status 1120&amp;nbsp;and a error LNK2001: unresolved external symbol dgemm_&lt;/P&gt;

&lt;P&gt;Can anyone point me in a fruitful direction to make some progress?&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;

&lt;P&gt;Leon&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 13:44:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168956#M28398</guid>
      <dc:creator>Adams__Leon</dc:creator>
      <dc:date>2017-12-06T13:44:48Z</dc:date>
    </item>
    <item>
      <title>Which link.exe do you use?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168957#M28399</link>
      <description>Which link.exe do you use? Linkage between ifort Windows and mkl normally is handled with Microsoft link as back end and Linux style command line options aren't supported.</description>
      <pubDate>Wed, 06 Dec 2017 16:53:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168957#M28399</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2017-12-06T16:53:41Z</dc:date>
    </item>
    <item>
      <title>I don't know anything about</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168958#M28400</link>
      <description>&lt;P&gt;I don't know anything about f2py, but it seems to me that your Fortran code is calling GEMM through the F77 interface (note the name "dgemm_"), and that you are using a Fortran compiler other than IFort. If so, you need to use compiler options to get the name mangling done right.&lt;/P&gt;

&lt;P&gt;If your Fortran code explicitly calls &lt;STRONG&gt;dgemm()&lt;/STRONG&gt;, you do not need the *95* libraries in your link line at all. Regardless of that, you will need to link with the appropriate MKL libraries. Use the MKL Link Line Advisor,&amp;nbsp;https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ .&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 17:12:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168958#M28400</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2017-12-06T17:12:43Z</dc:date>
    </item>
    <item>
      <title>mecej4,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168959#M28401</link>
      <description>&lt;P&gt;mecej4,&lt;/P&gt;

&lt;P&gt;I think you may be correct with the F77 interface. Why did the name "dgemm_" suggest this as&amp;nbsp;an issue?&amp;nbsp; I am on Windows and don't know much about how to use Microsoft link. I am using f2py&amp;nbsp;to create python modules from Fortran modules, hence the command line usage. I did see the link advisor which works for straight Fortran compilations but does not get me all the way to the python modules.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Leon&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 18:33:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168959#M28401</guid>
      <dc:creator>Adams__Leon</dc:creator>
      <dc:date>2017-12-06T18:33:07Z</dc:date>
    </item>
    <item>
      <title>In Fortran 90 and later, one</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168960#M28402</link>
      <description>&lt;P&gt;In Fortran 90 and later, one can have a generic interface name such as gemm(). Depending on the types (and number) of arguments, the call to a generic name will get resolved into a call to the appropriate specific routine from the list sgemm(), dgemm(), cgemm(), zgemm(), szgemm and dzgemm(), as you can see from the manual page&amp;nbsp;https://software.intel.com/en-us/mkl-developer-reference-fortran-gemm . The BLAS-95 library contains only the "wrapper" routines that do this resolving of the generic to the specifics. The codes for the actual specific functions are not in the BLAS-95 library, but in one of the several MKL libraries whose names do not contain "95" in them.&lt;/P&gt;

&lt;P&gt;By default, the Ifort compiler on Windows generates a reference to &lt;STRONG&gt;DGEMM &lt;/STRONG&gt;in 64-bit object files, and to &lt;STRONG&gt;_DGEMM &lt;/STRONG&gt;in 32-bit object files. If you use the Gfortran compiler, instead, the name gets decorated to &lt;STRONG&gt;dgemm_ &lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 21:56:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168960#M28402</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2017-12-06T21:56:00Z</dc:date>
    </item>
    <item>
      <title>I agree with the suspicion</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168961#M28403</link>
      <description>I agree with the suspicion that you are calling dgemm from gfortran, which makes the use of mkl on Windows difficult (unsupported).</description>
      <pubDate>Wed, 06 Dec 2017 23:08:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168961#M28403</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2017-12-06T23:08:00Z</dc:date>
    </item>
    <item>
      <title>Thanks everyone. It looks</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168962#M28404</link>
      <description>&lt;P&gt;Thanks everyone. It looks like f2py is not passing through my compiler selection and environment variables. I will check to see if I can more insights into the internal of how f2py works.&lt;/P&gt;

&lt;P&gt;Thanks for all the comments.&lt;/P&gt;

&lt;P&gt;Leon&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;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 16:12:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168962#M28404</guid>
      <dc:creator>Adams__Leon</dc:creator>
      <dc:date>2017-12-07T16:12:40Z</dc:date>
    </item>
    <item>
      <title>Hi Leon, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168963#M28405</link>
      <description>&lt;P&gt;Hi Leon,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;What exact function are you writing in matmul.f&amp;nbsp; DGEMM or GEMM?&amp;nbsp; &amp;nbsp;But as MKL had included BLAS95 interface supports in library,&amp;nbsp; you can use MKL libraries directly;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;please refer MKL&amp;nbsp; link advisor&amp;nbsp;&amp;nbsp;https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/,&amp;nbsp; for example, you will get required link command line as below&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;-L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl&lt;/P&gt;

&lt;P&gt;&amp;nbsp;-i8 -I${MKLROOT}/include&amp;nbsp; (if you use 64bit long integer,&amp;nbsp; then use it).&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If the problem insists , please submit your issue to&amp;nbsp; &lt;SPAN style="color: rgb(204, 0, 0);"&gt;&lt;SPAN data-bm="32"&gt;&lt;A h="ID=SERP,5114.1" href="https://supporttickets.intel.com/?lang=en-US" style="color: rgb(96, 0, 144);" target="_blank"&gt;&lt;SPAN class="01"&gt;Online&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="01"&gt;Service&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="01"&gt;Center&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 03:03:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/f2py-mkl/m-p/1168963#M28405</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2017-12-11T03:03:00Z</dc:date>
    </item>
  </channel>
</rss>

