Ubuntu 16.04 Uninstall Cuda 6.5 and install Cuda 8.0

Source: Internet
Author: User
Tags cuda toolkit gtx
One, Introduction

Since the system was upgraded from Ubuntu 14.04 to 16.04, the original Cuda 6.5 could not continue to be used, so Cuda 8.0 was reinstalled. Two, uninstall Cuda 6.5 and drive

The following actions are operated at the command-line interface, such as pressing CTRL+ALT+F1 into the command line
First stop LIGHTDM:
sudo service LIGHTDM stop

Uninstall nvidia driver

Originally installed Cuda 6.5 when the Nvidia driver installed together, first uninstall off, the command is generally:

Sudo/usr/bin/nvidia-uninstall

If you cannot find a command, you can enter it directly at the command line:

sudo apt-get install autoremove--purge nvidia*

Uninstall CUDA Toolkit

Cuda is installed by default under/usr/local/cuda-6.5 and uninstalled with the following command:

sudo/usr/local/cuda-6.5/bin/uninstall_cuda-6.5.pl

At this time generally need to restart the third, install Cuda 8.0

First download cuda installation files, url: https://developer.nvidia.com/cuda-release-candidate-download
The NVIDIA developer account needs to be registered. Download the corresponding installation file according to your computer's system and download the Runfile (local) file for Cuda 8.0. Installation methods can follow the official installation guide: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#axzz4HIBXnwyt

Still go to the command line interface, and then

sudo service LIGHTDM stop

Execute the following statement to run the Runfile file:

sudo sh cuda_8.0.44_linux.run

There will be a series of installation options, such as whether or not to install the NVIDIA367 driver, because the previous uninstall of the Nvidai driver, so the installation is selected here, and others such as whether to install samples and installation directory.
The following interfaces appear when the installation is complete:

============ Summary ============driver:not selectedtoolkit:installed in/usr/local/cuda-8.0samples:installed in/ Home/textminerplease Make sure That–path includes/usr/local/cuda-8.0/bin–ld_library_path includes/usr/local/ Cuda-8.0/lib64, or, add/usr/local/cuda-8.0/lib64 to/etc/ld.so.conf and run ldconfig as Rootto uninstall the Cuda Toolkit , run the uninstall script in/usr/local/cuda-8.0/binplease the Cuda_installation_guide_linux.pdf in/usr/local/cuda-8.0 /doc/pdf For detailed information on setting up Cuda.***warning:incomplete installation! This installation did is not install the CUDA Driver. A driver of version at least 361.00 was required for CUDA 8.0 to functionality. To install the driver using this installer, run the following command, and replacing with the name of this run File:sudo. Run -silent-driverlogfile Is/opt/temp//cuda_install_6583.log

Then set the environment variables and dynamic link libraries to add in the/etc/profile file:

Export PATH =/usr/local/cuda-8.0/bin: $PATH
export ld_library_path=/usr/local/cuda-8.0/lib64: $LD _library_path

and then

Source/etc/profile

Can make the change take effect immediately

Test
If the Cdua samples are installed, you can run them to test whether Cuda can run successfully.
Enter the directory of sample, CUDA 8.0 of the default installation directory into the user's home directory, there will be a nvida_cuda-8.0_samples directory, there are makefile files, direct make on line, generally need to compile a longer period of time. You can then run some programs in the bin directory of the current directory to verify that Cuda is properly installed, such as the results of the Devicequery program:

./devicequery starting ...  CUDA Device Query (Runtime API) version (Cudart static linking) detected 1 CUDA capable Device (s) Device 0: "GeForce GTX
  980 Ti "CUDA Driver version/runtime version 8.0/8.0 CUDA Capability major/minor version number:5.0 Total amount of global memory:1999 MBytes (2095841280 bytes) (5) Multiprocessors 128, (CUDA) CORES/MP                             : 640 CUDA Cores GPU Max Clock rate:1084 MHz (1.08 GHz) Memory Clock rate:                                 2700 Mhz Memory bus width:128-bit L2 Cache Size: 2097152 bytes Maximum Texture Dimension Size (x,y,z) 1d= (65536), 2d= (65536, 65536), 3d= (4096, 4096, 40 Maximum layered 1D texture size, (num) layers 1d= (16384), 2048 layers Maximum layered 2D texture size, (num) Laye RS 2d= (16384, 16384), 2048 layers total amount of constant memory:65536 bytes total amount of SharEd memory per block:49152 bytes Total number of registers available per block:65536 Warp size:           Maximum number of threads per multiprocessor:2048 Maximum # of threads per block:  1024 max dimension size of a thread block (x,y,z): (1024, 1024,) max dimension size of a grid size (X,Y,Z):
  (2147483647, 65535, 65535) 
  Maximum memory pitch:2147483647 Bytes Texture alignment:512                     Concurrent copy and kernel Execution:yes with 1 copy engine (s) Run time limit on kernels: Yes integrated GPU sharing host Memory:no Support host page-locked Memory Mapping:yes alignmen T requirement for Surfaces:yes Device has ECC support:disabled Device supports Uni Fied Addressing (UVA): Yes Device PCI Domain id/bus id/location id:0/1/0 Compute Mode: < Default (Multiple host threads can use:: Cudasetdevice () with device simultaneously) > devicequery, CUDA Driver = CUD
 ART, CUDA Driver version = 8.0, CUDA Runtime version = 8.0, Numdevs = 1, Device0 = GeForce GTX 750 Ti result = Pass

Reference

Http://www.th7.cn/system/lin/201608/176823.shtml
blog.csdn.net/xulingqiang/article/details/46660107

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.