Hi, i wanna test cuda on linux also. What kind of software do u guys use for developing cuda applications on linux? I’m a total newby in the linux world.
Just pull up any text editor (I use kate or VIM) and a console and start typing away!
I like kate as a GUI text editor, but I tend to use vim more often since I’m too lazy to reach over to the mouse and click.
I save obsessively in VIM. As soon as I type something, I save. Problem is, when going from VIM to Kate, I keep ending up with ‘:w’ all over the place in my code. I’m just glad the Esc key doesn’t have any major function in Kate, or I’d be in big trouble…
hehe, I did the same thing for a while. Compilers tend not to like that. Somewhere down the line my saving habit learned to be context sensitive, so it doesn’t happen much any more.
emacs editor and terminal
KDevelop for me. I like the convenience of an actual, full-blown IDE.
Personally Eclipse, alas I found it hard to maintain a project which needs invocation of nvcc for the kernel code, while invoking gcc/g++ for C/C++ only files.
I found that using nvcc for all files works just fine for me.
Really? What if you need special flags passed to the gcc/g++ compiler front-end? what if you need the g++ specific front-end to be invoked? Maybe I’m still a noob at this, and these are straightforward answers…
No problem, nvcc will pass on flags specified using -Xcompiler to the host compiler (g++ in this case) and anything specified using -Xopencc to the CUDA compiler. There are similar options for linker, PTX assembler, cudafe options…
I think nvcc calls the normal g++ binary so that the entire compiler is run, from preprocessor through all compilation stages. The only thing nvcc would do is split out the device code - since there is none, it should pass on the source file 1-to-1.
I use CMake + FindCUDA.cmake to handle all the makefile generation and take care of that. It will compile all .cu files with nvcc and all .cpp files with g++.
Thanks, I’m still a noob at invoking the nvcc driver. Alas, the CDT wont really conform to this, as it’ll try to pass optimization flags as they are to nvcc. It can be used with CDT as long as you do your own makefiles I believe. CDT isn’t very flexible about replacing the compiler from my experience. I wonder if anyone’s working on a CDT extension that will enable easier integration with CUDA.