<?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 Integrating a C Subfunction for Optimizing R Code in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Integrating-a-C-Subfunction-for-Optimizing-R-Code/m-p/1527653#M35220</link>
    <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;I have previously asked a question about oneMKL , but I'd like to restate it here. I would appreciate&amp;nbsp;any help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I would like to perform the compilation of the following C code (which is saved on the path&amp;nbsp;"C:\Users\Desktop\example.c") directly within the R desktop environment.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;mkl.h&amp;gt;
int main() {
    double x[] = {1.0, 2.0, 3.0};
    double y[] = {4.0, 5.0, 6.0};
    double z;
    // Perform vector multiplication and summation using Intel MKL
    z = cblas_ddot(3, x, 1, y, 1);
    printf("Result: %lf\n", z);
    return 0;
}&lt;/PRE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I executed the following command in R desktop, but an issue occurred during the process.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;gt; system('icx -o myfunction "C:\\Users\\Desktop\\example.c" /Qmkl /MD')
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2023.1.0 Build 20230320
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

LINK : fatal error LNK1104: cannot open file 'libiomp5md.lib'
icx: error: linker command failed with exit code 1104 (use -v to see invocation)
[1] 1104&lt;/PRE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;My environment variables are displayed in the image below. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fio_0-1695726525055.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/46156iB3CCDC7295D01AF9/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Fio_0-1695726525055.png" alt="Fio_0-1695726525055.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I've installed the Intel® oneAPI Base Toolkit on a Windows platform.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Than you very much.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2023 11:09:03 GMT</pubDate>
    <dc:creator>Fio</dc:creator>
    <dc:date>2023-09-26T11:09:03Z</dc:date>
    <item>
      <title>Integrating a C Subfunction for Optimizing R Code</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Integrating-a-C-Subfunction-for-Optimizing-R-Code/m-p/1527653#M35220</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;I have previously asked a question about oneMKL , but I'd like to restate it here. I would appreciate&amp;nbsp;any help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I would like to perform the compilation of the following C code (which is saved on the path&amp;nbsp;"C:\Users\Desktop\example.c") directly within the R desktop environment.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;mkl.h&amp;gt;
int main() {
    double x[] = {1.0, 2.0, 3.0};
    double y[] = {4.0, 5.0, 6.0};
    double z;
    // Perform vector multiplication and summation using Intel MKL
    z = cblas_ddot(3, x, 1, y, 1);
    printf("Result: %lf\n", z);
    return 0;
}&lt;/PRE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I executed the following command in R desktop, but an issue occurred during the process.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;gt; system('icx -o myfunction "C:\\Users\\Desktop\\example.c" /Qmkl /MD')
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2023.1.0 Build 20230320
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

LINK : fatal error LNK1104: cannot open file 'libiomp5md.lib'
icx: error: linker command failed with exit code 1104 (use -v to see invocation)
[1] 1104&lt;/PRE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;My environment variables are displayed in the image below. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fio_0-1695726525055.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/46156iB3CCDC7295D01AF9/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Fio_0-1695726525055.png" alt="Fio_0-1695726525055.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I've installed the Intel® oneAPI Base Toolkit on a Windows platform.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Than you very much.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 11:09:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Integrating-a-C-Subfunction-for-Optimizing-R-Code/m-p/1527653#M35220</guid>
      <dc:creator>Fio</dc:creator>
      <dc:date>2023-09-26T11:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Integrating a C Subfunction for Optimizing R Code</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Integrating-a-C-Subfunction-for-Optimizing-R-Code/m-p/1528874#M35221</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider ec ban bao bap baq bar bas bat bau bav baw bax bay baz bba bbb bbc bbd bbe bbf bbg bbh bbi bbj bbk bbl bbm bbn bbo bbp bbq bbr bbs bbt bbu"&gt;Since this is a duplicate thread of "&lt;A href="https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Integrating-a-C-Subfunction-for-Optimizing-R-Code-Performance-gt/m-p/1526558#M35165" target="_blank"&gt;https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Integrating-a-C-Subfunction-for-Optimizing-R-Code-Performance-gt/m-p/1526558#M35165&lt;/A&gt;&amp;nbsp;" , we will no longer monitor this thread. We will continue addressing this issue in the other thread.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Jilani&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 08:56:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Integrating-a-C-Subfunction-for-Optimizing-R-Code/m-p/1528874#M35221</guid>
      <dc:creator>IntelSupport</dc:creator>
      <dc:date>2023-10-03T08:56:48Z</dc:date>
    </item>
  </channel>
</rss>

