![]() ![]() |
Apr 18 2008, 02:11 PM
Post
#1
|
|
![]() ![]() ![]() ![]() ![]() Group: Members Posts: 244 Joined: 8-November 07 Member No.: 77,682 Club SLI Member: No Org.: HKBU |
2.0 release version http://forums.nvidia.com/index.php?showtopic=83054 I've made a simple VS2005 Project Wizard for CUDA. After you install the CUDA VS2005 Wizard, you can see the CUDAWin32App in your Visual Studio installed templates Category. Then it's easy to create a new CUDA project in VS2005. This is first version only made in two days. So if there is any problem please let me know. PS: Thanks JaredHoberock's "Simple CUDA build rule for Visual Studio 2005". The new version: Modify two bug: 1, Change the CUDA_LIB_PATH into CUDA_INC_PAHT; 2, Add debug info into EmuDebug; MD5:9fc707a08946573de28b75aad2f075ca And the new version 1.2. We can get it: http://forums.nvidia.com/index.php?showtopic=69183 VS2005 Express verson is done. The x64 OS version is done. http://forums.nvidia.com/index.php?act=ST&...t=0#entry390252 This post has been edited by kyzhao: Dec 2 2008, 01:14 PM
Attached File(s)
CUDA_VS2005_Wizard.zip ( 45.52K )
Number of downloads: 2436
MD5SUM.md5.txt ( 58bytes )
Number of downloads: 600-------------------- |
|
|
|
Apr 18 2008, 06:16 PM
Post
#2
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 539 Joined: 20-March 08 From: Poland Member No.: 96,927 Org.: Wroclaw University of Technology, Poland |
Thanks! The generated "hello cuda!" compiles and runs well. I haven't made any real tests yet.
|
|
|
|
Apr 19 2008, 12:44 AM
Post
#3
|
|
![]() Group: Members Posts: 3 Joined: 27-December 07 Member No.: 85,152 |
Thanks Kaiyong, this is really helpful
|
|
|
|
Apr 24 2008, 07:02 AM
Post
#4
|
|
![]() ![]() ![]() ![]() ![]() Group: Members Posts: 244 Joined: 8-November 07 Member No.: 77,682 Club SLI Member: No Org.: HKBU |
hi, every body:) need more items into the wizard? if so, I will continue to do it.
This post has been edited by kyzhao: Apr 24 2008, 07:04 AM -------------------- |
|
|
|
May 8 2008, 09:16 PM
Post
#5
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 539 Joined: 20-March 08 From: Poland Member No.: 96,927 Org.: Wroclaw University of Technology, Poland |
I've just had a Windows reinstall and a clean install of VS2005 and CUDA toolkit. I've found a little inconvenience. By default, the sample code has:
CODE #include <cuda_runtime.h> The <..> mean the include file is searched within VS specified includes directory, which is not yet set for CUDA after a fresh install. I usually add CUDA/include dir into VC++ directories anyway but to make this wizard foolproof you might want to add a rule to account for it (is possible) This post has been edited by _Big_Mac_: May 8 2008, 09:17 PM |
|
|
|
May 9 2008, 01:45 AM
Post
#6
|
|
![]() ![]() ![]() ![]() Group: Members Posts: 51 Joined: 10-April 08 Member No.: 99,662 |
Hello _Big_Mac_
I used the VS2005 Project Wizard to create a new project... But my VS couldn't fine the <cutil.h> & <cuda_runtime.h>... How to include the directory to tell VS the correct path and get the *.h I check "template" (SDK project) and "wizard project "... the "template" vcproj file includes the "CUDA_INC_PATH" but the "wizard project " doesn't have it ... Is the main reason that my VS couldn't find the <cutil.h> & <cuda_runtime.h>...? thanks~~ |
|
|
|
May 9 2008, 05:03 AM
Post
#7
|
|
![]() ![]() ![]() ![]() ![]() Group: Members Posts: 244 Joined: 8-November 07 Member No.: 77,682 Club SLI Member: No Org.: HKBU |
QUOTE(_Big_Mac_ @ May 9 2008, 05:16 AM) I've just had a Windows reinstall and a clean install of VS2005 and CUDA toolkit. I've found a little inconvenience. By default, the sample code has: CODE #include <cuda_runtime.h> The <..> mean the include file is searched within VS specified includes directory, which is not yet set for CUDA after a fresh install. I usually add CUDA/include dir into VC++ directories anyway but to make this wizard foolproof you might want to add a rule to account for it (is possible) [right][snapback]374441[/snapback][/right] Thanks:) But the error is not here. It's me made a mistake in the Wizard set the -I with $(CUDA_LIB_PATH). It should be CUDA_INC_PATH. - -hehe I will update it in the next version. BTW, the include <...> means search from the INCLUDE environment and the directories that specified by the /I compiler option. http://msdn.microsoft.com/en-us/library/36k2cdd4(VS.80).aspx And always we use <...> to distinguish "system environment & SDK" from our sources. -------------------- |
|
|
|
May 9 2008, 05:04 AM
Post
#8
|
|
![]() ![]() ![]() ![]() ![]() Group: Members Posts: 244 Joined: 8-November 07 Member No.: 77,682 Club SLI Member: No Org.: HKBU |
QUOTE(Huang Wei Hao @ May 9 2008, 09:45 AM) Hello _Big_Mac_ I used the VS2005 Project Wizard to create a new project... But my VS couldn't fine the <cutil.h> & <cuda_runtime.h>... How to include the directory to tell VS the correct path and get the *.h I check "template" (SDK project) and "wizard project "... the "template" vcproj file includes the "CUDA_INC_PATH" but the "wizard project " doesn't have it ... Is the main reason that my VS couldn't find the <cutil.h> & <cuda_runtime.h>...? thanks~~ [right][snapback]374520[/snapback][/right] Change the CUDA_LIB_PATH to CUDA_INC_PATH in the wizard project -------------------- |
|
|
|
May 9 2008, 06:38 AM
Post
#9
|
|
![]() ![]() ![]() ![]() Group: Members Posts: 51 Joined: 10-April 08 Member No.: 99,662 |
Hello~kyzhao
You mean I change in vcproj... or in VS->projects->properties->Linker->General-> Additional Libraries Directories -> $(CUDA_LIB_PATH);../../common/lib Thanks~!! |
|
|
|
May 9 2008, 06:47 AM
Post
#10
|
|
![]() ![]() ![]() ![]() ![]() Group: Members Posts: 244 Joined: 8-November 07 Member No.: 77,682 Club SLI Member: No Org.: HKBU |
QUOTE(Huang Wei Hao @ May 9 2008, 02:38 PM) Hello~kyzhao You mean I change in vcproj... or in VS->projects->properties->Linker->General-> Additional Libraries Directories -> $(CUDA_LIB_PATH);../../common/lib Thanks~!! [right][snapback]374616[/snapback][/right] VS->projects->properties->CUDA->General->Additional include Directories->$(CUDA_LIB_PATH) ---------->$(CUDA_INC_PATH) -------------------- |
|
|
|
May 12 2008, 05:44 PM
Post
#11
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 539 Joined: 20-March 08 From: Poland Member No.: 96,927 Org.: Wroclaw University of Technology, Poland |
I've did that and now an error occurs during linking:
CODE Linking... LINK : fatal error LNK1104: cannot open file '.\Debug\CUDAWin32App1.obj' Build log was saved at "file://d:\projekty_dev\test2\CUDAWin32App1\CUDAWin32App1\Debug\BuildLog.htm" I've added the build log as an attachment.
Attached File(s)
|
|
|
|
May 16 2008, 06:05 PM
Post
#12
|
|
![]() ![]() ![]() ![]() ![]() Group: Members Posts: 244 Joined: 8-November 07 Member No.: 77,682 Club SLI Member: No Org.: HKBU |
QUOTE(_Big_Mac_ @ May 13 2008, 01:44 AM) I've did that and now an error occurs during linking: CODE Linking... LINK : fatal error LNK1104: cannot open file '.\Debug\CUDAWin32App1.obj' Build log was saved at "file://d:\projekty_dev\test2\CUDAWin32App1\CUDAWin32App1\Debug\BuildLog.htm" I've added the build log as an attachment. [right][snapback]376013[/snapback][/right] There is no Debug Category in your program category. -------------------- |
|
|
|
May 19 2008, 10:27 PM
Post
#13
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 539 Joined: 20-March 08 From: Poland Member No.: 96,927 Org.: Wroclaw University of Technology, Poland |
QUOTE(kyzhao @ May 16 2008, 08:05 PM) There is no Debug Category in your program category. I still can't get it to work. I can compile and link in EmuDebug mode but when I try to debug it, VS says "Debugging information cannot be found or does not match. Binary was not built with debug information". I fixed this by manually editing Properties->Linker->Debugging and setting Generate Debug Info to on, as per Debug configuration. EmuRelease works fine. Ordinary Debug does what I described earlier. Release mode gives me: CODE LINK : fatal error LNK1181: cannot open input file '.\release\wizardtest.obj' Build log was saved at "file://d:\NVIDIA CUDA SDK\projects\wizardTest\wizardTest\Release\BuildLog.htm" wizardtest - 1 error(s), 0 warning(s) (build log in attachment) I compared build logs from the failed Release and Debug modes with the successfully linked Emu modes and found one difference: One of the command lines looks like this in Release build log: CODE /OUT:"Release\wizardtest.exe" And here's the successfully linked EmuRelease CODE /OUT:"D:\NVIDIA CUDA SDK\projects\wizardtest\EmuRelease\wizardtest.exe" I noticed EmuRelease version has a complete path and Release doesn't. Can this be the case? If so, how to fix it? Edit: I changed it so that all configurations use complete paths and it didn't help. This post has been edited by _Big_Mac_: May 19 2008, 11:04 PM
Attached File(s)
|
|
|
|
May 19 2008, 10:45 PM
Post
#14
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 539 Joined: 20-March 08 From: Poland Member No.: 96,927 Org.: Wroclaw University of Technology, Poland |
|
|
|
|
May 20 2008, 07:29 AM
Post
#15
|
|
![]() ![]() ![]() ![]() ![]() Group: Members Posts: 244 Joined: 8-November 07 Member No.: 77,682 Club SLI Member: No Org.: HKBU |
I guess the error is not the set of OUT path. Because the path is created by the VS, in "$(OutDir)\$(ProjectName).exe"
Can you find the wizardtest.obj in the Release Category? If can't the error is about the linker. If so, the error is the obj compiler. If there is also error, can you send me the project? -------------------- |
|
|
|
May 20 2008, 10:38 AM
Post
#16
|
|
![]() Group: Members Posts: 5 Joined: 21-March 08 Member No.: 97,082 |
Hi kyzhao,
thanks for your great wizard. I tried to add additional header files to the helloCuda project (my name of the project is CUDAOraTest). I set an additional full include path to the folder containing the additional header file, but I only get the project running, if I place the header file in the same directory as the .cu file. nvcc compiler options: nvcc.exe -ccbin "C:\Programme\Microsoft Visual Studio 8\VC\bin" -c -DWIN32 -D_DEBUG -D_CONSOLE -Xcompiler "/EHsc /W3 /nologo /Wp64 /Od /Zi /RTC1 /MD " -IC:\Programme\NVIDIA\CUDAToolKit\lib -IC:\Oracle\product\11.1.0\db_1\OCI\include -IC:\Paddy\Programmierung\CUDAOracle\CUDAOraTest\CUDAOraTest\inc -o Debug\CUDAOraTest.obj CUDAOraTest.vcproj If the headerfile is in the directory "C:\Paddy\Programmierung\CUDAOracle\CUDAOraTest\CUDAOraTest" everything is working fine. If i move the headerfile to "C:\Paddy\Programmierung\CUDAOracle\CUDAOraTest\CUDAOraTest\inc" the compiler doesn't find the header file. I tried to include the headerfile with <headerfile.h> and "headerfile.h", both not working. What am I doing wrong? Can you help me? I'd like to get more structure to my project with "inc" and "src" folder. Thanks Paddy |
|
|
|
May 20 2008, 11:09 AM
Post
#17
|
|
![]() ![]() ![]() ![]() ![]() Group: Members Posts: 244 Joined: 8-November 07 Member No.: 77,682 Club SLI Member: No Org.: HKBU |
QUOTE(PaddyH @ May 20 2008, 06:38 PM) Hi kyzhao, thanks for your great wizard. I tried to add additional header files to the helloCuda project (my name of the project is CUDAOraTest). I set an additional full include path to the folder containing the additional header file, but I only get the project running, if I place the header file in the same directory as the .cu file. nvcc compiler options: nvcc.exe -ccbin "C:\Programme\Microsoft Visual Studio 8\VC\bin" -c -DWIN32 -D_DEBUG -D_CONSOLE -Xcompiler "/EHsc /W3 /nologo /Wp64 /Od /Zi /RTC1 /MD " -IC:\Programme\NVIDIA\CUDAToolKit\lib -IC:\Oracle\product\11.1.0\db_1\OCI\include -IC:\Paddy\Programmierung\CUDAOracle\CUDAOraTest\CUDAOraTest\inc -o Debug\CUDAOraTest.obj CUDAOraTest.vcproj If the headerfile is in the directory "C:\Paddy\Programmierung\CUDAOracle\CUDAOraTest\CUDAOraTest" everything is working fine. If i move the headerfile to "C:\Paddy\Programmierung\CUDAOracle\CUDAOraTest\CUDAOraTest\inc" the compiler doesn't find the header file. I tried to include the headerfile with <headerfile.h> and "headerfile.h", both not working. What am I doing wrong? Can you help me? I'd like to get more structure to my project with "inc" and "src" folder. Thanks Paddy [right][snapback]379919[/snapback][/right] I guess you add the headerfile by the VS2005 directly. And then move the headerfile into inc directory? If so, first you should delete it from the project, second move the file into inc directory, and then add the file into the project. When you use the headerfile, it doesn't need to add the "-IC:\Paddy\Programmierung\CUDAOracle\CUDAOraTest\CUDAOraTest\inc", if you create the headerfile yourself. And you can use it in your source file like this: #include "./inc/headerfile.h", that the source file is in the CUDAOraTest category, and the headerfile is in the CUDAOraTest\inc category. -------------------- |
|
|
|
May 20 2008, 12:31 PM
Post
#18
|
|
![]() Group: Members Posts: 5 Joined: 21-March 08 Member No.: 97,082 |
QUOTE(kyzhao @ May 20 2008, 01:09 PM) I guess you add the headerfile by the VS2005 directly. And then move the headerfile into inc directory? If so, first you should delete it from the project, second move the file into inc directory, and then add the file into the project. When you use the headerfile, it doesn't need to add the "-IC:\Paddy\Programmierung\CUDAOracle\CUDAOraTest\CUDAOraTest\inc", if you create the headerfile yourself. And you can use it in your source file like this: #include "./inc/headerfile.h", that the source file is in the CUDAOraTest category, and the headerfile is in the CUDAOraTest\inc category. [right][snapback]379922[/snapback][/right] When I use #include "./inc/headerfile.h" it's working. But now the compiler doesn't find cuda_runtime.h, although I changed $(CUDA_LIB_PATH) to $(CUDA_INC_PATH) in VS->projects->properties->CUDA->General->Additional include Directories. |
|
|
|
May 20 2008, 02:03 PM
Post
#19
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 539 Joined: 20-March 08 From: Poland Member No.: 96,927 Org.: Wroclaw University of Technology, Poland |
QUOTE(kyzhao @ May 20 2008, 09:29 AM) I guess the error is not the set of OUT path. Because the path is created by the VS, in "$(OutDir)\$(ProjectName).exe" Can you find the wizardtest.obj in the Release Category? If can't the error is about the linker. If so, the error is the obj compiler. If there is also error, can you send me the project? [right][snapback]379854[/snapback][/right] There's no wizardtest.obj in Release folder. There are wizardtest.obj files in EmuRelease and EmuDebug folders. I've attached the zipped project folder
Attached File(s)
|
|
|
|
May 21 2008, 01:22 AM
Post
#20
|
|
![]() ![]() ![]() ![]() ![]() Group: Members Posts: 244 Joined: 8-November 07 Member No.: 77,682 Club SLI Member: No Org.: HKBU |
QUOTE(PaddyH @ May 20 2008, 08:31 PM) When I use #include "./inc/headerfile.h" it's working. But now the compiler doesn't find cuda_runtime.h, although I changed $(CUDA_LIB_PATH) to $(CUDA_INC_PATH) in VS->projects->properties->CUDA->General->Additional include Directories. [right][snapback]379941[/snapback][/right] Can you show me the nvcc compiler options? -------------------- |
|
|
|
![]() ![]() |
| Copyright 2008 NVIDIA Corporation. Terms of Use | Legal Info | Privacy Policy | Time is now: 24th November 2009 - 09:46 PM |