CUDA 3.0beta SDK build testing On Ubuntu 9.04 and FC11

In short, I successfully built all the CUDA 3.0 SDK examples on both platforms.

In details,
On Ubuntu 9.04
[indent] With gcc 4.3.3, verbose=1 make is going to end no any problem.
- Why not Nvidia guys reduce those building warnings to minimum or even null? It’s very easy at syntax level.
- If any warning cannot be removed, there may be some root cause from app or tools. Right?

On FC11
[indent] With gcc 4.4.1 and nvcc compiler flag -fno-inline
- the projects which do not #include <shrUtils.h> can be built smoothly, same as in version 2.3. In CUDA 2.3 SDK examples, shrUtils.h is not included at all, so we care why we need this…

- others else that #include <shrUtils.h> stop compiling on a deprecated symbol of __builtin_stdarg_start
 [indent]+ comment #include <rendercheckGL.h> in shrUtils.h, the projects not using GL will go through. So we need to think why put rendercheckGL.h in shrUtils.h? shrUtils.h does not depends on it at all. This is not a good practice in header file design!
  + but some projects need <rendercheckGL.h>, then simply add one line #include <rendercheckGL.h> in postProcessGL/main.cpp, volumeRender.cpp, and particles.cpp, because they directly depends on this file.
  + bandwidthTest cannot be compiled yet. Yeah, this is caused by the incompatibility of nvcc to gcc/g++ 4.4.x (fail to instantiation even if you #include <string> for the string declaration). But why bandwithTest has to be a .cu file, except it proves nvcc is a good invoker? for testing bandwidth semantics, all can be done at host side, surely it can kick-off a device_to_device DMA transfer. So just change .cu to .cpp, and Makefile to compile .cpp.
  + all done


Conclusion: CUDA SDK can be built successfully with MINIMUM and REASONABLE changes to projects, methodology in which may bring the SDK less dependency to building tools like gcc 4.4.1 issue. Nvidia CUDA team may shape an maximum independent application SDK to insulate with building tools evolution. I do not think that ‘better’ gcc tool chain ever be an obstacle.

Maybe just as I never met it, however,

Next: Sorry, Ubuntu 9.10 is stuck. I upgrade my 9.04 to be there for further test.

In short, all the CUDA 3.0 SDK examples were built on Ubuntu 9.10 with gcc 4.4.1-4ubuntu8

In details, first follow the same modifications on FC11. Then
[indent] memcpy and memset declarations in /usr/local/cuda/bin/…/include/common_functions.h needed to be commented at this moment. Acknowledge to nvta, workaround for gcc 4.4 , as memcpy and memset are always-inline attribute
I think Nvidia guys need to sort here out in a direct way for host and device functions as this file is a non-user level

Conclusion: All done, but need to change a CUDA system header file.

Actually, maybe the simplest way, just change override nvcc options O2 with O0, which brings minor difference only to host code in .cu file

that means CUDA 3.0beta SDK is working with gcc 4.4 (=ubuntu 9.10) ??

is there a download for non registered developers ??

Or can everybody become a registered developer?

Yes and No:

No, same as 2.3, building can not be completed with gcc 4.4 by default configuration. Point is that nvcc -O2 brings those conflicts…

Yes, I built them with gcc 4.4 on Ubuntu 9.10, nvcc -O0 (g++ still uses -O2)…or disable those weak inline decalartion

That’s right. You need to apply a registered account. I did it very early and passed a check.

That’s all very interesting!!

I was wondering if you have any idea about this :

I have ubuntu 9.04 and I can successfully run projects with cuda 2.3 , on emulation mode, cause I don’t have a cuda enabled gpu.
Can I install cuda 3.0 without uninstalling 2.3 , so I can test it without loosing the working 2.3 toolkit?

I was thinking of entering a different than the default path, when the toolkit asks, during installation.

Up until now I was unsuccessful cause no matter what path I entered It echoed the message that I have an other cuda installation in /usr/local/bin/cuda , with a question If i want to uninstall it or not.

What do you think?