<?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 Compile c function within R desktop in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1527682#M35185</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;LI-CODE lang="markup"&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;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I executed the following command in R desktop, but an issue occurred during the process.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&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;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&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="Screenshot 2023-09-26 135508.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/46154i640544DC31FD8BBF/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="Screenshot 2023-09-26 135508.png" alt="Screenshot 2023-09-26 135508.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've installed the Intel® oneAPI Base Toolkit on a Windows platform.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Than you very much.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2023 11:06:28 GMT</pubDate>
    <dc:creator>Fio</dc:creator>
    <dc:date>2023-09-26T11:06:28Z</dc:date>
    <item>
      <title>Compile c function within R desktop</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1527682#M35185</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;LI-CODE lang="markup"&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;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I executed the following command in R desktop, but an issue occurred during the process.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&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;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&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="Screenshot 2023-09-26 135508.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/46154i640544DC31FD8BBF/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="Screenshot 2023-09-26 135508.png" alt="Screenshot 2023-09-26 135508.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've installed the Intel® oneAPI Base Toolkit on a Windows platform.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Than you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 11:06:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1527682#M35185</guid>
      <dc:creator>Fio</dc:creator>
      <dc:date>2023-09-26T11:06:28Z</dc:date>
    </item>
    <item>
      <title>Re:Compile c function within R desktop</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1528873#M35209</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;EM style="font-size: 16px; font-family: intel-clear;"&gt;C code (which is saved on the path&amp;nbsp;"C:\Users\Desktop\example.c") directly within the R desktop environment.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Could you please let us know the R  version you have downloaded and who you are trying to link with which version of the Intel MKL? &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Also, could you please provide us with the complete steps you followed on R Desktop to compile this code Intel compilers?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Sep 2023 15:35:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1528873#M35209</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-09-29T15:35:31Z</dc:date>
    </item>
    <item>
      <title>Re:Compile c function within R desktop</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1530825#M35251</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;LINK : fatal error LNK1104: cannot open file 'libiomp5md.lib'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Regarding the error you are getting on libiomp5md.lib file is from the Intel compilers folder, could you please check whether everything is installed properly and also check whether you are linking properly whether it is 32-bit or 64-bit?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please try linking the Intel Compilers with Intel MKL and let us know if you are facing any errors?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Oct 2023 18:20:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1530825#M35251</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-05T18:20:35Z</dc:date>
    </item>
    <item>
      <title>Re:Compile c function within R desktop</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1533222#M35294</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please provide us with an update on your issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Oct 2023 19:11:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1533222#M35294</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-12T19:11:25Z</dc:date>
    </item>
    <item>
      <title>Re:Compile c function within R desktop</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1535790#M35340</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please provide us with an update on your issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Oct 2023 08:47:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compile-c-function-within-R-desktop/m-p/1535790#M35340</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-20T08:47:49Z</dc:date>
    </item>
  </channel>
</rss>

