CUDA compile trouble

Same problem with new version…

Same problem with new version…

Do you have a good reason to use gcc 2.95.4? It is an ancient compiler (it will be 10 years old soon) and it’s not even an official GNU release. For some reason nvcc does not play well with 2.95.4.

If you really need to get nvcc working with that compiler, try to run

nvcc -c -I/usr/local/cuda/include -I/user/NVIDIA_GPU_Computing_SDK/C/common/inc -arch=sm_10 /user/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu --verbose

and report the output.

What is “cuda_runtime.h: ??? ??? ??? ??? ???” ? All I see is a bunch of question marks. Is it something in your native language?

Do you have a good reason to use gcc 2.95.4? It is an ancient compiler (it will be 10 years old soon) and it’s not even an official GNU release. For some reason nvcc does not play well with 2.95.4.

If you really need to get nvcc working with that compiler, try to run

nvcc -c -I/usr/local/cuda/include -I/user/NVIDIA_GPU_Computing_SDK/C/common/inc -arch=sm_10 /user/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu --verbose

and report the output.

What is “cuda_runtime.h: ??? ??? ??? ??? ???” ? All I see is a bunch of question marks. Is it something in your native language?

Unfortunately, yes. I was severely limited by this version of compiler(

Output:

[root@MCBC ~]# nvcc -c -I/usr/local/cuda/include -I/root/NVIDIA_GPU_Computing_SDK/C/common/inc -arch=sm_10 /root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu --verbose

#$ _SPACE_=

#$ _CUDART_=cudart

#$ _HERE_=/usr/local/cuda/bin

#$ _THERE_=/usr/local/cuda/bin

#$ _TARGET_SIZE_=

#$ TOP=/usr/local/cuda/bin/..

#$ LD_LIBRARY_PATH=/usr/local/cuda/bin/../lib:/usr/local/cuda/bin/../extools/lib::/usr/local/cula/lib:/usr/local/cuda/lib

#$ PATH=/usr/local/cuda/bin/../open64/bin:/usr/local/cuda/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/bpi/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/cuda/bin

#$ INCLUDES="-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"

#$ LIBRARIES=  "-L/usr/local/cuda/bin/../lib" -lcudart

#$ CUDAFE_FLAGS=

#$ OPENCC_FLAGS=

#$ PTXAS_FLAGS=

#$ gcc -D__CUDA_ARCH__=100 -E -x c++   -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS  "-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"   -I. -D__CUDACC__ -C  -I"/usr/local/cuda/include" -I"/root/NVIDIA_GPU_Computing_SDK/C/common/inc" -include "cuda_runtime.h" -m32 -malign-double -o "/tmp/tmpxft_00000585_00000000-4_vectorAdd.cpp1.ii" "/root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu"

cpp0: cuda_runtime.h: ??? ?????? ????? ??? ????????

# --error 0x1 --

No), I see is a bunch of question marks too.

Unfortunately, yes. I was severely limited by this version of compiler(

Output:

[root@MCBC ~]# nvcc -c -I/usr/local/cuda/include -I/root/NVIDIA_GPU_Computing_SDK/C/common/inc -arch=sm_10 /root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu --verbose

#$ _SPACE_=

#$ _CUDART_=cudart

#$ _HERE_=/usr/local/cuda/bin

#$ _THERE_=/usr/local/cuda/bin

#$ _TARGET_SIZE_=

#$ TOP=/usr/local/cuda/bin/..

#$ LD_LIBRARY_PATH=/usr/local/cuda/bin/../lib:/usr/local/cuda/bin/../extools/lib::/usr/local/cula/lib:/usr/local/cuda/lib

#$ PATH=/usr/local/cuda/bin/../open64/bin:/usr/local/cuda/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/bpi/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/cuda/bin

#$ INCLUDES="-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"

#$ LIBRARIES=  "-L/usr/local/cuda/bin/../lib" -lcudart

#$ CUDAFE_FLAGS=

#$ OPENCC_FLAGS=

#$ PTXAS_FLAGS=

#$ gcc -D__CUDA_ARCH__=100 -E -x c++   -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS  "-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"   -I. -D__CUDACC__ -C  -I"/usr/local/cuda/include" -I"/root/NVIDIA_GPU_Computing_SDK/C/common/inc" -include "cuda_runtime.h" -m32 -malign-double -o "/tmp/tmpxft_00000585_00000000-4_vectorAdd.cpp1.ii" "/root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu"

cpp0: cuda_runtime.h: ??? ?????? ????? ??? ????????

# --error 0x1 --

No), I see is a bunch of question marks too.

There are some ideas for what operating system is installed for me and cuda toolkit that I use.
Operating system I use is based on an old issue of Red Hat Linux. May be toolkit that i’m download do not work by this cause. I try to download another toolkit with him and try to…

There are some ideas for what operating system is installed for me and cuda toolkit that I use.
Operating system I use is based on an old issue of Red Hat Linux. May be toolkit that i’m download do not work by this cause. I try to download another toolkit with him and try to…

Nevertheless, it may be trying to output something in a different language. If you type “export LANG=C” and rerun nvcc, that may be sufficient to display the error in English.

Does cuda_runtime.h exist in /usr/local/cuda/include, and does the user have the privileges to read it?

Nevertheless, it may be trying to output something in a different language. If you type “export LANG=C” and rerun nvcc, that may be sufficient to display the error in English.

Does cuda_runtime.h exist in /usr/local/cuda/include, and does the user have the privileges to read it?

From /usr/local/cuda/doc/CUDA_Toolkit_Release_Notes_Linux.txt

--------------------------------------------------------------------------------

Supported Linux Distros

--------------------------------------------------------------------------------

Distro        Kernel              GCC   GLIBC

------        ------              ---   -----

RHEL-4.8      2.6.9-89            3.4.6  2.3.4

RHEL-5.5      2.6.18-194          4.1.2  2.5

Fedora 13     2.6.33.3-85         4.4.4  2.12

SUSE-11.2     2.6.31.5-0.1        4.4.1  2.10.1

SLED-11       2.6.32.12.0.7       4.3.4  2.11.1

Ubuntu 10.04  2.6.32-21           4.4.3  2.11.1

My kernel

[root@MCBC doc]# uname -a

Linux MCBC 2.4.32-vniins42hugemem #1 SMP Пнд Окт 26 00:09:38 MSK 2009 i686 i686 i386 GNU/Linux

this may be the cause of inoperability?

From /usr/local/cuda/doc/CUDA_Toolkit_Release_Notes_Linux.txt

--------------------------------------------------------------------------------

Supported Linux Distros

--------------------------------------------------------------------------------

Distro        Kernel              GCC   GLIBC

------        ------              ---   -----

RHEL-4.8      2.6.9-89            3.4.6  2.3.4

RHEL-5.5      2.6.18-194          4.1.2  2.5

Fedora 13     2.6.33.3-85         4.4.4  2.12

SUSE-11.2     2.6.31.5-0.1        4.4.1  2.10.1

SLED-11       2.6.32.12.0.7       4.3.4  2.11.1

Ubuntu 10.04  2.6.32-21           4.4.3  2.11.1

My kernel

[root@MCBC doc]# uname -a

Linux MCBC 2.4.32-vniins42hugemem #1 SMP Пнд Окт 26 00:09:38 MSK 2009 i686 i686 i386 GNU/Linux

this may be the cause of inoperability?

It’s definitely not the kernel. (I’m not saying that the toolkit will work with your kernel - maybe it won’t - but the kernel version wouldn’t cause the compilation failure.) It’s either the compiler or something else. Please check that the file cuda_runtime.h is present and readable.

It’s definitely not the kernel. (I’m not saying that the toolkit will work with your kernel - maybe it won’t - but the kernel version wouldn’t cause the compilation failure.) It’s either the compiler or something else. Please check that the file cuda_runtime.h is present and readable.

[root@MCBC doc]# export LANG=C

[root@MCBC doc]# nvcc -c -I/usr/local/cuda/include -I/root/NVIDIA_GPU_Computing_SDK/C/common/inc -arch=sm_10 /root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu --verbose

#$ _SPACE_=

#$ _CUDART_=cudart

#$ _HERE_=/usr/local/cuda/bin

#$ _THERE_=/usr/local/cuda/bin

#$ _TARGET_SIZE_=

#$ TOP=/usr/local/cuda/bin/..

#$ LD_LIBRARY_PATH=/usr/local/cuda/bin/../lib:/usr/local/cuda/bin/../extools/lib::/usr/local/cula/lib:/usr/local/cuda/lib

#$ PATH=/usr/local/cuda/bin/../open64/bin:/usr/local/cuda/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/bpi/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/cuda/bin

#$ INCLUDES="-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"

#$ LIBRARIES=  "-L/usr/local/cuda/bin/../lib" -lcudart

#$ CUDAFE_FLAGS=

#$ OPENCC_FLAGS=

#$ PTXAS_FLAGS=

#$ gcc -D__CUDA_ARCH__=100 -E -x c++   -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS  "-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"   -I. -D__CUDACC__ -C  -I"/usr/local/cuda/include" -I"/root/NVIDIA_GPU_Computing_SDK/C/common/inc" -include "cuda_runtime.h" -m32 -malign-double -o "/tmp/tmpxft_00000662_00000000-4_vectorAdd.cpp1.ii" "/root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu"

cpp0: cuda_runtime.h: No such file or directory

# --error 0x1 --
ll /usr/local/cuda/include/

...

-rw-r--r-- 1 root root  46659 Oct 26 11:12 cuda_runtime.h

...

Hence the difference in kernel versions may not be a problem? Version of the compiler also does not match

[root@MCBC doc]# export LANG=C

[root@MCBC doc]# nvcc -c -I/usr/local/cuda/include -I/root/NVIDIA_GPU_Computing_SDK/C/common/inc -arch=sm_10 /root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu --verbose

#$ _SPACE_=

#$ _CUDART_=cudart

#$ _HERE_=/usr/local/cuda/bin

#$ _THERE_=/usr/local/cuda/bin

#$ _TARGET_SIZE_=

#$ TOP=/usr/local/cuda/bin/..

#$ LD_LIBRARY_PATH=/usr/local/cuda/bin/../lib:/usr/local/cuda/bin/../extools/lib::/usr/local/cula/lib:/usr/local/cuda/lib

#$ PATH=/usr/local/cuda/bin/../open64/bin:/usr/local/cuda/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/bpi/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/cuda/bin

#$ INCLUDES="-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"

#$ LIBRARIES=  "-L/usr/local/cuda/bin/../lib" -lcudart

#$ CUDAFE_FLAGS=

#$ OPENCC_FLAGS=

#$ PTXAS_FLAGS=

#$ gcc -D__CUDA_ARCH__=100 -E -x c++   -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS  "-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"   -I. -D__CUDACC__ -C  -I"/usr/local/cuda/include" -I"/root/NVIDIA_GPU_Computing_SDK/C/common/inc" -include "cuda_runtime.h" -m32 -malign-double -o "/tmp/tmpxft_00000662_00000000-4_vectorAdd.cpp1.ii" "/root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu"

cpp0: cuda_runtime.h: No such file or directory

# --error 0x1 --
ll /usr/local/cuda/include/

...

-rw-r--r-- 1 root root  46659 Oct 26 11:12 cuda_runtime.h

...

Hence the difference in kernel versions may not be a problem? Version of the compiler also does not match

Notice that nvcc passes

-include "cuda_runtime.h"

as part of the command line to gcc. I think that the meaning of ‘-include’ was slightly changed since the release of 2.95.4. I looked up the description of that command line option in 2.95.3 docs and in 3.4.6 docs, and it is different.

As a crude workaround, try to copy cuda_runtime.h into the current directory where you launch nvcc.

Notice that nvcc passes

-include "cuda_runtime.h"

as part of the command line to gcc. I think that the meaning of ‘-include’ was slightly changed since the release of 2.95.4. I looked up the description of that command line option in 2.95.3 docs and in 3.4.6 docs, and it is different.

As a crude workaround, try to copy cuda_runtime.h into the current directory where you launch nvcc.

I did it and tried again

[root@MCBC ~]# nvcc -c -I/usr/local/cuda/include -I/root/NVIDIA_GPU_Computing_SDK/C/common/inc -arch=sm_10 /root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu --verbose

#$ _SPACE_=

#$ _CUDART_=cudart

#$ _HERE_=/usr/local/cuda/bin

#$ _THERE_=/usr/local/cuda/bin

#$ _TARGET_SIZE_=

#$ TOP=/usr/local/cuda/bin/..

#$ LD_LIBRARY_PATH=/usr/local/cuda/bin/../lib:/usr/local/cuda/bin/../extools/lib::/usr/local/cula/lib:/usr/local/cuda/lib

#$ PATH=/usr/local/cuda/bin/../open64/bin:/usr/local/cuda/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/bpi/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/cuda/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/cuda/bin

#$ INCLUDES="-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"

#$ LIBRARIES=  "-L/usr/local/cuda/bin/../lib" -lcudart

#$ CUDAFE_FLAGS=

#$ OPENCC_FLAGS=

#$ PTXAS_FLAGS=

#$ gcc -D__CUDA_ARCH__=100 -E -x c++   -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS  "-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"   -I. -D__CUDACC__ -C  -I"/usr/local/cuda/include" -I"/root/NVIDIA_GPU_Computing_SDK/C/common/inc" -include "cuda_runtime.h" -m32 -malign-double -o "/tmp/tmpxft_00001123_00000000-4_vectorAdd.cpp1.ii" "/root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu"

In file included from /usr/local/cuda/bin/../include/vector_types.h:46,

                 from /usr/local/cuda/bin/../include/builtin_types.h:46,

                 from cuda_runtime.h:53,

                 from /root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu:1:

/usr/local/cuda/bin/../include/host_defines.h:121: warning: invalid character in macro parameter name

/usr/local/cuda/bin/../include/host_defines.h:121: badly punctuated parameter list in `#define'

# --error 0x1 --

[root@MCBC ~]#

you want to say that the transition to version 3.4.6 can solve this problem?

I did it and tried again

[root@MCBC ~]# nvcc -c -I/usr/local/cuda/include -I/root/NVIDIA_GPU_Computing_SDK/C/common/inc -arch=sm_10 /root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu --verbose

#$ _SPACE_=

#$ _CUDART_=cudart

#$ _HERE_=/usr/local/cuda/bin

#$ _THERE_=/usr/local/cuda/bin

#$ _TARGET_SIZE_=

#$ TOP=/usr/local/cuda/bin/..

#$ LD_LIBRARY_PATH=/usr/local/cuda/bin/../lib:/usr/local/cuda/bin/../extools/lib::/usr/local/cula/lib:/usr/local/cuda/lib

#$ PATH=/usr/local/cuda/bin/../open64/bin:/usr/local/cuda/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/lib/qt-3.3.3/bin:/usr/local/kde/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/bpi/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/cuda/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/cuda/bin

#$ INCLUDES="-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"

#$ LIBRARIES=  "-L/usr/local/cuda/bin/../lib" -lcudart

#$ CUDAFE_FLAGS=

#$ OPENCC_FLAGS=

#$ PTXAS_FLAGS=

#$ gcc -D__CUDA_ARCH__=100 -E -x c++   -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS  "-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart"   -I. -D__CUDACC__ -C  -I"/usr/local/cuda/include" -I"/root/NVIDIA_GPU_Computing_SDK/C/common/inc" -include "cuda_runtime.h" -m32 -malign-double -o "/tmp/tmpxft_00001123_00000000-4_vectorAdd.cpp1.ii" "/root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu"

In file included from /usr/local/cuda/bin/../include/vector_types.h:46,

                 from /usr/local/cuda/bin/../include/builtin_types.h:46,

                 from cuda_runtime.h:53,

                 from /root/NVIDIA_GPU_Computing_SDK/C/src/vectorAdd/vectorAdd.cu:1:

/usr/local/cuda/bin/../include/host_defines.h:121: warning: invalid character in macro parameter name

/usr/local/cuda/bin/../include/host_defines.h:121: badly punctuated parameter list in `#define'

# --error 0x1 --

[root@MCBC ~]#

you want to say that the transition to version 3.4.6 can solve this problem?