CUDA installation

Started by
1 comment, last by Misery 12 years, 9 months ago
Hi Guys,

For several days I have been trying to run CUDA Hello world program. I have tried to go trough a few tutorials...
But i can't make it work :(
Woluld someone be so kind to write step by step what I do need to install and how to configure Microsoft Visual Studio 2008
to use with CUDA. I think I have installed everything, or at least everything that was mentioned but I still have no working CUDA API.

I am interested to use CUDA v4.0 with MSVS 2008 with C++ language.

I am absolute noob in GPU programming and I can hardly begin to do it myself.

I'll be grateful for any help.
Thanks in advance,
Regards
Advertisement
How about you tell us what you're actually having a problem with?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]


How about you tell us what you're actually having a problem with?


Really, I have a problem with absolutely everything concerning CUDA.
I have tried following tutorials and solutions and none of them worked:
tutorial 1
tutorial2
post1
post2
post3

I have GTX 480 GPU, intel i7 on asus motherboard.
I have installed Visual Studio Pro (MSDNAA) 2008 SP1 for C/C++ development.
I am using Windows 7 x64 but for now I am trying to build cuda hello world as a 32 bit program and I have included proper libraries.
(x64 didn't work either).

I have installed CUDA: Toolkit v4.0 and CUDA tools v4.0 and sample codes, and newest developer drivers.
After installing Parallel Insight 2.0 I cannot compile anything using Visual Studio 2008 or 2010 because my AVG Anti-Virus detects compiled any program as a threat.
Also programs that use no CUDA. I cannot even compile now a program that is just a Win32 empty template created by MSVS 2008.
Before istallation of nVidia insight AVG caused no problems.

CUDA example programs work well. However when I try to compile their source codes I get error saying that I do not have[font="Arial Black"] cutil32D.lib[/font].
I am trying to build this library but when I open solution cutil_VS2008.sln it builds and no lib or dll file is created.
But as far as I managed to find out I dont need this file to compile simple hello program.

I make a VS 2008 project:
C++ -> console Win32 and I make a following code:

#include "stdafx.h"
#include <cuda.h>

__global__ void HelloGPU(void){}

int _tmain(int argc, _TCHAR* argv[])
{
HelloGPU<<<1,1>>>();
return 0;
}

(I did add all required nVidia lib,inc,bin paths to enviroment)
I change the rules to
CUDA Runtime API Build Rule (v4.0)
and
CUDA Driver API Build Rule (v4.0)

I also tried:
CUDA Driver API Build Rule
CUDA Runtime API Build Rule


CUDA Driver API Build Rule (v3.2)
CUDA Runtime API Build Rule (v3.2)


and of course non of those worked.

(I disabled AVG anti-virus)
I changed file extention to *.cu and build so I get following error:
release:

1>------ Build started: Project: HelloWorld, Configuration: Release Win32 ------
1>Compiling with CUDA Build Rule...
1>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\\bin\nvcc.exe" -arch sm_10 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\\include" -maxrregcount=0 -m32 -cubin -o "C:\Misery\Moje projekty\CUDA\HelloWorld\Release/HelloWorld.cubin" HelloWorld.cu
1>HelloWorld.cu
1>c:/Misery/Moje projekty/CUDA/HelloWorld/HelloWorld/HelloWorld.cu(10): error: a __global__ function call must be configured
1>1 error detected in the compilation of "C:/Users/Misery/AppData/Local/Temp/tmpxft_00000900_00000000-6_HelloWorld.cpp4.ii".
1>Project : error PRJ0019: A tool returned an error code from "Compiling with CUDA Build Rule..."
1>Build log was saved at "file://c:\Misery\Moje projekty\CUDA\HelloWorld\HelloWorld\Release\BuildLog.htm"
1>HelloWorld - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0

debug:

1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>Compiling with CUDA Build Rule...
1>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\\bin\nvcc.exe" -arch sm_10 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\\include" -maxrregcount=0 -m32 -cubin -o "C:\Misery\Moje projekty\CUDA\HelloWorld\Debug/HelloWorld.cubin" HelloWorld.cu
1>HelloWorld.cu
1>c:/Misery/Moje projekty/CUDA/HelloWorld/HelloWorld/HelloWorld.cu(10): error: a __global__ function call must be configured
1>1 error detected in the compilation of "C:/Users/Misery/AppData/Local/Temp/tmpxft_00000910_00000000-6_HelloWorld.cpp4.ii".
1>Project : error PRJ0019: A tool returned an error code from "Compiling with CUDA Build Rule..."
1>Build log was saved at "file://c:\Misery\Moje projekty\CUDA\HelloWorld\HelloWorld\Debug\BuildLog.htm"
1>HelloWorld - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I also have tried CUDA WIZARD and this didn't help either
I have tried many ways to make it work, all failed :(

Therefore I am asking for a detailed step by step tutorial how to run CUDA simpliest program.

[EDIT] At first i tried to compile program using command line and nvcc but then i got linker error altough MS linker has been added to
PATH so I decided that it would be easier to use MSVS integration.

Regards,
Misery

This topic is closed to new replies.

Advertisement