||
Here I assume you have cuda 8.0 properly installed in your computer with VS2015.
1. open Samples_vs2015.sln (normally located at C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0) (using vs2015 by default)
2. Build a complete set of solutions in Release mode (although it is not necesary to build all the stuff for a quick test on cuda)
(the building process takes a while, and so you may plan on an extended coffee break)
3. Open Developer Command Prompt for VS2015
4. Choose the deviceQuery sample for a simple test: cd C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\bin\win64\Release
5. Enter deviceQuery
Then, you should see the results similar to those shown below.
Good. You are on the right track for the journey of cuda programming.
Possible Issues in Building cuda sample solutions
----------------------------------------------------------------------------------------------
Cannot open include file: 'd3dxd9.h' or 'd3dxd10.h' (no such file or directory)
Check the solution here:
https://stackoverflow.com/questions/17015088/missing-files-directx-sdk-d3dx9-lib-d3dx9-h/42654539
https://blogs.msdn.microsoft.com/chuckw/2015/08/05/where-is-the-directx-sdk-2015-edition/
https://stackoverflow.com/questions/41631576/cannot-open-source-file-d3dx9-h
https://msdn.microsoft.com/en-us/library/mt683786.aspx
-----------------------------------------------------------------------------------------------
cuda driver version is insufficient for cuda runtime version windows
Check the solution here:
http://www.nvidia.com/Download/index.aspx?lang=en-us
------------------------------------------------------------------------------------------------
Choose the right GPU driver
https://forums.geforce.com/default/topic/734249/do-i-need-all-these-drivers-addons-/?offset=6
---------------------------------------------------------------------------------------------------
VS Projects or solutions Load Failed
I recently rearranged the content of my working folder which is used to store all my coding related projects. But after doing that I had problem loading solution of my WinForm project in Visual Studio Express 2012 as I received an error telling me about a problem with a project file.
Exact error message in the Output window was:
error : The project file could not be loaded. Could not find a part of the path...
Another way you can encounter this error is if you renamed your project folder and sometimes you can get this error without moving or renaming anything at all. In this article you will be shown how to solve this problem for all those cases.
Try deleting .suo files in your solution folder. Solution User Option file is a binary file which contains various user information and settings such as location of the breakpoints.
If that didn't help try also to delete .user file.
In Visual Studio 2015 (also in Community Edition), the .suo file is located inside a hidden .vs folder in solution folder. Since both .vs folder and .suo file have hidden attribute applied to them, you have to reveal them using using File Explorer by changing folder options to “show hidden files, folders and drives”.
How to get to this option in File Explorer depends on the version of Windows:
In Windows 7, option is located under Organize > Folder and search options.
in Windows 8, it is located under View tab > Options > Change folder and search options.
in Windows 10, it is the same as in Windows 8.
The problem lies with the nonexistent path of one or more projects that are stored into the solution file.
You can solve this problem in two ways:
One way to fix this error is to correct path of the problematic projects yourself by directly editing .sln file.
For those who feel uncomfortable editing the solution file there is another way. You can fix the path of the project directly from Visual Studio and this procedure is shown next.
Just follow these steps:
Load the solution into VS. You might get Error Popup Window with the message shown below. Ignore the warning and click OK.
In the Solution Explorer you should find at least one project that was not loaded. Select that project. It will have (unavailable) text next to the name as shown below:
In Properties Window you will find unloaded project properties. There will be a single property named File path which stores the path of the project. We need to change that so click on the path. Browse button ... will appear on the right as shown in the following image. Click on it.
Note:Sometimes, the path in File path property is grayed out and you are unable to get to the Browse button. In this case try deleting .suo files. Don't worry, these files gets recreated when you rebuild the solution / project.
File Dialog box will open. Locate project file (.csproj) and click Open.
In the Solution Explorer, the project will still have (unavailable) message besides it. We still need to carry out one more step. Right-click on the project to open context menu. Select Reload Project as shown below:
Build solution. If you get an error telling you that the referenced project does not exist, we need to update references. Save solution and Close it, then Open project again.
Another reason for the load failed is due to the customer based modifications made to MirosoftCpp property file [located at, e.g., C:\Users\userName\AppData\Local\Microsoft\MSBuild\v4.0)]. You may try restore it to its default values (https://stackoverflow.com/questions/9248526/how-do-i-restore-a-property-sheet-to-its-default-value)
Now you should be able to build solution without getting errors (at least not those relating to paths of a project file).
Source:
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-24 04:18
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社