Hello, I am trying to compile CUDA files in a Raspberry Pi 3 B+. I am using
Ubuntu 18.04 with the kernel 5.4.0
and I have installed CUDA Toolkit 11.2 Update 2(11.2.152
).
The CUDA installation (without GPU driver) is successful, but in the Post Installation Actions, the CUDA examples does not compile with make and no more information about the failure is displayed.
By other way, if I try to compile this dummy example with nvcc sometimes it compiles, sometimes it does not and a core dump message is show without more information.
Any ideas?
Thank you.
Update: I share the output of compilation with the --verbose option to both “Segmentation fault” and “Successful compilation” cases.
#$ _NVVM_BRANCH_=nvvm
#$ _SPACE_=
#$ _CUDART_=cudart
#$ _HERE_=/usr/local/cuda-11.2/bin
#$ _THERE_=/usr/local/cuda-11.2/bin
#$ _TARGET_SIZE_=
#$ _TARGET_DIR_=
#$ _TARGET_DIR_=targets/sbsa-linux
#$ TOP=/usr/local/cuda-11.2/bin/..
#$ NVVMIR_LIBRARY_DIR=/usr/local/cuda-11.2/bin/../nvvm/libdevice
#$ LD_LIBRARY_PATH=/usr/local/cuda-11.2/bin/../lib:/usr/local/cuda-11.2/lib64
#$ PATH=/usr/local/cuda-11.2/bin/../nvvm/bin:/usr/local/cuda-11.2/bin:/usr/local/cuda-11.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
#$ INCLUDES="-I/usr/local/cuda-11.2/bin/../targets/sbsa-linux/include"
#$ LIBRARIES= "-L/usr/local/cuda-11.2/bin/../targets/sbsa-linux/lib/stubs" "-L/usr/local/cuda-11.2/bin/../targets/sbsa-linux/lib"
#$ CUDAFE_FLAGS=
#$ PTXAS_FLAGS=
#$ gcc -D__CUDA_ARCH__=520 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS -D__CUDACC__ -D__NVCC__ "-I/usr/local/cuda-11.2/bin/../targets/sbsa-linux/include" -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=2 -D__CUDACC_VER_BUILD__=152 -D__CUDA_API_VER_MAJOR__=11 -D__CUDA_API_VER_MINOR__=2 -include "cuda_runtime.h" "saxpy.cu" -o "/tmp/tmpxft_000021e3_00000000-9_saxpy.cpp1.ii"
#$ cicc --c++14 --gnu_version=70500 --orig_src_file_name "saxpy.cu" --allow_managed --unsigned_chars --unsigned_wchar_t -arch compute_52 -m64 --no-version-ident -ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name "tmpxft_000021e3_00000000-3_saxpy.fatbin.c" -tused --gen_module_id_file --module_id_file_name "/tmp/tmpxft_000021e3_00000000-4_saxpy.module_id" --gen_c_file_name "/tmp/tmpxft_000021e3_00000000-6_saxpy.cudafe1.c" --stub_file_name "/tmp/tmpxft_000021e3_00000000-6_saxpy.cudafe1.stub.c" --gen_device_file_name "/tmp/tmpxft_000021e3_00000000-6_saxpy.cudafe1.gpu" "/tmp/tmpxft_000021e3_00000000-9_saxpy.cpp1.ii" -o "/tmp/tmpxft_000021e3_00000000-6_saxpy.ptx"
Segmentation fault (core dumped)
# --error 0x8b --
#$ _NVVM_BRANCH_=nvvm
#$ _SPACE_=
#$ _CUDART_=cudart
#$ _HERE_=/usr/local/cuda-11.2/bin
#$ _THERE_=/usr/local/cuda-11.2/bin
#$ _TARGET_SIZE_=
#$ _TARGET_DIR_=
#$ _TARGET_DIR_=targets/sbsa-linux
#$ TOP=/usr/local/cuda-11.2/bin/..
#$ NVVMIR_LIBRARY_DIR=/usr/local/cuda-11.2/bin/../nvvm/libdevice
#$ LD_LIBRARY_PATH=/usr/local/cuda-11.2/bin/../lib:/usr/local/cuda-11.2/lib64
#$ PATH=/usr/local/cuda-11.2/bin/../nvvm/bin:/usr/local/cuda-11.2/bin:/usr/local/cuda-11.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
#$ INCLUDES="-I/usr/local/cuda-11.2/bin/../targets/sbsa-linux/include"
#$ LIBRARIES= "-L/usr/local/cuda-11.2/bin/../targets/sbsa-linux/lib/stubs" "-L/usr/local/cuda-11.2/bin/../targets/sbsa-linux/lib"
#$ CUDAFE_FLAGS=
#$ PTXAS_FLAGS=
#$ gcc -D__CUDA_ARCH__=520 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS -D__CUDACC__ -D__NVCC__ "-I/usr/local/cuda-11.2/bin/../targets/sbsa-linux/include" -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=2 -D__CUDACC_VER_BUILD__=152 -D__CUDA_API_VER_MAJOR__=11 -D__CUDA_API_VER_MINOR__=2 -include "cuda_runtime.h" "saxpy.cu" -o "/tmp/tmpxft_000021ec_00000000-9_saxpy.cpp1.ii"
#$ cicc --c++14 --gnu_version=70500 --orig_src_file_name "saxpy.cu" --allow_managed --unsigned_chars --unsigned_wchar_t -arch compute_52 -m64 --no-version-ident -ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name "tmpxft_000021ec_00000000-3_saxpy.fatbin.c" -tused --gen_module_id_file --module_id_file_name "/tmp/tmpxft_000021ec_00000000-4_saxpy.module_id" --gen_c_file_name "/tmp/tmpxft_000021ec_00000000-6_saxpy.cudafe1.c" --stub_file_name "/tmp/tmpxft_000021ec_00000000-6_saxpy.cudafe1.stub.c" --gen_device_file_name "/tmp/tmpxft_000021ec_00000000-6_saxpy.cudafe1.gpu" "/tmp/tmpxft_000021ec_00000000-9_saxpy.cpp1.ii" -o "/tmp/tmpxft_000021ec_00000000-6_saxpy.ptx"
#$ ptxas -arch=sm_52 -m64 "/tmp/tmpxft_000021ec_00000000-6_saxpy.ptx" -o "/tmp/tmpxft_000021ec_00000000-10_saxpy.sm_52.cubin"
#$ fatbinary -64 --cicc-cmdline="-ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 " -no-asm "--image3=kind=elf,sm=52,file=/tmp/tmpxft_000021ec_00000000-10_saxpy.sm_52.cubin" "--image3=kind=ptx,sm=52,file=/tmp/tmpxft_000021ec_00000000-6_saxpy.ptx" --embedded-fatbin="/tmp/tmpxft_000021ec_00000000-3_saxpy.fatbin.c"
#$ rm /tmp/tmpxft_000021ec_00000000-3_saxpy.fatbin
#$ gcc -E -x c++ -D__CUDACC__ -D__NVCC__ "-I/usr/local/cuda-11.2/bin/../targets/sbsa-linux/include" -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=2 -D__CUDACC_VER_BUILD__=152 -D__CUDA_API_VER_MAJOR__=11 -D__CUDA_API_VER_MINOR__=2 -include "cuda_runtime.h" "saxpy.cu" -o "/tmp/tmpxft_000021ec_00000000-5_saxpy.cpp4.ii"
#$ cudafe++ --c++14 --gnu_version=70500 --orig_src_file_name "saxpy.cu" --allow_managed --unsigned_chars --unsigned_wchar_t --m64 --parse_templates --gen_c_file_name "/tmp/tmpxft_000021ec_00000000-6_saxpy.cudafe1.cpp" --stub_file_name "tmpxft_000021ec_00000000-6_saxpy.cudafe1.stub.c" --module_id_file_name "/tmp/tmpxft_000021ec_00000000-4_saxpy.module_id" "/tmp/tmpxft_000021ec_00000000-5_saxpy.cpp4.ii"
#$ gcc -D__CUDA_ARCH__=520 -c -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS "-I/usr/local/cuda-11.2/bin/../targets/sbsa-linux/include" "/tmp/tmpxft_000021ec_00000000-6_saxpy.cudafe1.cpp" -o "/tmp/tmpxft_000021ec_00000000-11_saxpy.o"
#$ nvlink --arch=sm_52 --register-link-binaries="/tmp/tmpxft_000021ec_00000000-7_a_dlink.reg.c" -m64 "-L/usr/local/cuda-11.2/bin/../targets/sbsa-linux/lib/stubs" "-L/usr/local/cuda-11.2/bin/../targets/sbsa-linux/lib" -cpu-arch=AARCH64 "/tmp/tmpxft_000021ec_00000000-11_saxpy.o" -lcudadevrt -o "/tmp/tmpxft_000021ec_00000000-12_a_dlink.sm_52.cubin"
#$ fatbinary -64 --cicc-cmdline="-ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 " -no-asm -link "--image3=kind=elf,sm=52,file=/tmp/tmpxft_000021ec_00000000-12_a_dlink.sm_52.cubin" --embedded-fatbin="/tmp/tmpxft_000021ec_00000000-8_a_dlink.fatbin.c"
#$ rm /tmp/tmpxft_000021ec_00000000-8_a_dlink.fatbin
#$ gcc -c -x c++ -DFATBINFILE="\"/tmp/tmpxft_000021ec_00000000-8_a_dlink.fatbin.c\"" -DREGISTERLINKBINARYFILE="\"/tmp/tmpxft_000021ec_00000000-7_a_dlink.reg.c\"" -I. -D__NV_EXTRA_INITIALIZATION= -D__NV_EXTRA_FINALIZATION= -D__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ "-I/usr/local/cuda-11.2/bin/../targets/sbsa-linux/include" -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=2 -D__CUDACC_VER_BUILD__=152 -D__CUDA_API_VER_MAJOR__=11 -D__CUDA_API_VER_MINOR__=2 "/usr/local/cuda-11.2/bin/crt/link.stub" -o "/tmp/tmpxft_000021ec_00000000-13_a_dlink.o"
#$ g++ -Wl,--start-group "/tmp/tmpxft_000021ec_00000000-13_a_dlink.o" "/tmp/tmpxft_000021ec_00000000-11_saxpy.o" "-L/usr/local/cuda-11.2/bin/../targets/sbsa-linux/lib/stubs" "-L/usr/local/cuda-11.2/bin/../targets/sbsa-linux/lib" -lcudadevrt -lcudart_static -lrt -lpthread -ldl -Wl,--end-group -o "a.out"