Setting up CUDA programming in Ubuntu is actually very simple. Only one thing to note is the driver. I don't know why NVIDIA also provides the cudadriver_2.3_linux_32_190.18 driver when downloading CUDA, I tried it. Although the driver can be installed normally, an error will pop up when the graphic interface is started, and the graphic interface cannot be started normally. Finally go to NVIDIA to download the latest NVIDIA-Linux-x86-190.42-pkg1.
Setting up CUDA programming in Ubuntu is actually very simple. Only one thing to note is the driver. I don't know why NVIDIA also provides the cudadriver_2.3_linux_32_190.18 driver when downloading CUDA, I tried it. Although the driver can be installed normally, an error will pop up when the graphic interface is started, and the graphic interface cannot be started normally. Finally go to the NVIDIA official download the latest NVIDIA-Linux-x86-190.42-pkg1.run driver, after testing can run the CUDA sample program. The following describes the installation steps.
1. Download The CUDA Toolkit and SDK package. You do not need to download the cudadriver. It is an old version of the video card driver. You can go to Nvidia to download the latest driver that matches the video card model.
2. Use the following command to close the graphical interface and enter the command line.
Sudo/etc/init. d/gestation stop
3. In the command line environment, enter the directory where the three files you just downloaded are located. First install the video card driver:
Sudo sh./NVIDIA-Linux-x86-192.42-pkg1.run
In the pop-up window, you will be asked to accept a license. After you click yes, the program will automatically install the driver. At this stage, there will generally be no problem. At last, it will reset the configuration file, click yes. After the driver is installed, run the following command to open the graphic interface:
Sudo/etc/init. d/gestation start
If everything works properly, the graphic interface starts normally. If the driver is abnormal, reinstall the command line to install the driver.
4. Install Toolkit and SDK in the command line by using the sudo sh ***. run file.
After that, go to the SDK directory and use the sample code for testing. Use the make command to compile.