OpenCL SDK for Intel Project at Visual Studio 2012 - visual-studio-2012

Actually I am on my way to write my first OpenCL program. As I have seen in many tutorials that in visual Studio I have to configure properties and add "additional Include directory", most of the tutorials are for nVIdia and Amd so according to them they have to add $(CUDA_INC_PATH) and $(AMDAPPSDKROOT)\include. But what am I suppose to add for INTEL? [CUDA_INC_PATH is not in system path variable so I am going out of clue!]

Have you installed Intel SDK? After that I would look for libraries and headers in its location. Then you can create env. variable or simply add the whole path to include directories in VS.

If you install the Intel SDK it should create an environmental variable called INTELOCLSDKROOT. To see it click on start, right click on computer. Click advanced settings settings. Click on environmental variables.
You only need one SDK to develop with. The Nvidia SDK one only supports OpenCL 1.1 and does not include the cl.hpp C++ bindings. I had problems running on the non-AMD devices with the AMD SDK. The Intel SDK works on Intel, Nvidia, and AMD for me.

Related

Visual Studio remote Debugging, choose custom gdb.exe (linux makefile project)

I've got Visual Studio 2017 (Linux and IOT extension installed) and a linux makefile project. The code is compiled using an arm cross-compiler.
When I try to debug, visual studio will always choose one of the gdb.exe in Common7/IDE/VC/Linux/bin/gdb/8.1. The decision is made based on the choosen architecture (x86, x64, ARM, ARM64) of the VS project.
However my cross-compiler and the gdbserver running on my device are not compatible with the provided aarch64-linux-gnu-gdb.exe.
Is there a way to tell VS to use a specific gdb.exe on my pc?
Replacing files within the VS installation is not an option.
Within Common7/IDE/VC/VCTargets/Application Type/Linux/1.0/Linux.props I've found the GDBRoot property pointing towards the first directoy, but I failed to override this property.
I prefer to keep a solution instead of a project with thelaunch.vs.json if possible.

Is Intel_MKL supposed to populate the include folders, etc, on MSVC

I've installed Intel MKL and it shows in dropdown menu of VS 2017 and VS 2019. Everything seems fine, except I have to manually type in the locations of include and library files. Did I misconfigure something?
What works for me is to explicitly add the include folder
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.4.245\windows\mkl\include
and library folder
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.4.245\windows\mkl\lib\intel64_win
However, I do note that MKL_ROOT is not defined as an environment variable by "default". If I run
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.4.245\windows\mkl\bin\mklvars.bat intel64
then after that MKL_ROOT is defined and the PATH includes the library locations and, I guess, if I then launch MSVC from the commmand line then it should probably work. But I was hoping this would all be automated, somehow. Advice?
Tunneller,
The ease of MKL setup in Visual Studio depends on how you installed it. This article explains how to do manual linking of MKL to VS if you did not install the integration component. And this article explains how to invoke the automatic linking if you did install the integration component.
The above articles refer to the Intel Parallel Studio installation. It may differ if you install MKL as a standalone component or via Intel System Studio.
I hope this helps.
Pamela

Setup project Cross-Platform with Monogame

I've been trying to figure out on how to setup a Cross-Platform project for MonoGame. Whats the conventional way of doing so ?
Is that done through a Shared Project and can I keep all my content in 1 project ?
Also I am not sure if this information is correct do I need a Mac to build my project for Mac how does that work ? If so how what's the best way of setting that up.
Targeted Platforms : WINDOWS, LINUX, MAC
The best way to setup a cross platform MonoGame project IMO would be to use a Shared project. Shared projects can also include .mgcb file so you won't need to duplicate your content either. How to do:
Use "Xamarin Studio/MonoDevelop" and create a "MonoGame Shared Project" with the name of your game
If you are going to use using "Visual Studio", close the "Xamarin Studio/MonoDevelop" after this, and open up the created project vith it
you are gonna have to include the generated "Content\Content.mgcb" file with build action "None" so it will be visible in Project View area
Add a MonoGame Project for the platform you wish to launch the game from, ie. create a "MonoGame Crossplatform Project" and name it "(gamename).DesktopGL"
Delete "Game1.cs" and "Content Folder" from the Platform project
Add a reference for your Shared project
For your platform project, in options set the Output Assembly Name to be the same as your shared project
this step might not seem important, but if you are using a custom importer/processor this will allow you to not have to compile the content separately for each platform.
There you go, you should be able to run your project now.
Also I am not sure if this information is correct do I need a Mac to build my project for Mac how does that work ? If so how what's the best way of setting that up.
The created executable from DesktopGL project is runnable on Mac even when compiled from Windows, the Mac user just has to launch it using Mono. In case you want you can package your game using MonoKickstart so that your Linux and Mac users don't have to have mono installed: https://github.com/MonoGame/MonoKickstart what's more, it also includes other needed native libraries. Description on how to use it are in the link.
Since you're just targeting Windows, Linux and Mac, you can use Xamarin/MonoDevlop which runs on all three of your target platforms.
Once it's installed, then add the Monogame through the Addin manager. The addin on version 5 of Xaramin and MonoDevlop.
You can then use the same Solution project file between all three platforms assuming you use the OpenGL Template. I use this method for developing between Windows and Linux.
The only time you'll need to use a shared project or something similar would be if you started developing for Mobile (iOS/Android) or for Windows on DirectX instead of OpenGL.

WindowsSdkDir per project?

I have a Visual C++ library which I want to compile for a certain platform (I try to compile POCO for a Win CE ARM platform, but that might not be relevant to this question). I got a vendor-specific Windows CE SDK (including all common Windows include files e.g. winbase.h) which is set as target platform within the Visual Studio project files. However, when I compile the program, I can see from the error log that the default Windows 6.0A SDK is used, resulting in a bunch of compilation errors.
I guess the WindowsSdkDir ist not set accordingly - I thought this would be automatically overriden when setting the target platform within Visual Studio.
So my question is: can I modify the WindowsSdkDir for a single project explicitly?
Thank you in advance
Which CE version, which VS version and on which Windows version? I know that I had problems installing CE5 and/or CE6 SDKs and getting them recognized by Visual Studio 2005 running on Windows 7 (64 bit). I don't remember the exact symptoms and fix, but you can test that by simply creating a smart device project for the target SDK.
If that is not the issue, there is also the pitfall with the target in both the project file (.vcproj) and the solution (.sln). You can change both independently from each other, up to the point where you compile the x64 debug version of a project in the win32 release version of the solution. Verify that these setting match.
Then, if you adjusted the .vcproj file to use your target platform (for which I personally would use a text editor), things should work. If you need to adjust the build or some paths, you can sometimes get by with e.g $(Platform) in the compiler/linker settings.
Lastly, if all that doesn't work, there are property sheets, which can adjust certain settings. You then create a property sheet once and then load it into the project that you want to compile. I'm not sure if you can change the target platform or the SDK paths with that approach though, and I'd rather try to find out why the SDK doesn't work and how to fix it instead.

Develop a Cuda DLL working with different Runtime versions

I've a problem with a library developed in Visual C++ with Cuda.
I want to use my dll on different computers, all with NVIDIA drivers, but it depends
by CUDART32_42_9.DLL and CUBLAS32_43_9.DLL; so, depending on 32_42_9, it doesn't work with any different cuda version: neither inferiror (that is reasonable) nor superior (that is my problem).
Have you got any suggestion about how to solve the problem? Do I have to deploy my library with CUDART32_42_9.DLL and CUBLAS32_43_9.DL attached?
Thank you!
It is the responsibility of the application developer to redistribute the necessary CUDA libraries with the application. The EULA.txt document in the CUDA Toolkit doc directory has a section Attachment A that defines Redistributable Software. Redistributable software includes but is not limited to cudart* and cublas*. See EULA.txt for more details.
The end user will need to download a compliant version of the NVIDIA graphics driver for their platform.

Resources