Hello World C++ CUDA Program in Visual Studio 2010 (Windows 7) - c++

I am trying to compile this Hello World program in Windows 7 with Visual Studio 2010 installed, but I get the following error message when I run nvcc hellocuda.cu:
nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 8.0 and MSVC 9.0 are supported
How can I compile this CUDA program ?

NVCC checks VC++ compiler version from Visual Studio environment variables. NVCC says it supports only MSVC 8.0 and 9.0 compilers. In your case, you have MSVC 10.0 compiler. There seems to be a workaround to this issue, check out post #7 in this thread:
http://forums.nvidia.com/index.php?showtopic=179531 and also
http://forums.nvidia.com/index.php?showtopic=88585

If you keep having problems getting it working with MSVC10, bear in mind that you can download the Express version of MSVC9 (i.e. the 2008 version) for free -- so you can always download it and compile with that instead. But I would try swatkat's workaround first :)
Here's the link:
http://www.microsoft.com/express/Downloads/

Visual Studio 2008 Express was needed. (Thanks sgolodetz)
So with Visual Studio 2010 Professional (maybe 2010 Express works too?), NVIDIA Parallel Nsight, CUDA Toolkit, Developer Drivers, and GPU Computing SDK code samples (toolkit, drivers, and sdk can be downloaded here) I was able to run the example Hello World in CUDA program.
How to create/upgrade a CUDA project in VS2008 and VS2010 to work with Nsight 1.5 and CUDA 3.2 was very helpful in starting a new VS 2010 CUDA project with the proper settings.
Side note: I was never able to get the command line nvcc to work correctly, but I rather use VS 2010 IDE instead.
Update: How do I start a new CUDA app in visual studio 2008?'s answer was also useful

With CUDA 4.0 you can use the VC10 toolchain. See this answer for a step-by-step.

Related

Intel C++ Compiler Installer not finding Visual Studio

So I was trying to install the Intel C++ Compiler (in the Parallel Studio XE 2018 bundle) and when I go to install it comes up with the warning "Intel C++ Compiler will not work because none of the supported environments is found on your computer," among others. However, one of those supported environments is Microsoft Visual Studio 2017, which I have installed.
I read online that there's some issue with the most recent versions of Visual Studio and that the compiler only works with versions 15.6 and below. I have 15.5.6, but of the Community version. I'm not sure if the Professional version is required; if it is I don't have it installed and I can't figure how to install a previous version.
If there is no way to make this work (or there is, but it's too much of a pain), suggestions for other C++ compilers would be appreciated.
You could see this document about “Troubleshooting Fortran Integration Issues with Microsoft Visual Studio*”:
https://software.intel.com/en-us/articles/troubleshooting-fortran-integration-issues-with-visual-studio/
It shared the version of Visual Studio that is supported by the Intel Parallel Studio XE now.

Could I use Intel C++ Compiler without Installing Visual Studio [on Windows]

I need intel compiler for my work on My windows [Win7 Prof, 64bit]. I am planning to download the trial version for the same i.e. Intel® Parallel Studio XE.
Could I install this without installing Visual Studio ? I wish to use this on command line only i.e. icl.exe through Cygwin.
Any help is appreciated.
Yes you can.
Per the documentation, you have support for:
Command Line (What you're looking for)
Visual Studio
Eclipse
XCode

Visual studio 2015 debugging with older dlls

I'm trying to debug the sample application from OpenCV under Windows 10 - Visual Studio 2015.
I have already configured Visual Studio according to the OpenCV wiki and I can compile the application and run it fine.
The issue I'm having is when I try to debug the application. I'm getting that the program can't be started because MSVCP120D.dll is missing. I have already installed the Visual C++ 2013 redistributables from Microsoft, however they don't come with the debugging dlls.
The issue probably stems from the fact that the OpenCV version I'm using (D:\opencv\opencv\build\x64\vc12) was compiled with 2013. Is there a way to get the debugger version of this dll? Or start the debugger without it? Or am I stuck having to recompile OpenCV with 2015?
Thanks.
Or am I stuck having to recompile OpenCV with 2015?
You probably are since it is a really bad idea to mix different runtime dlls. In your case you're mixing your compiled program (MSVC 2015) with the OpenCV dlls (MSVC 2013).
You should do either of these:
Compile your program with MVSC 2013, which I believe will require you to install MSVC 2013 on your machine
Compile OpenCV using MSVC 2015.
Note: This is probably gonna be better with programs compiled with MSVC 2015 and later compilers because of the Universal CRT

CUDA does not work on Visual Studio 2013 - toolkits 4.2, 5.5 and 6

I understand that Cuda 6 does not work with Visual Studio 2013. But shouldn't Cuda 5.5. or Cuda 4.2 work with Visual Studio 2013?
I have Cuda 4.2, 5.5 and 6 installed. If I right click on VS project, and select Build Customizations option, I only see Cuda 6 listed. For Cuda 6, it tells me that I must choose the older v11 toolset, and the other two toolkits are simply non existent.
Is there any way to get Cuda to work on VS 2013?
The supported visual studio versions are listed in the windows getting started guide or toolkit release notes for each CUDA toolkit release.
The CUDA 6 getting started guide is here.
The only toolkit that officially has support for VS 2013 at this time is CUDA 6.5RC available for download to registered developers.

Which Nsight version that can be used CUDA5.5, in VisualStudio2010?

I am using CUDA5.5 at the VisualStudio2010 on Windows7 64bit.
I'm going to install a Nsight VisualStudioEdition
and I would like to debug the code of CUDA.
The Nsight3.1 that I found on the site of nVidia is like the latest version,
It had been described as corresponds to the VisualStudio2012.
Nsight3.1 work? CUDA5.5, in VisualStudio2010?
Also, is there a version of Nsight that can be used CUDA5.5, in VisualStudio2010?
Please let me know which version of nSight that can be used CUDA5.5, in VisualStudio2010?
The following message is displayed in the item of "Nsight C + + AMP Debugger" when you try to install the Nsight.
This does not it? Have failed to install?
Nsight C++ AMP Debugger
 Nsight C++ AMP Debugger for Visual Studio 2012 will not be installed.
 Requirement not met:Microsoft Visual Studio 2012 was not found.
 Nsight C++ AMP Target Support for MSVSMON will be installed
 warning:Microsoft Visual Studio 2012 MSVMON.exe was not found.
I'm using Nsight 3.1 with Visual Studio 2010 and either CUDA 5.0 or CUDA 5.5 on several systems with no problem.
Nsight is now compatible also with Visual Studio 2012, see
Install Nsight Visual Studio Edition
if local debugging (host and target on same machine) is concerned.
Concerning Nsight C++ AMP Debugger, if you do not need it, you don't have to worry about this error message. If you have Visual Studio 2010, you will be able to perform CUDA and/or graphics debugging after the installation is complete, see
getting the problem during the installation of nsight visual studio