Driver Recompile Necessary after GCC upgrade?

I’ve installed CUDA on CentOS 5.4 x86_64, and everything appears to be OK. The current version of GCC on the system is 4.1.x.

I’m thinking about upgrading to GCC 4.4.0 using the gcc44 technology preview package. This might solve some problems that I am having with building PyCUDA.

If I upgrade the GCC version, will the CUDA installation need to be started from scratch? In other words, do I need to always make sure that the driver, toolkit, and SDK have been compiled against the version of GCC that is installed?

This is for a home system, so some experimentation is OK.


Cuda presently doesn’t work with gcc 4.4.

Thanks for the heads up. I was thinking about rolling back to CentOS 5.3 in order to stay with a supported platform anyway. Maybe it would be better to use the gcc43 package on CentOS 5.3, and start from scratch.

The CUDA SDK may be doesn’t, but my own CUDA code does. Compiled several kernels with gcc 4.4.2 in OpenSuSE 11.2, compiles and runs with results same as gcc 4.3.x versions. Caveat: I am only compiling to .so libraries to be used from Python.

there are lots of things that do not work with gcc 4.4. it is a bad idea to use it and CUDA at the same time, even if you try to hack around it by modifying your standard includes, and if you have a bug on it right now we probably won’t be able to do anything for you.

Thanks. I’ll keep that in mind for the a project I am starting right now for a company in southern Germany. They are using C/C++, whether Linux or Windows I have not figured out yet. If it is Linux, I’ll use gcc4.3 as they pay for getting results. For my own stuff, CUDA called from Python (only), I have so far not had any unpleasant surprises.

It might be limited to CUDART, which you wouldn’t hit with pycuda stuff.

I am using my own Python bindings, not Andreas Kloeckner’s PyCuda, and I am using the runtime API. The only problem I have had, since about 2.2 or so, is that wrapping CUDA kernels with extern “C” { … } still gives me C++ mangled names and I have to run the mangled names through c++filt, to figure out the unmangled name. But I’ll keep an eye on my results from now on, having started to use gcc 4.4 only recently.

I compiled gcc 4.3.3 from source, and have it installed as an alternate to gcc 4.1 on CentOS 5.4. Is it a good idea to reinstall the CUDA driver, toolkit and SDK using 4.3.3, or does it not really matter?


The toolkit and SDK shouldn’t matter. The driver must be compiled with whatever compiled the kernel, so that means the stock gcc 4.1, I guess.

While it is probably recommended practice, I have on occasion been able to compile the driver with a version of gcc different from the version used for kernel compilation. The driver install issued the appropriate warnings, but I ignored them and did not have any problems afterwards. However I do not claim that to be a generally valid result.