Editor or IDE for CUDA ?

:geek:

Hi i’m new here.

Im searching for an CUDA enabled Editor (for windows 7) with all the necessary preconfigurations to write my CUDA code.

So far i’ve tryed to run CUDA on VS2008 an Netbeans (c/c++) an was unable neither to compile (netbeans) nor to write useful code (VS08) on those IDEs, regardless of all the plug ins/modifications/bla bla bla …, because the VS08 doesn’t have an option to create new .cu files or even empty projects to select, and netbeans is even worse.
Even on linux the whole thing is a mess. While you have to search for every single bit, from sudo how to install the sdk toolkit and some other thinks an then the compiler wont work.

All i’m asking for is an CUDA enabled editor or IDE for Windows or Linux (ubuntu in my case) without hour long searching on how to run CUDA on it.

Otherwise an quick to guide on how to enable those IDEs in the right way (especially VS08) would be nice.

And yes i’ve searched the whole net for those things to work, but i dint found any really helpful solution.
I’m using an 9600M GT with the latest 195.55 driver and the CUDA 2.3 SDK and Toolkit.

Nvidia may publish the headers , libraries, and other stuff to work around CUDA but an editor of its own without using third party programs such as VS08 or Netbeans, in this case, would be really nice and spare us not so ingenious programmers much time.

Thx for your answers and thx for the help.

CUDA integrates nicely with VS. Have you tried the VS Wizard? I use it on Win 7 x64 + VS 2008

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

Note, there’s a small bug described here
http://forums.nvidia.com/index.php?showtop…st&p=604256

Make sure not to mix up 32 and 64 bit versions, it’s a common source of problems.

You will be able to create new .cu files and CUDA projects.

Also, see http://forums.nvidia.com/index.php?showtopic=100283

well…

app example on VS08 may run…

but i still cant:

  • add new .cu files through “add new item” (renaming c++ or txt in .cu files causes build errors)

  • create empty cuda projects trough “project…”

  • doesn’t highlight code in .cu files

  • must copy a thousand times cutil64.dll around till it releases the program …

  • must add a “thousand” new libraries not to cause build errors

  • and even then its not sure if it runs

so, all in all its not even beta, sry for the ugly truth

Hmm - really don’t know (and don’t care) about Windows, but as far as CUDA development under Linux concerned, I’d say not that many developers are interested in IDEs, so this is probably why these are not supported well. However, support for traditional type of Linux development tools is very good, so if you really want to give Linux a try, then use CUDA mode for Emacs if you really can’t live without syntax highlighting and that kind of stuff, and further just use recently released CMake 2.8.0 (FindCUDA module is built-in now) as your build system, and you’re done.

You can just create an ordinary console project and then add .cu files to this project (see next point).

If you add the CUDA build rules (Cuda.rules, distributed with the SDK) then VS will automatically detect the .cu files and pass them to nvcc to compile these to standard .obj files, the standard linker (link.exe) will then link these with the rest of your application’s .obj files.

See the instructions in (SDK_INSTALL_DIR)\C\doc\syntax_highlighting\visual_studio_8

Cutil is used to minimise code replication between the SDK samples. I’d advise understanding what you actually need and implementing it yourself. For example, most people only want the cuda safe call macros and you would be better off handling the error in a manner suitable for your app rather than just calling exit().

By “thousand” do you mean one (cudart.lib)?! Ok, so you’re using cutil so you need cutil64.lib too. But by definition using any library (and the CUDA API is provided through a library) you have to link with libraries.

Can’t help with that one (without more info).

I would advise the following.

Preparation:

    Set up syntax highlighting

    Set up Intellisense

Development:

    Create a new, empty, console project (or you can use an existing project if you have one

    Add your .c, .cpp and .cu files

    Add the Cuda.rules

    Modify C/C++ code generation to use /MT in release, /MTd in debug

    Do the same for the Cuda code generation

    Add cudart.lib to all configurations (i.e. release and debug)

    Build, run, debug etc.