Farbod pm

GPU Programming in Ubuntu ,Cuda Installation

General-purpose computing on a graphics processing unit, known as GPU programming, is use of a GPU with CPU to accelerate computation. Today application of GPU programming is image processing, Signal processing, medical imaging and so on. This article show you how to install Cuda platform on your system.

Verify You Have a Supported Version of Linux

First of all you have to determine which distribution and release number you’re running. Type the following at command line:
$ uname -m && cat /etc/*release
you should see output similar to the following, modified for your particular system:
x86_64
Red Hat Enterprise Linux Workstation release 6.0
The x86_64 line indicates you are running on a 64-bit system.

Verify the System Has gcc Installed

To verify the version of gcc installed on your system, type the following on the command line:
$ gcc –version
Something like below should returned:

if an error message displays , you need to install the development tools from your Linux distribution or obtain a version of gcc and its accompanying toolchain from the web.

Verify the System Has the Correct Kernel Headers and Development Packages Installed

The kernel headers and development packages for the currently running kernel can be installed with:
$ sudo apt-get install kernel-headers-$(uname -r)
$ uname -r returns the version of the kernel your system is running.

Download the NVIDIA CUDA Toolkit

Download your desired installation file from here. After installation verify your file using this code:
$ md5sum <file address>
it takes a while and the result should be like below:

Before installation it’s better to uninstall every other CUDA toolkit using this code:
$ sudo /usr/local/cuda-X.Y/bin/uninstall_cuda_X.Y.pl
and uninstall CUDA driver using below:
$ sudo /usr/bin/nvidia-uninstall
( I did not do it but according to nvidia document you have to do it. Also I am not sure that I had cuda driver or toolkit before.)

Finally, install cuda with code:
$ sudo sh cuda_<version>_linux.run

How to install LaTeX

How to use LaTeX

Install LaTeX

LaTeX, which is pronounced «Lah-tech» or «Lay-tech» is a document preparation system for high-quality typesetting. Commonly, it is used for medium or large technical or scientific documents. But I  recommend it for any publishing like papers, journals and reports. I really enjoy it because you can write things programmatically. When you use Latex  you can just add reference just using one word but in Microsoft you have to find the reference button and coding “\cite{}” is much easier. In this topic we are going to learn about it. In the following line you will learn how to install latex in Ubuntu.
Firstly, The LaTeX should be installed on your computer. But you can also use the web-editor. ShareLaTeX is a website in which you can compile your latex script online. If you sign up there you can have several file and use them whenever and wherever you want. But for those who want to install it on their computer I suggest Textmaker. For installation in Ubuntu just try the bellow command:

  • Sudo apt-get install Texmaker

Start a document

After installation launch the program. As you can see the window has been divided to three section.

  1. Structure: in which you can see the structure of your file including headers and sub headers.
  2. editor: which is in the middle and you can write down the command and scripts.
  3. output: The output of your code which can be in PDF form or other format.

To make a new document just click on new in file or use the hot key Ctrl+N. just after creating new document the editor will be available and your ready to go but to start there are some notes that would help you. before creating new document, search for templates that is available on network. There are many good templates in here including Book formats or reports. I advice to check it first.

Help-Desk