I tried to install CUDA on my JetsonTK1 following tutorial step by step.
I download CUDA 6.5 Toolkit for L4T Rel 21.2 from https://developer.nvidia.com/linux-tegra-rel-21
I install it with these command lines:
sudo dpkg -i cuda-repo-l4t-r19.2_6.0-42_armhf.deb
sudo apt-get update
sudo apt-get install cuda-toolkit-6-5
sudo usermod -a -G video $USER
I add path:
echo “# Add CUDA bin & library paths:” >> ~/.bashrc
echo “export PATH=/usr/local/cuda/bin:$PATH” >> ~/.bashrc
echo “export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH” >> ~/.bashrc
Finally when I verify if I well install cuda with “nvcc -V” command, it returns these lines:
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2014 NVIDIA Corporation
Built on Wed_Nov_12_15:57:57_CST_2014
Cuda compilation tools, release 6.5, V6.5.30
Then I installed and ran samples and when I tried to run one of them, “deviceQuery”, it returns these lines:
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
Result = FAIL
I searched on the internet in order to fix my problem but I don’t succeed.
I reinstalled the toolkit, I verify in .bashrc if the PATH was correctly added, I checked the Makefile of deviceQuery and it seems to be correct.
One strange things, in /dev directory I haven’t nvidia file, I don’t know why and I have read it should be here.
Please tell me what I can do if you know this problem.
Best regards, Quentin.
When a Jetson first arrives, there is a step to complete install…“sudo ~/NVIDIA-INSTALLER/installer.sh”…have you done this or flashed (which has the equivalent)? Without this CUDA can’t be used.
If you have done this, then to make sure nothing has overwritten the relevant files, check if anything here is not OK:
sha1sum -c /etc/nv_tegra_release
Thank you for the quick reply.
I used the installer.sh but only after the CUDA installation.
The sha1sum command returns these lines:
ubuntu@tegra-ubuntu:~$ sha1sum -c /etc/nv_tegra_release
I don’t know if the CUDA install itself would have required those installer.sh files to be in place. As I recall there may be some CUDA samples which don’t actually run on this platform, but I couldn’t tell you which ones do/don’t run. One thing which will definitely cause strange behavior is if the installer.sh was not run with sudo (the same is true if you fail to use sudo in a manual flash for the apply_binaries.sh step).
Your basic steps from the original post (other than not having had the final install step in yet) look basically correct. It may be possible you could remove and add the CUDA package back in now that installer.sh is completed, or perhaps use one of the other dpkg/apt commands to tell it to reinstall the CUDA package (I’m not an Ubuntu guy, I’m not sure which commands would be used to “freshen” a package). I have a strong feeling the issue is related to having not added the final installer.sh step first, though I can’t guarantee it. You may find it easiest to just update to L4T R21.5 (flash completes the equivalent of the install.sh step), as you’ll want something newer than the default R19.2 which the JTK1 ships with.
Finally it works.
I just flash the card and I do all steps in order to install CUDA again (I think in the same way) and it works.
So I don’t know what I did wrong the first time but thank you for your help and your quick replies.