My system is Ubuntu 10.10 (amd64, latest)
$ uname -a
Linux ndesk 2.6.35-27-generic #48-Ubuntu SMP Tue Feb 22 20:25:46 UTC 2011 x86_64 GNU/Linux
I tried to compile SDK samples (gpucomputingsdk_3.2.16_linux.run) with gcc-4.4
$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
There were many warnings (dirty code? or new compiler incompatibility?), and it stopped with error:
$ make
make[1]: Entering directory `/home/pianist/NVIDIA_GPU_Computing_SDK/C/common'
In file included from src/bank_checker.cpp:15:
./../common/inc/bank_checker.h:34: warning: type qualifiers ignored on function return type
./../common/inc/bank_checker.h:220: warning: type qualifiers ignored on function return type
src/bank_checker.cpp:57: warning: type qualifiers ignored on function return type
src/bank_checker.cpp:259: warning: type qualifiers ignored on function return type
In file included from ./../common/inc/stopwatch.h:18,
from src/cutil.cpp:33:
./../common/inc/stopwatch_base.h:56: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_base.h:60: warning: type qualifiers ignored on function return type
In file included from ./../common/inc/stopwatch_base.h:72,
from ./../common/inc/stopwatch.h:18,
from src/cutil.cpp:33:
./../common/inc/stopwatch_base.inl:67: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_base.inl:78: warning: type qualifiers ignored on function return type
In file included from ./../common/inc/stopwatch.h:25,
from src/cutil.cpp:33:
./../common/inc/stopwatch_linux.h:46: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_linux.h:50: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_linux.h:126: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_linux.h:143: warning: type qualifiers ignored on function return type
In file included from src/cutil.cpp:33:
./../common/inc/stopwatch.h:35: warning: type qualifiers ignored on function return type
In file included from src/cutil.cpp:34:
./../common/inc/bank_checker.h:34: warning: type qualifiers ignored on function return type
./../common/inc/bank_checker.h:220: warning: type qualifiers ignored on function return type
In file included from ./../common/inc/stopwatch.h:18,
from src/stopwatch.cpp:17:
./../common/inc/stopwatch_base.h:56: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_base.h:60: warning: type qualifiers ignored on function return type
In file included from ./../common/inc/stopwatch_base.h:72,
from ./../common/inc/stopwatch.h:18,
from src/stopwatch.cpp:17:
./../common/inc/stopwatch_base.inl:67: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_base.inl:78: warning: type qualifiers ignored on function return type
In file included from ./../common/inc/stopwatch.h:25,
from src/stopwatch.cpp:17:
./../common/inc/stopwatch_linux.h:46: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_linux.h:50: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_linux.h:126: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_linux.h:143: warning: type qualifiers ignored on function return type
In file included from src/stopwatch.cpp:17:
./../common/inc/stopwatch.h:35: warning: type qualifiers ignored on function return type
src/stopwatch.cpp:71: warning: type qualifiers ignored on function return type
In file included from src/stopwatch_linux.cpp:15:
./../common/inc/stopwatch_linux.h:46: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_linux.h:50: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_linux.h:126: warning: type qualifiers ignored on function return type
./../common/inc/stopwatch_linux.h:143: warning: type qualifiers ignored on function return type
a - obj/x86_64/release/bank_checker.cpp.o
a - obj/x86_64/release/cmd_arg_reader.cpp.o
a - obj/x86_64/release/cutil.cpp.o
a - obj/x86_64/release/stopwatch.cpp.o
a - obj/x86_64/release/stopwatch_linux.cpp.o
a - obj/x86_64/release/multithreading.cpp.o
make[1]: Leaving directory `/home/pianist/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Entering directory `/home/pianist/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Leaving directory `/home/pianist/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Entering directory `/home/pianist/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Leaving directory `/home/pianist/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Entering directory `/home/pianist/NVIDIA_GPU_Computing_SDK/shared'
make[1]: Leaving directory `/home/pianist/NVIDIA_GPU_Computing_SDK/shared'
make -C src/simplePrintf/
make[1]: Entering directory `/home/pianist/NVIDIA_GPU_Computing_SDK/C/src/simplePrintf'
<b>simplePrintf.cu(30): error: calling a host function from a __device__/__global__ function is only allowed in device emulation mode</b>
1 error detected in the compilation of "/tmp/tmpxft_0000408a_00000000-6_simplePrintf.compute_20.cpp1.ii".
make[1]: *** [obj/x86_64/release/simplePrintf.cu_10.o] Error 2
make[1]: Leaving directory `/home/pianist/NVIDIA_GPU_Computing_SDK/C/src/simplePrintf'
make: *** [src/simplePrintf/Makefile.ph_build] Error 2
I tried gcc-4.3 (made clean, of course), but it failed with the same error.
Some programs compile well, for example:
$ ./deviceQuery
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
There is 1 device supporting CUDA
Device 0: "GeForce GTS 450"
CUDA Driver Version: 3.20
CUDA Runtime Version: 3.0
CUDA Capability Major/Minor version number: 2.1
Total amount of global memory: 1072889856 bytes
Multiprocessors x Cores/MP = Cores: 4 (MP) x 48 (Cores/MP) = 192 (Cores)
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 32768
Warp size: 32
Maximum number of threads per block: 1024
Maximum sizes of each dimension of a block: 1024 x 1024 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Clock rate: 1.57 GHz
Concurrent copy and execution: Yes
Run time limit on kernels: Yes
Integrated: No
Support host page-locked memory mapping: Yes
Compute mode: Default (multiple host threads can use this device simultaneously)
Concurrent kernel execution: Yes
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 3.20, CUDA Runtime Version = 3.0, NumDevs = 1, Device = GeForce GTS 450
PASSED
Press <Enter> to Quit...
Any ideas? How to fix compilation?
Also, how to become Nvidia Developer and test SDK 4.0? I filled the form, but no e-mail received. :(