Assertion failure at line 1440 of ../../be/cg/cgem


I tried several simple expamples from SDK and write own ones, all were ok. Now I write an algorithm and cannot compile it. Please, help me!!! I got an compilation error:

[ilgis@srv003 NW] nvcc -I../NVIDIA_CUDA_SDK/common/inc/ --verbose # SPACE=
# _HERE_=/usr/local/cuda/bin # TOP=/usr/local/cuda/bin/…
# LD_LIBRARY_PATH=/usr/local/cuda/bin/../lib:/usr/local/cuda/bin/../extools/lib:/usr/local/cuda/lib # PATH=/usr/local/cuda/bin/…/open64/bin:/usr/local/cuda/bin/…/bin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/bin:/usr/bin:.:/bin:~/bin:/usr/local/bin:/usr/local/cuda/bin:/sbin:/usr/sbin:/home/ilgis/bin
# INCLUDES="-I/usr/local/cuda/bin/../include" "-I/usr/local/cuda/bin/../include/cudart" # LIBRARIES= “-L/usr/local/cuda/bin/…/lib” -lcuda -lcudart
# gcc -E -x c++ -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"../NVIDIA_CUDA_SDK/common/inc/" -include "cuda_runtime.h" -m64 -o "/tmp/tmpxft_00003e9a_00000000-3.ii" "" # cudafe --m64 “-I/usr/local/cuda/bin/…/include” “-I/usr/local/cuda/bin/…/include/cudart” -I. --gen_c_file_name “/tmp/tmpxft_00003e9a_00000000-0.c” --gen_device_file_name “/tmp/tmpxft_00003e9a_00000000-0.gpu” --include_file_name /tmp/tmpxft_00003e9a_00000000-2.c --diag_error=host_device_limited_call --no_exceptions -tused -I"…/NVIDIA_CUDA_SDK/common/inc/" “/tmp/tmpxft_00003e9a_00000000-3.ii”
# gcc -E -x c -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"../NVIDIA_CUDA_SDK/common/inc/" -m64 -o "/tmp/tmpxft_00003e9a_00000000-4.i" "/tmp/tmpxft_00003e9a_00000000-0.gpu" # cudafe --m64 --c “-I/usr/local/cuda/bin/…/include” “-I/usr/local/cuda/bin/…/include/cudart” -I. --gen_c_file_name “/tmp/tmpxft_00003e9a_00000000-5.c” --gen_device_file_name “/tmp/tmpxft_00003e9a_00000000-5.gpu” --include_file_name /tmp/tmpxft_00003e9a_00000000-2.c --diag_error=host_device_limited_call -I"…/NVIDIA_CUDA_SDK/common/inc/" “/tmp/tmpxft_00003e9a_00000000-4.i”
# gcc -E -x c -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__CUDABE__ -I"../NVIDIA_CUDA_SDK/common/inc/" -m64 -o "/tmp/tmpxft_00003e9a_00000000-1.i" "/tmp/tmpxft_00003e9a_00000000-5.gpu" # nvopencc -TARG:sm_10 -m64 “/tmp/tmpxft_00003e9a_00000000-1.i” -o “/tmp/tmpxft_00003e9a_00000000-6.ptx”

Assertion failure at line 1440 of …/…/be/cg/cgemit.cxx:

Compiler Error in file /tmp/tmpxft_00003e9a_00000000-1.i during Assembly phase:

incorrect register class for operand 0

nvopencc INTERNAL ERROR: /usr/local/cuda/open64/lib//be returned non-zero status 1

–error 0x100 –

Please, help me how to escape this compuler bug!

Thank you

Ilghiz (2.13 KB)

This looks like a known bug. Are you seeing this with a specific SDK app, or only your own code? Is this specific to x86_64 Linux?

Sorry, I did not find it somewere else.

The application is written from the scratch. I have Fedora with Xeon 2 Gb and NVidia 8800 GTX.

Playing with different parameters I found that it is around


in the line 226 of my source.

At least I have a solution for me, however it can occur somewere else.



I just encountered this same error myself in my own code.

What exactly is the known bug, and what was the workaround?


Could it be the pointer array?
Try using indices.

I had a similar error. In my case it was a pointer array which accidentally pointed to host memory. After I fixed this everything worked fine.