A couple of "Getting Started" questions Some simple questions...

Hello everybody, i am trying for days now to figure out how to create a simple program on CUDA and run it but every time smthg is going wrong… :angry:
Anyway here as some questions of mine:

  1. To simulate a program i am compiling it by “Emurealease” and when i want to run it with the actual G80 i am compiling with “Release”?

  2. Could someone to write me how to create a simple Hello world program? :">

The SDK has many nice examples ranging from simple Hello World to using OpenGL and the FFT and BLAS libs.

Peter

I have seen some sample programs but nowhere i can find the classic HelloWorld source file

CUDA doesn’t really support strings, so “hello world” is a bit difficult :)

The “scalarprod” and “simpleGL” examples are probably your best starting points.

if i were you, i would by he bitonicSort. I find this application the best to begin programming with CUDA. As i’ve understood, the GPU computing wasn’t created to execute programms such as the basic “hello world”.

Actually to be honest i am looking forward to create some mathematic programs like generating powers of pi or generating prime numbers… These are the kind of programs that i would like to create to take avantage of the multi thread ability of G80… So with these new info any further instructions of how to get started? :unsure: :mellow:

In this thread, there is a simple code to add two vectors.

http://forums.nvidia.com/index.php?showtopic=34309

Copy the code in a file add_vector.cu
Compile it with nvcc: nvcc -o add_vector add_vector.cu
Run it: ./add_vector

If you don’t have a Cuda capable GPU, compile it in emulation mode:
nvcc -deviceemu -o add_vector_emu add_vector.cu
Run it: ./add_vector_emu