which tool is best for executing cuda program?

hi to all,

i am learning basics of cuda now.

recently i heard about mathematica tool and it is supporting cuda also.

i got the above information from the following weblink

they(mathematica) are saying that we need not write entire cuda program in their tool because of

cudalink feature in the mathematica tool.

so, please suggest me the best way to execute the cuda program.

thanking you all,

regards,
balakrishna.

It really depends what you want to do/compute and how far in abstractions you want to delve into performancewise. That link is basically saying that Mathematica can use CUDA to accelerate certain operations as compared to CPU. Be more specific and perhaps others can help.

If you’re proficient in Mathematica already, then yes, that might be the best idea for you. You can also call C/CUDA code via compiled mex files in matlab, or just simple C… or Fortran… whatever you’re most comfortable with.

@vacaloca

many thanks for your reply.

i joined my research program very recently, till now i did not decide my application.

now iam at the beginning stage.

iam not proficient in mathematica.

i think you got the thing now.

so, suggest me the better option to execute the cuda program.

CUDA is (mainly marketed as) an extension of the C language… If you do not know C, you might want to google a few tutorials to teach yourself how to do basic things like variable manipulation, file input/output, etc. It might be that some CUDA tutorial also emcompasses the basics of C language as well, but I’m not aware of any.

As far as suggestions… set up the CUDA SDK on your PC… and look at the examples given, manipulate them, run other examples, compile your own programs… that’s a good way to learn.

If whatever algorithm you have (or plan to do) benefits from parallelization techniques to speed it up, then CUDA would be a good way to exploit that. For that matter you don’t need to use CUDA, you can also learn OpenCL, which is compatible with both AMD and NVIDIA cards – the basis is the same, it’s an extension of C language to run programs on GPUs and take advantage of the inherent parallelism.

@vacaloca

i know the c language, now iam learning the cuda by reading the book “CUDA by example an introduction to general purpose computing”.

i downloaded the cuda sdk, visual studio 2008, 2010 and nvidia nsight visual studio edition.

iam facing difficulties in running cuda programs from cuda samples browser.

can you tell me, how to execute them.

iam awaiting for your reply.

thanking you

You need to be more explicit as to what errors or issues you’re having. Try starting with running a simple deviceQuery example. If that doesn’t run, it meeans you need a CUDA capable card, most likely – that means pretty much any NVIDIA card released dating back to the G80 architecture or so.

please explain me how to run simple devicequery example using nsight visual studio (or) visual studio 2010, 2008.

in nvidia cuda samples browser, i run cuda c code samples, on clicking run a command window appears and closed in 2 (or) 3 seconds.

i didn’t understand what the problem is?

please explain me how to run the cuda program

i am awaiting for your reply.

thanking you

you can navigate to the samples directory, open the .sln file with visual studio, and run it.

There is probably no problem… the program ran in those 2 or 3 seconds :p
You want to run these from a cmd window that you have already opened up after you have navigated to the samples directory.

As alrikai mentioned you can also use VS to open the code and set breakpoints of your choosing and step through. If you wish to debug kernel code eventually you’ll need Nsight for Visual Studio.

@vacaloca

if you dont mind, can you explain the steps of executing cuda program through command prompt, visual studio, nvidia nsight visual studio…( like where should we write the code, execution, where the output is stored?)

i am awaiting for your reply.

Thanking you a lot,

regards,
balakrishna.