- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OS
Windows 10
IDE
Visual Studio 19
Compiler
Any compiler (tested with msvc, clang, or Intel(R) oneAPI DPC++ compiler)
Toolkit
oneAPI Base Toolkit version 2021.1-beta09
Problem
After building .exe or .dll that relies one oneAPI DPC++, execute the .exe or .dll without going through Visual Studio "Intel(R) oneAPI DPC++ Compiler" platform toolset, (e.g., cmd).
After taking a look, the said toolset adds these few lines to the debugging environment.
OCL_ICD_FILENAMES=C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\windows\lib\emu\intelocl64_emu.dll;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\windows\lib\x64\intelocl64.dll;
AOCL_BOARD_PACKAGE_ROOT=C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\lib\oclfpga\board\intel_a10gx_pac
INTELFPGAOCLSDKROOT=C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\lib\oclfpga
INTEL_TARGET_ARCH=intel64
INTEL_TARGET_PLATFORM=windows
CMPLR_ROOT=C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\
PATH=C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\lib\oclfpga\windows64\bin;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\bin;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\redist\intel64_win\compiler;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\lib\oclfpga\bin;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\lib\oclfpga\windows64\bin;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\lib\oclfpga\host\windows64\bin;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\lib\oclfpga\board\intel_a10gx_pac\windows64\bin;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\lib\oclgpu;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\windows\bin\intel64;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\windows\redist\intel64_win\compiler;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\windows\bin;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\windows\lib;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\windows\ioc\bin;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\windows\lib\ocloc;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta09\windows\..\..\..\tbb\latest\redist\intel64\vc_mt;%PATH%
The program will not run properly without those environment variables, either cannot find dll, cannot detect OpenCL devices, or some native error, etc.
Shouldn't this be done by the installer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We can see that from screenshots you have provided, you are able to successfully initialize oneAI environment.
Could you please try running your application executable after initializing the oneAPI environment and let us know if you face any errors?
Example:
We have tried running the vector-add-usm code which is available as part of oneAPI samples.
After building the vector-add-usm solution. Try running the executable inside <visualstudio/repos/projectname/x64/Debug/>vector-add-usm.exe
Regarding "sys_check.bat errors": We will get back to you after discussing it with the concerned internal team.
Thanks & Regards
Goutham
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You need to set up the oneAPI environment in the command prompt before running any oneAPI application.
- Please run the setvars.bat (located at oneAPI Installed directory) in cmd prompt to initialize the oneAPI environment.
- Run the application .exe file after initializing the oneAPI environment.
Please let us know if you face any further challenges.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems DPC++ dlls directory still wasn't added to PATH.
Extended information that may help,
setvars.bat ran successfully as follows,
sys_check.bat wasn't successful,
Just to point out, I do have python installed and added to system PATH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We can see that from screenshots you have provided, you are able to successfully initialize oneAI environment.
Could you please try running your application executable after initializing the oneAPI environment and let us know if you face any errors?
Example:
We have tried running the vector-add-usm code which is available as part of oneAPI samples.
After building the vector-add-usm solution. Try running the executable inside <visualstudio/repos/projectname/x64/Debug/>vector-add-usm.exe
Regarding "sys_check.bat errors": We will get back to you after discussing it with the concerned internal team.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Goutham,
It seems what you did works, screenshot for reference (also works on my own application (dll)).
However, is there any plans in the future (e.g., on a stable release) to permanently change the environment variable during installation (like setx instead of set), instead of having to run setvars.bat every time?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Glad to know that your issue has been resolved!
Regarding: "is there any plans in the future (e.g., on a stable release) to permanently change the environment variable during installation (like setx instead of set), instead of having to run setvars.bat every time?"
Thanks for your feedback, we will consider this, and we will forward your feedback to the concerned engineering team.
As this issue has been resolved, we will no longer respond to this thread.
If you require any additional assistance from Intel, please start a new thread.
Any further interaction in this thread will be considered community only.
Have a Good day!
Thanks & Regards
Goutham
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page