CUDA VS2005 Wizard 1.2 New version of the CUDA VS2005 wizard

new version 2.0 here: [url=“http://forums.nvidia.com/index.php?showtopic=80572”]http://forums.nvidia.com/index.php?showtopic=80572[/url]

New version of the CUDA VS2005 wizard:
Support DLL lib exe wizard.
Change one item in the cuda.rules for resolve the :“A single input file is required for a non-link phase when an output file is specified” bug.

it’s easy to create a new CUDA (exe, lib, dll) project in VS2005.

It was two days work. So any problem plz let me know.

BTW, I don’t have VS2003* so this version can support VS2005 only……If necessarily, I will do it.

MD5:45e247967257d5aebf88068a0a833252
CUDA_VS_Wizard1.2.exe


VS2005 Express is done.
CUDA_VSExpress_Wizard1.2.exe
MD5:3b0d284a29e56160978944c6e84adae5
CUDA_VSExpress_Wizard1.2_MD5SUM.txt

————————————————————————————————————
Thanks Big_Mac to test it.

VS2005 x64 is done.
CUDA_VS_x64_Wizard.exe
MD5:3450cb011af8e2b3782a8dd48d678663


vs2005 Express x64 is done.
CUDA_VSExpress_x64_Wizard.exe
MD5:870c74041bfd616d023431974260f85a


C# call CUDA dll is demo is done.
CSharp_CUDA_DLL.zip
4de86bf70d1cae57acbceb0981e9d955

we can also download them:
[url=“CUDA下载地址、easy资源下载-OpenHero的资源-CSDN下载”]http://download.csdn.net/user/OpenHero[/url]
CSharp_CUDA_DLL_md5.txt (54 Bytes)
CSharp_CUDA_DLL.zip (1.11 MB)
md5.txt (66 Bytes)
CUDA_VSExpress_x64_Wizard.1.0.zip (69.1 KB)
md5.txt (57 Bytes)
CUDA_VS_x64_Wizard.1.0.zip (69.1 KB)
CUDA_VSExpress_Wizard1.2_MD5SUM.txt (64 Bytes)
CUDA_VSExpress_Wizard1.2.zip (69.1 KB)
MD5SUM.txt (57 Bytes)
CUDA_VS_Wizard1.2.zip (69.2 KB)

Can we use it with visual studio express 2005? Im using it now, and it keeps emmiting "Cant find install directory of VS2005" error. Thank you!

ok, Let me download the Express first:)

Tomorrow it will be ok:)

[code]

------ Build started: Project: test, Configuration: Debug Win32 ------

Compiling…

sample.cu

sample.cu(9) : fatal error C1083: Cannot open include file: ‘cutil.h’: No such file or directory

Project : warning PRJ0018 : The following environment variables were not found:

$(CUDA_COMMON_LIB_PATH)

$(CUDA_COMMON_INC_PATH)

[/qode]

:blink:

which one?

And you can change the $(CUDA_COMMON_LIB_PATH) into $(NVSDKCUDA_ROOT)\common\lib

$(CUDA_COMMON_INC_PATH) into $(NVSDKCUDA_ROOT)\common\inc

“CUDA_VS_Wizard1.2.zip” with vs2005

By the way, what version of CUDA is this for (1.1 or 2.0)? Does it make a difference?

$(CUDA_COMMON_LIB_PATH) & $(CUDA_COMMON_INC_PATH) are added by the wizard. so if there is a problem you can change the $(CUDA_COMMON_LIB_PATH) into $(NVSDKCUDA_ROOT)\common\lib

$(CUDA_COMMON_INC_PATH) into $(NVSDKCUDA_ROOT)\common\inc

the NVSDKCUDA_ROOT is added by NV SDK.

The wizard is for both 1.1 & 2.0 ……, it doesn’t dependent on the version of CUDA.

kyzhao,

I just want to thank you for your efforts.
The VC 64 bit wizard works flawless.

Also In VC2005 I noticed if you right click on the source page, then
choose "Outlining->Colapse to definitions " it will do a pretty good job
of picking some nice code folding places.

My mouth is watering at the thought of all this parallel stuff.

THANKS MAN!

I think it would be useful to have the possibility to edit the nvcc.exe compiler options. For instance I like to compile with “-Xptxas -v” to see the register usage. This could be added to the Menu when you rightclick on the .cu file under properties.
Also e.g. a -use_fast_math etc. switch would be neat.

Another idea I had was setting the switch “Exclude from built” to “yes” for kernel files. I.e. if the filename ends with “_kernel.cu”. Since they usually get included and not compiled.

For me I solved my problem by editing the file

“C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\cuda.rules”

and added it there.

Thanks a lot for this neat tool.

yeap:)

I’m doing the new rules those days, add more operations into it.

But I’m very busy in recently to do some other work.

please waiting some day, next week i will be ok:)

if some one make a new rules, please shared it …hehe:)

1>sample.cu(9) : fatal error C1083: … ‘cutil.h’: No such file or directory

1>project : warning PRJ0018 : …

1>$(NVSDKCUDA_ROOT)

what happen ? anybody tell me what happen to this ?

can you find NVSDKCUDA_ROOT in your PC environment?

Is it possible to use c++ in project created by this wizard?
I tried to add some includes, for example:

#include

and i got such errors:

Error 1 internal error: assertion failed at: “D:/Bld/rel/gpgpu/toolkit/r2.0/compiler/edg/EDG_3.9/src/lower_name.c”, line 4179 C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility 870
Error 2 internal error: assertion failed: gen_expr: bad expr node kind (D:/Bld/rel/gpgpu/toolkit/r2.0/compiler/edg/EDG_3.9/src/cp_gen_be.c, line 9509) C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility 3048
Error 3 fatal error C1075: end of file found before the left parenthesis ‘(’ at ‘C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility(3015)’ was matched C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility 3017

If I write code in C everything is OK.

Another issue is that if I close Visual Studio 2005 with open CUDA Solution some errors occurs. It takes place only with CUDA Project.

Yes but you need to have the C++ code in separate .cpp files in the project.

To integrate C/CUDA functions with C++ you need to use the declare them as “external” using

extern "C"

notion before the function declaration. This is because AFAIR C++ function signatures compile to a different object code than C function signatures (since they can be overloaded) - someone correct me on this one.

Here’s how it may look:

In .cpp file

//forward declaration of a C function

extern "C" void runCuda(...params...);

//extern "C" tells the cpp compiler that this is a pure C function

//your C++ code here:

class CPPClass {

...

public:

	void cppFunction() {

  runCuda(...);

	}

}

and in the .cu file

//same forward declaration

extern "C" void runCuda(...params...);

//definition

void runCuda(...params...) {

//do memcopys, kernel launches, all that CUDA stuff

	<<<256,256>>>myKernel(...params...);

}

void myKernel(...params...) {

	//kernel code here

}

Pozdrawiam ;)

I have the same problem… When I take a look inside my environment variables the NVSDKCUDA_ROOT is there.

So I hope you can help me… I’m not used to program in VS2005. Always use Linux on my work.

But at home I’m using VS2k5

So please help this VS2k5 Noob :D

Hi,

I had this problem too; but you can bypass it by forcing VS2005 to look for includes and libs in the right directories.

I’m not at my PC now; anyway there’s an “Options” submenu in VS where you can open a “VS directories” section.

There, you can find settings (path entries) for “Include”, “Libs” and others.

Just add a new entry, browse to your CUDA SDK root → \Include and repeat for \Lib .

Now the compiler and linker should find the headers and libs.

I may be more precise on Monday evening when I’m back to my PC.

Fernando

Thanks Fernando, When I’m at home I will try this. Hope you will be at home earlier to check the precise settings ;)

Jordy

I just stealed the workplace from a colleague, here it is:

Visual Studio 2005 → Options → Project and Solutions → VC++ Directories

Here, in the upper right corner, there’s “Show directories for” (default is Executable Files): change to Include files and add your SDK Include directory (where the file “cutils.h” is, anyway), then change to Library files and add your SDK Lib directory.

Bye,

Fernando

Thank you so much I will try it tonight if I don’t forget it :P

Please… I really need VS 2003…