Simple CUDA Wizard for Visual Studio 2005

I read your build log, and find the error:

Compiling…

CUDAWin32App1.cu

tmpxft_00000d84_00000000-3.gpu

tmpxft_00000d84_00000000-7.gpu

‘nvopencc’ is not recognized as an internal or external command,

operable program or batch file.

“nvopencc” is used in your compile process? It’s un-normal.

The compiler of CUDA is nvcc in 32bit OS, but not nvopencc.

And your project is built complete in my PC, both Debug & Release, no error.

So, I guess there are some errors about your CUDA toolkit? Maybe you can reinstall it?

my 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\include -IC:\Oracle\product\11.1.0\db_1\OCI\include -o Debug\CUDAOraTest.obj CUDAOraTest.vcproj

I checked if cuda_runtime.h is in C:\Programme\NVIDIA\CUDAToolKit\include. The header file is in this folder.

I found out that for the HelloCuda project you can comment the line “include <cuda_runtime.h>” and the the projekt is still working

I’ve reinstalled but it didn’t help.

So I added the directory with nvopencc to VC++ directories. It compiled and runs now.

Then I removed this directory and instead added $(CUDA_BIN_PATH). It works :)

So CUDA_BIN_PATH includes the path to nvopencc. Also, there’s no mention of using nvopencc in the buildlog so it might actually be normal, just unnoticeable.

In order to use the wizard, the user should first add $(CUDA_BIN_PATH), $(CUDA_INC_PATH) and perhaps $(CUDA_LIB_PATH) to the appropriate VC++ directories.

Yes, don’t need to move the cuda_runtime.h into your category, keep it in the toolkit include category.

Don’t need add the add nvopencc or $(CUDA_BING_PATH) into the VC++ directories. If you add the nvopencc into this directories, the VS will compiler the cu by the nvopencc first, so it’s error!

And it also don’t need add $(CUDA_INC_PATH) and perhaps $(CUDA_LIB_PATH) to VC++ directories:) Because the wizard content them itself.

So how to fix my problem with compiling in release mode?

Delete all the categories about CUDA added in the VC++ Directories.

And install my new version wizard.

:)

I’ve installed the new wizard (from the first post) and deleted $(CUDA_BIN_PATH), INC, and LIB from VC++ directories. It doesn’t work :(

Compiling...

wizardtest3.cu

tmpxft_00000424_00000000-3.gpu

tmpxft_00000424_00000000-7.gpu

'nvopencc' is not recognized as an internal or external command,

operable program or batch file.

Compiling manifest to resources...

Linking...

LINK : fatal error LNK1104: cannot open file '.\debug\wizardtest3.obj'

I don’t know why the compiler nvopencc in your PC is an internal or external command?

The nvcc.profile doesn’t work?

Can you compiler the example project in the SDK example category?

Interesting thing.

I can compile the example projects fine without CUDA_BIN_PATH in VC++ directories and just relying on the project properties. However, when I renamed nvopencc.exe, the example projects didn’t compile as well

Deleting intermediate and output files for project 'histogram64', configuration 'Release|Win32'

Performing Custom Build Step

histogram64.cu

tmpxft_00000bb0_00000000-3.gpu

tmpxft_00000bb0_00000000-7.gpu

'nvopencc' is not recognized as an internal or external command,

operable program or batch file.

Compiling...

histogram64_gold.cpp

Linking...

LINK : fatal error LNK1181: cannot open input file '.\release\histogram64.obj'

So nvopencc is also needed to compile example projects with default project settings, only it’s not explicitly indicated anywhere. Are you sure I shouldn’t need it? Try renaming nvopencc.exe to something else and see if you can compile.

nvopencc is need and it’s very important for us to compiler the cu file.

The strange thing is that the nvopencc is “an internal or external command” when you use the wizard. But the example works well. :wacko:

AFAIK the “not recognized as an internal or external command” means it wasn’t found.

When I open a command line (dos shell) and enter “nvopencc” it does this:

C:\Documents and Settings\maciek>nvopencc

'nvopencc' is not recognized as an internal or external command,

operable program or batch file.

That’s different than if I enter “nvcc” (it pukes documentation)

So the directory with “nvopencc” is not defined in the PATH variable that the system searches for commands. More on internal and external commands here http://support.microsoft.com/kb/71986

This is why I have to add $(CUDA_BIN_PATH) to my VC++ directories.

I know it.

But the nvcc will set the nvopencc into the PATH variable using the nvcc.profile ( in the bin category) when the nvcc is called. We don’t need to set them by ourself.

So I’m very strange about why it doesn’t work in yours’. :wacko:

hehe, any way, you can Set the $(CUDA_BIN_PATH) in the VC++ directories to solve it. External Media

  1. Which Nvidia GPU card?

  2. Which Driver for the GPU card?

If you are working with the Emulation. The HelloCUDA should go well.
And you should change the
if(!InitCUDA()) {
return 0;
} when your card can’t support CUDA, but want to work with the Emulation.

If you read this by now, I found the answer and am removing my post.

If you didn’t read this, don’t worry about it.