{"id":1973,"date":"2017-02-24T07:42:21","date_gmt":"2017-02-24T07:42:21","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=1973"},"modified":"2017-02-24T07:49:01","modified_gmt":"2017-02-24T07:49:01","slug":"installation-of-cuda-toolkit-7-5-on-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2017\/02\/24\/installation-of-cuda-toolkit-7-5-on-ubuntu-14-04\/","title":{"rendered":"Installation of CUDA Toolkit 7.5 On Ubuntu 14.04"},"content":{"rendered":"<p>CONSIDER USING CUDA???<br \/>\nFROM THIS: <a href=\"https:\/\/en.wikipedia.org\/wiki\/CUDA\">https:\/\/en.wikipedia.org\/wiki\/CUDA<\/a>, MY GPU Nvidia GeForce GT 520M IS SUPPORTED!!! Micro Architecture Fermi (https:\/\/en.wikipedia.org\/wiki\/Fermi_(microarchitecture)) version 2.1<br \/>\nCHECK CUDA FROM TERMINAL:<br \/>\nref:<a href=\"http:\/\/docs.nvidia.com\/cuda\/cuda-getting-started-guide-for-linux\/#axzz44a7lZNcT\">http:\/\/docs.nvidia.com\/cuda\/cuda-getting-started-guide-for-linux\/#axzz44a7lZNcT<\/a><\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ lspci | grep -i nvidia\r\n01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [GeForce GT 520M] (rev a1)\r\n01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)<\/pre>\n<p>INSTALLING CUDA TOOLKIT 7.5 ON UBUNTU 14.04<br \/>\nref:<a href=\"http:\/\/www.r-tutor.com\/gpu-computing\/cuda-installation\/cuda7.5-ubuntu\">http:\/\/www.r-tutor.com\/gpu-computing\/cuda-installation\/cuda7.5-ubuntu<\/a><br \/>\n<a href=\"https:\/\/www.quantstart.com\/articles\/Installing-Nvidia-cuda-on-Ubuntu-14-04-for-Linux-GPU-Computing\">https:\/\/www.quantstart.com\/articles\/Installing-Nvidia-cuda-on-Ubuntu-14-04-for-Linux-GPU-Computing<\/a><br \/>\nhttps:\/\/developer.nvidia.com\/cuda-downloads -&gt; Linux -&gt; x86_64 -&gt; Ubuntu -&gt; 14.04 -&gt; deb(local)<br \/>\n<a href=\"http:\/\/developer.download.nvidia.com\/compute\/cuda\/7.5\/Prod\/local_installers\/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb\">http:\/\/developer.download.nvidia.com\/compute\/cuda\/7.5\/Prod\/local_installers\/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb<\/a><br \/>\n(1.9 GB)<br \/>\n1. The first task is to make sure that you have the GNU compiler collection (GCC) tools installed. This is carried out by installing the build-essential package:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ sudo apt-get install build-essential<\/pre>\n<p>2. Download the latest Cuda toolkit:<br \/>\nManually FROM:<br \/>\n<a href=\"http:\/\/developer.download.nvidia.com\/compute\/cuda\/7.5\/Prod\/local_installers\/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb\">http:\/\/developer.download.nvidia.com\/compute\/cuda\/7.5\/Prod\/local_installers\/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb<\/a><br \/>\nOR:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ cd ~\/Downloads\/\r\nteddy@teddy-K43SJ:~\/Downloads$ wget http:\/\/developer.download.nvidia.com\/compute\/cuda\/7.5\/Prod\/local_installers\/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb<\/pre>\n<p>3. PREPARE THE PACKAGE:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Downloads$ sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb\r\n[sudo] password for teddy:\r\nSelecting previously unselected package cuda-repo-ubuntu1404-7-5-local.\r\n(Reading database ... 511757 files and directories currently installed.)\r\nPreparing to unpack cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb ...\r\nUnpacking cuda-repo-ubuntu1404-7-5-local (7.5-18) ...\r\nSetting up cuda-repo-ubuntu1404-7-5-local (7.5-18) ...<\/pre>\n<p>OK<\/p>\n<p>4. Update<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Downloads$ sudo apt-get update<\/pre>\n<p>5. INSTALL CUDA:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Downloads$ sudo apt-get install cuda\r\nReading package lists... Done\r\nBuilding dependency tree\r\nReading state information... Done\r\nSome packages could not be installed. This may mean that you have\r\nrequested an impossible situation or if you are using the unstable\r\ndistribution that some required packages have not yet been created\r\nor been moved out of Incoming.\r\nThe following information may help to resolve the situation:\r\n\r\nThe following packages have unmet dependencies:\r\ngnome-control-center : Depends: libcheese-gtk23 (&gt;= 3.4.0) but it is not going to be installed\r\nDepends: libcheese7 (&gt;= 3.0.1) but it is not going to be installed\r\nunity-control-center : Depends: libcheese-gtk23 (&gt;= 3.4.0) but it is not going to be installed\r\nDepends: libcheese7 (&gt;= 3.0.1) but it is not going to be installed\r\nE: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.<\/pre>\n<p>SOLUTION:<br \/>\nref:<a href=\"http:\/\/askubuntu.com\/questions\/672047\/anyone-has-successfully-installed-cuda-7-5-on-ubuntu-14-04-3-lts-x86-64\">http:\/\/askubuntu.com\/questions\/672047\/anyone-has-successfully-installed-cuda-7-5-on-ubuntu-14-04-3-lts-x86-64<\/a><\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Downloads$ sudo apt-get install libglew-dev libcheese7 libcheese-gtk23 libclutter-gst-2.0-0 libcogl15 libclutter-gtk-1.0-0 libclutter-1.0-0<\/pre>\n<p>RUN AGAIN:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Downloads$ sudo apt-get install cuda\r\n...\r\n*** LICENSE AGREEMENT ***\r\nBy using this software you agree to fully comply with the terms and conditions of the EULA (End User License Agreement). The EULA is located at \/usr\/local\/cuda-7.5\/doc\/EULA.txt. The EULA can also be found at http:\/\/docs.nvidia.com\/cuda\/eula\/index.html. If you do not agree to the terms and conditions of the EULA, do not use the software.\r\nSetting up nvidia-352-uvm (352.39-0ubuntu1) ...\r\nSetting up nvidia-352-dev (352.63-0ubuntu0.14.04.1) ...\r\nSetting up nvidia-modprobe (352.39-0ubuntu1) ...\r\nSetting up cuda-drivers (352.39-1) ...\r\nSetting up cuda-runtime-7-5 (7.5-18) ...\r\nSetting up cuda-7-5 (7.5-18) ...\r\n*** LICENSE AGREEMENT ***\r\nBy using this software you agree to fully comply with the terms and conditions of the EULA (End User License Agreement). The EULA is located at \/usr\/local\/cuda-7.5\/doc\/EULA.txt. The EULA can also be found at http:\/\/docs.nvidia.com\/cuda\/eula\/index.html. If you do not agree to the terms and conditions of the EULA, do not use the software.\r\n\r\n*****************************************************************************************\r\n*** Please reboot your computer and verify that the nvidia graphics driver is loaded. ***\r\n*** If the driver fails to load, please use the NVIDIA graphics driver .run installer ***\r\n*** to get into a stable state. ***\r\n*****************************************************************************************\r\nSetting up cuda (7.5-18) ...\r\n*** LICENSE AGREEMENT ***\r\nBy using this software you agree to fully comply with the terms and conditions of the EULA (End User License Agreement). The EULA is located at \/usr\/local\/cuda-7.5\/doc\/EULA.txt. The EULA can also be found at http:\/\/docs.nvidia.com\/cuda\/eula\/index.html. If you do not agree to the terms and conditions of the EULA, do not use the software.\r\nProcessing triggers for libc-bin (2.19-0ubuntu6.7) ...<\/pre>\n<p>6. REBOOT<\/p>\n<p>7. MODIFY ENVIRONMENT VARIABLES:<br \/>\nAs part of the CUDA environment, you should add the following in the .bashrc file of your home folder.<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ sudo gedit ~\/.bashrc<\/pre>\n<p>ADD THESE LINES AT THE BOTTOM:<\/p>\n<pre class=\"lang:default decode:true \">...\r\n#NVIDIA CUDA ENVIRONMENT VARIABLES\r\nexport CUDA_HOME=\/usr\/local\/cuda-7.5\r\nexport LD_LIBRARY_PATH=${CUDA_HOME}\/lib64\r\n\r\nPATH=${CUDA_HOME}\/bin:${PATH}\r\nexport PATH<\/pre>\n<p>THEN SAVE AND CLOSE!<\/p>\n<p>8. Remember to make sure that the terminal has access to these variables:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ source ~\/.bashrc<\/pre>\n<p>9. Before proceeding to test the GPU cards we will ensure that the drivers are correctly installed. The following line will provide us with the driver version:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ cat \/proc\/driver\/nvidia\/version\r\nNVRM version: NVIDIA UNIX x86_64 Kernel Module 352.63 Sat Nov 7 21:25:42 PST 2015\r\nGCC version: gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1)<\/pre>\n<p>10. Check the version of the Nvidia CUDA compiler:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ nvcc -V\r\nnvcc: NVIDIA (R) Cuda compiler driver\r\nCopyright (c) 2005-2015 NVIDIA Corporation\r\nBuilt on Tue_Aug_11_14:27:32_CDT_2015\r\nCuda compilation tools, release 7.5, V7.5.17<\/pre>\n<p>TRY THE CUDA 7.5 SAMPLES:<br \/>\n1. Copy the samples into \/home\/teddy\/Documents\/<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ cuda-install-samples-7.5.sh \/home\/teddy\/Documents\/\r\nCopying samples to \/home\/teddy\/Documents\/NVIDIA_CUDA-7.5_Samples now...\r\nFinished copying samples.<\/pre>\n<p>2. GO to the samples directory:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ cd Documents\/NVIDIA_CUDA-7.5_Samples\/<\/pre>\n<p>3. Go to the deviceQuery directory THEN make:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/NVIDIA_CUDA-7.5_Samples$ cd 1_Utilities\/deviceQuery\r\nteddy@teddy-K43SJ:~\/Documents\/NVIDIA_CUDA-7.5_Samples\/1_Utilities\/deviceQuery$ make\r\n\/usr\/local\/cuda-7.5\/bin\/nvcc -ccbin g++ -I..\/..\/common\/inc -m64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_52,code=compute_52 -o deviceQuery.o -c deviceQuery.cpp\r\n\/usr\/local\/cuda-7.5\/bin\/nvcc -ccbin g++ -m64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_52,code=compute_52 -o deviceQuery deviceQuery.o\r\nmkdir -p ..\/..\/bin\/x86_64\/linux\/release\r\ncp deviceQuery ..\/..\/bin\/x86_64\/linux\/release<\/pre>\n<p>4. run the deviceQuery script to test if we can communicate with the GPU:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/NVIDIA_CUDA-7.5_Samples\/1_Utilities\/deviceQuery$ .\/deviceQuery\r\n.\/deviceQuery Starting...\r\n\r\nCUDA Device Query (Runtime API) version (CUDART static linking)\r\n\r\nDetected 1 CUDA Capable device(s)\r\n\r\nDevice 0: \"GeForce GT 520M\"\r\nCUDA Driver Version \/ Runtime Version 7.5 \/ 7.5\r\nCUDA Capability Major\/Minor version number: 2.1\r\nTotal amount of global memory: 1023 MBytes (1072889856 bytes)\r\n( 1) Multiprocessors, ( 48) CUDA Cores\/MP: 48 CUDA Cores\r\nGPU Max Clock rate: 1480 MHz (1.48 GHz)\r\nMemory Clock rate: 800 Mhz\r\nMemory Bus Width: 64-bit\r\nL2 Cache Size: 65536 bytes\r\nMaximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65535), 3D=(2048, 2048, 2048)\r\nMaximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers\r\nMaximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers\r\nTotal amount of constant memory: 65536 bytes\r\nTotal amount of shared memory per block: 49152 bytes\r\nTotal number of registers available per block: 32768\r\nWarp size: 32\r\nMaximum number of threads per multiprocessor: 1536\r\nMaximum number of threads per block: 1024\r\nMax dimension size of a thread block (x,y,z): (1024, 1024, 64)\r\nMax dimension size of a grid size (x,y,z): (65535, 65535, 65535)\r\nMaximum memory pitch: 2147483647 bytes\r\nTexture alignment: 512 bytes\r\nConcurrent copy and kernel execution: Yes with 1 copy engine(s)\r\nRun time limit on kernels: Yes\r\nIntegrated GPU sharing Host Memory: No\r\nSupport host page-locked memory mapping: Yes\r\nAlignment requirement for Surfaces: Yes\r\nDevice has ECC support: Disabled\r\nDevice supports Unified Addressing (UVA): Yes\r\nDevice PCI Domain ID \/ Bus ID \/ location ID: 0 \/ 1 \/ 0\r\nCompute Mode:\r\n&lt; Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) &gt;\r\n\r\ndeviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.5, CUDA Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GT 520M\r\nResult = PASS\r\n\r\nThe final line is the most important. It states that the test was successful as we received a \"PASS\"<\/pre>\n<p>&nbsp;<\/p>\n<p>5. Go to the bandwidthTest directory THEN make:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/NVIDIA_CUDA-7.5_Samples\/1_Utilities\/deviceQuery$ cd ..\r\nteddy@teddy-K43SJ:~\/Documents\/NVIDIA_CUDA-7.5_Samples\/1_Utilities$ cd bandwidthTest\/\r\nteddy@teddy-K43SJ:~\/Documents\/NVIDIA_CUDA-7.5_Samples\/1_Utilities\/bandwidthTest$ make\r\n\/usr\/local\/cuda-7.5\/bin\/nvcc -ccbin g++ -I..\/..\/common\/inc -m64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_52,code=compute_52 -o bandwidthTest.o -c bandwidthTest.cu\r\n\/usr\/local\/cuda-7.5\/bin\/nvcc -ccbin g++ -m64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_52,code=compute_52 -o bandwidthTest bandwidthTest.o\r\nmkdir -p ..\/..\/bin\/x86_64\/linux\/release\r\ncp bandwidthTest ..\/..\/bin\/x86_64\/linux\/release<\/pre>\n<p>&nbsp;<\/p>\n<p>6. run bandwidthTest:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/NVIDIA_CUDA-7.5_Samples\/1_Utilities\/bandwidthTest$ .\/bandwidthTest\r\n[CUDA Bandwidth Test] - Starting...\r\nRunning on...\r\n\r\nDevice 0: GeForce GT 520M\r\nQuick Mode\r\n\r\nHost to Device Bandwidth, 1 Device(s)\r\nPINNED Memory Transfers\r\nTransfer Size (Bytes) Bandwidth(MB\/s)\r\n33554432 6491.7\r\n\r\nDevice to Host Bandwidth, 1 Device(s)\r\nPINNED Memory Transfers\r\nTransfer Size (Bytes) Bandwidth(MB\/s)\r\n33554432 6488.2\r\n\r\nDevice to Device Bandwidth, 1 Device(s)\r\nPINNED Memory Transfers\r\nTransfer Size (Bytes) Bandwidth(MB\/s)\r\n33554432 11079.2\r\n\r\nResult = PASS\r\n\r\nNOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CONSIDER USING CUDA??? FROM THIS: https:\/\/en.wikipedia.org\/wiki\/CUDA, MY GPU Nvidia GeForce GT 520M IS SUPPORTED!!! Micro Architecture Fermi (https:\/\/en.wikipedia.org\/wiki\/Fermi_(microarchitecture)) version 2.1 CHECK CUDA FROM TERMINAL: ref:http:\/\/docs.nvidia.com\/cuda\/cuda-getting-started-guide-for-linux\/#axzz44a7lZNcT teddy@teddy-K43SJ:~$ lspci | grep -i nvidia 01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [GeForce GT 520M] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1) INSTALLING &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2017\/02\/24\/installation-of-cuda-toolkit-7-5-on-ubuntu-14-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installation of CUDA Toolkit 7.5 On Ubuntu 14.04&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69,18],"tags":[],"class_list":["post-1973","post","type-post","status-publish","format-standard","hentry","category-cuda","category-ubuntu-14-04"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=1973"}],"version-history":[{"count":3,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1973\/revisions"}],"predecessor-version":[{"id":1977,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1973\/revisions\/1977"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=1973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=1973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=1973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}