<?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 Re: How to compile a SYCL program and make it portable? in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1404485#M2404</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;My objective by doing this is to obtain a portable executable...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;We are working on this issue. We will get back to you soon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Noorjahan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2022 11:58:39 GMT</pubDate>
    <dc:creator>NoorjahanSk_Intel</dc:creator>
    <dc:date>2022-08-03T11:58:39Z</dc:date>
    <item>
      <title>How to compile a SYCL program and make it portable?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1399471#M2347</link>
      <description>&lt;P&gt;I am compiling a very simple program using SYCL, which should be able to run on any Windows machine.&lt;/P&gt;
&lt;P&gt;Here it is:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
#include &amp;lt;iostream&amp;gt;
using namespace sycl;

const std::string secret {
    "Ifmmp-!xpsme\"\012J(n!tpssz-!Ebwf/!"
    "J(n!bgsbje!J!dbo(u!ep!uibu/!.!IBM\01"
};
const auto sz = secret.size();

int main(int argc, char* argv[]) {
    queue Q;

    char* result = malloc_shared&amp;lt;char&amp;gt;(sz, Q);
    std::memcpy(result, secret.data(), sz);

    Q.parallel_for(sz, [=](auto&amp;amp; i) {
        result[i] -= 1;
        }).wait();

    std::cout &amp;lt;&amp;lt; result &amp;lt;&amp;lt;  "\n";

    return 0;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I work with Visual Studio Code, I have Intel OneAPI installed on my computer and the plug-ins specific to VS Code have been added.&lt;/P&gt;
&lt;P&gt;If I compile it from VS Code by typing dpcpp main.cpp -o main.exe in the VS Code terminal, it compiles fine. If I run it from the VS Code terminal, it works fine too.&lt;/P&gt;
&lt;P&gt;However, if I run the executable directly from any command prompt, an error tells me that the file "sycl.dll" is missing. If I add the .dll to my executable's folder, it runs... but doesn't show me anything in the terminal.&lt;/P&gt;
&lt;P&gt;What should I do to be able to run it anywhere on my computer, but especially to have an executable usable on any Windows machine without having to install anything on it?&lt;/P&gt;
&lt;P&gt;In advance, I thank you for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 19:48:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1399471#M2347</guid>
      <dc:creator>frmar</dc:creator>
      <dc:date>2022-07-11T19:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to compile a SYCL program and make it portable?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1399635#M2349</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;an error tells me that the file "sycl.dll" is missing&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are observing this error because you did not initiate the Intel OneAPI environment, before running that executable. It's mandatory to source the environment in the same session.&lt;/P&gt;
&lt;P&gt;Could you please try sourcing the setvars.bat script in the same session where you want to run the executable?&lt;/P&gt;
&lt;P&gt;You can find the script fine in the below path:&lt;/P&gt;
&lt;P&gt;C:\Program Files (x86)\Intel\oneAPI\setvars.bat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps to resolve your issue. If not, please provide the compiler version being used to run the program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Noorjahan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 11:36:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1399635#M2349</guid>
      <dc:creator>NoorjahanSk_Intel</dc:creator>
      <dc:date>2022-07-12T11:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to compile a SYCL program and make it portable?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1399640#M2350</link>
      <description>&lt;P&gt;Thank you for your answer.&lt;/P&gt;
&lt;P&gt;Running the executable inside an Intel oneAPI command prompt will perfectly work, however I cannot run it inside a normal command prompt, even if I run setvars.bat inside the same command prompt before.&lt;/P&gt;
&lt;P&gt;This is what is inside my current folder : &lt;STRONG&gt;main.exe&lt;/STRONG&gt;, &lt;STRONG&gt;setvars.bat&lt;/STRONG&gt; and &lt;STRONG&gt;setvars-vcvarsall.bat&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;First, I am running &lt;STRONG&gt;setvars.bat &lt;/STRONG&gt;and I obtain the following output:&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;:: initialising oneAPI environment...
   Initializing Visual Studio command-line environment...
   Visual Studio version 16.11.11 environment configured.
   "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\"
   Visual Studio command-line environment initialized for: 'x64'
:: oneAPI environment intiialized ::&lt;/LI-CODE&gt;
&lt;P&gt;If I run the &lt;STRONG&gt;main.exe&lt;/STRONG&gt; directly after that, it is still telling me that &lt;STRONG&gt;sycl.dll&lt;/STRONG&gt; is missing. If I add &lt;STRONG&gt;sycl.dll&lt;/STRONG&gt; to the folder, the program will execute (apparently), but won't print the desired output, and won't print any error message either.&lt;/P&gt;
&lt;P&gt;My objective by doing this is to obtain a portable executable that will work on another Windows 10 machine where I cannot install anything, but only execute a program.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 12:23:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1399640#M2350</guid>
      <dc:creator>frmar</dc:creator>
      <dc:date>2022-07-12T12:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to compile a SYCL program and make it portable?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1402137#M2380</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try to source the setvars.bat file from the below location and then run your executable.&lt;/P&gt;
&lt;P&gt;C:\Program Files (x86)\Intel\oneAPI\setvars.bat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer to the below screenshot for more details:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NoorjahanSk_Intel_0-1658384063620.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/31812i65A04EF635BF96E8/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="NoorjahanSk_Intel_0-1658384063620.png" alt="NoorjahanSk_Intel_0-1658384063620.png" /&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;Noorjahan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 06:14:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1402137#M2380</guid>
      <dc:creator>NoorjahanSk_Intel</dc:creator>
      <dc:date>2022-07-21T06:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to compile a SYCL program and make it portable?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1404485#M2404</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;My objective by doing this is to obtain a portable executable...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;We are working on this issue. We will get back to you soon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Noorjahan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 11:58:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1404485#M2404</guid>
      <dc:creator>NoorjahanSk_Intel</dc:creator>
      <dc:date>2022-08-03T11:58:39Z</dc:date>
    </item>
    <item>
      <title>Re:How to compile a SYCL program and make it portable?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1406037#M2415</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The problem is likely due to dynamic library dependency.&lt;/P&gt;&lt;P&gt;Although you copied sycl.dll to your work directory, sycl.dll may depend on a lot other dynamic libraries which cannot be found.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you try to install the compiler runtime to the target computer ?&lt;/P&gt;&lt;P&gt;You can find it in the following page,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html" rel="noopener noreferrer" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Install the suitable version for your computer from "Runtime Versions".&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let us know if this can fix the issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Aug 2022 15:17:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1406037#M2415</guid>
      <dc:creator>yzh_intel</dc:creator>
      <dc:date>2022-08-04T15:17:55Z</dc:date>
    </item>
    <item>
      <title>Re:How to compile a SYCL program and make it portable?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1408857#M2441</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/227573"&gt;@frmar&lt;/a&gt;, have you solved your problem ?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Aug 2022 14:57:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-to-compile-a-SYCL-program-and-make-it-portable/m-p/1408857#M2441</guid>
      <dc:creator>yzh_intel</dc:creator>
      <dc:date>2022-08-17T14:57:18Z</dc:date>
    </item>
  </channel>
</rss>

