<?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 doubt that the problem is in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-Fortran-Blas-routine-from-C/m-p/1136821#M26087</link>
    <description>&lt;P&gt;I doubt that the problem is just a linking issue. I suspect that the Fortran routine in MKL is not receiving the proper argument list. If you show the malfunctioning code and instructions to reproduce it, some progress may be possible.&lt;/P&gt;</description>
    <pubDate>Sat, 10 Feb 2018 18:48:48 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2018-02-10T18:48:48Z</dc:date>
    <item>
      <title>Calling Fortran Blas routine from C</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-Fortran-Blas-routine-from-C/m-p/1136820#M26086</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to call Fortran subroutine that calls zdotu from C.&lt;/P&gt;

&lt;P&gt;I am using linking flags from Advisor &lt;A href="https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/" target="_blank"&gt;https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;These linking flags for both C and Fortran work when I compiled samples dgemm and matrix multiplication.&lt;/P&gt;

&lt;P&gt;However, I am getting SIGSEGV, when running my simple app when both Fortran and C linking flags are used.&lt;/P&gt;

&lt;P&gt;I am using GNU compiler, Intel OpenMP lib, intel64 platform, sizeof(int)=4, tried both dynamic and static linking.&lt;/P&gt;

&lt;P&gt;The code I am trying to run is actually from R configure script.&lt;/P&gt;

&lt;P&gt;Please let me know, how to link both Fortran and C at the same time.&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 06:57:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-Fortran-Blas-routine-from-C/m-p/1136820#M26086</guid>
      <dc:creator>ru__eli</dc:creator>
      <dc:date>2018-02-10T06:57:41Z</dc:date>
    </item>
    <item>
      <title>I doubt that the problem is</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-Fortran-Blas-routine-from-C/m-p/1136821#M26087</link>
      <description>&lt;P&gt;I doubt that the problem is just a linking issue. I suspect that the Fortran routine in MKL is not receiving the proper argument list. If you show the malfunctioning code and instructions to reproduce it, some progress may be possible.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 18:48:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-Fortran-Blas-routine-from-C/m-p/1136821#M26087</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-02-10T18:48:48Z</dc:date>
    </item>
    <item>
      <title>Hi Eli,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-Fortran-Blas-routine-from-C/m-p/1136822#M26088</link>
      <description>&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;Hi Eli, &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;Could you please tell how do you call the function.&amp;nbsp; MKL support call fortran routine from c. &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;for example,&amp;nbsp; you may refer to&amp;nbsp;the MKL user guide : there is sample call zdotc.&amp;nbsp; (almost same as zdotu).&amp;nbsp; Please not the output C was the first parameter in routine.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: rgb(8, 96, 168); font-family: &amp;quot;Arial&amp;quot;,sans-serif; mso-ansi-language: EN;"&gt;&lt;FONT size="3"&gt;Example "Calling a Complex BLAS Level 1 Function from C++"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;
	&lt;SPAN&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Verdana&amp;quot;,sans-serif; font-size: 10pt; mso-ansi-language: EN; mso-bidi-font-family: Arial;"&gt;Below is the C++ implementation:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 10pt; mso-ansi-language: EN;"&gt;#include &amp;lt;complex&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 10pt; mso-ansi-language: EN;"&gt;&lt;SPAN&gt;#include &amp;lt;iostream&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;#define MKL_Complex16 std::complex&amp;lt;double&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;#include "mkl.h"&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;#define N 5&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;int main()&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;int n, inca = 1, incb = 1, i;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;std::complex&amp;lt;double&amp;gt; a&lt;N&gt;, b&lt;N&gt;, c;&lt;/N&gt;&lt;/N&gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;n = N;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;for( i = 0; i &amp;lt; n; i++ ){&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;a&lt;I&gt; = std::complex&amp;lt;double&amp;gt;(i,i*2.0);&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;b&lt;I&gt; = std::complex&amp;lt;double&amp;gt;(n-i,i*2.0);&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;zdotc(&amp;amp;c, &amp;amp;n, a, &amp;amp;inca, b, &amp;amp;incb );&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;std::cout &amp;lt;&amp;lt; "The complex dot product is: " &amp;lt;&amp;lt; c &amp;lt;&amp;lt; std::endl;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;return 0;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;Ying&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;P.S If your program related to R and MKL. &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;It may be more than the problem. Just for your reference:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;for example, there are mainly &amp;nbsp;two ways&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;1. how you could use MKL from R by load dynamic library &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;&lt;A href="https://software.intel.com/en-us/articles/extending-r-with-intel-mkl"&gt;&lt;U&gt;&lt;FONT color="#0000ff"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://software.intel.com/en-us/articles/extending-r-with-intel-mkl" target="_blank"&gt;https://software.intel.com/en-us/articles/extending-r-with-intel-mkl&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;2. integrate MKL to R to use BLAS and LAPACK. &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;&lt;A href="https://software.intel.com/en-us/articles/using-intel-mkl-with-r"&gt;&lt;U&gt;&lt;FONT color="#0000ff"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://software.intel.com/en-us/articles/using-intel-mkl-with-r" target="_blank"&gt;https://software.intel.com/en-us/articles/using-intel-mkl-with-r&lt;/A&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;/P&gt;

&lt;H2 style="margin: 0.83em 0cm;"&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 13pt; mso-ansi-language: EN;"&gt;&lt;A href="https://software.intel.com/en-us/articles/build-r-301-with-intel-c-compiler-and-intel-mkl-on-linux" target="_blank" h="ID=SERP,5111.1"&gt;&lt;U&gt;&lt;I&gt;&lt;SPAN style="color: rgb(0, 27, 160);"&gt;Build &lt;/SPAN&gt;&lt;/I&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN style="color: rgb(0, 27, 160); font-family: &amp;quot;Arial&amp;quot;,sans-serif; text-underline: none;"&gt;R&lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt;&lt;SPAN style="color: rgb(0, 27, 160);"&gt;-3.4.2 with &lt;/SPAN&gt;&lt;/I&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN style="color: rgb(0, 27, 160); font-family: &amp;quot;Arial&amp;quot;,sans-serif; text-underline: none;"&gt;Intel® C++ and Fortran Compilers&lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt;&lt;SPAN style="color: rgb(0, 27, 160);"&gt; …&lt;/SPAN&gt;&lt;/I&gt;&lt;/U&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/H2&gt;

&lt;P style="margin: 0cm 0cm 8pt;"&gt;&lt;SPAN lang="EN" style="color: rgb(83, 87, 94); line-height: 107%; font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 9.5pt; mso-ansi-language: EN;"&gt;etc. &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 01:10:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-Fortran-Blas-routine-from-C/m-p/1136822#M26088</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-02-11T01:10:12Z</dc:date>
    </item>
    <item>
      <title>Thanks everybody for prompt</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-Fortran-Blas-routine-from-C/m-p/1136823#M26089</link>
      <description>&lt;P&gt;Thanks everybody for prompt replies&lt;/P&gt;

&lt;P&gt;I fixed the problem. Everything is linking and works now. However, R regression test with MKL vs OpenBLAS reports at least 2 more failures.&lt;/P&gt;

&lt;P&gt;I am not sure if number in R regression tests are right, it needs some investigation.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:19:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-Fortran-Blas-routine-from-C/m-p/1136823#M26089</guid>
      <dc:creator>ru__eli</dc:creator>
      <dc:date>2018-02-13T17:19:00Z</dc:date>
    </item>
  </channel>
</rss>

