Build the NVIDIACUDA development platform in Ubuntu10.10 Environment

Source: Internet
Author: User
This article describes how to build the NVIDIACUDA development platform under Ubuntu10.10. This article is based on my experience in building the environment officially. The official PDF file is downloaded at the following address/

This article describes how to build the nvidia cuda development platform under Ubuntu 10.10. This article is the author's experience in building an official environment. The official PDF file is downloaded at the following address:

Free onHttp://linux.linuxidc.com/

Both the user name and password areWww.linuxidc.com

The specific download directory is in/Pub/2011/09/06/build the nvidia cuda development platform in the Ubuntu 10.10 environment/

First we need to prepare a computer with a Ubuntu-10.10 (32-bit) installed, and a graphics card with a GPU supporting nvidia cuda architecture (here is a list of supported models: http://developer.nvidia.com/cuda-gpus); then, three software required for the development platform are required. run file:
1. Developer Drivers for Linux (270.41.19 );
2. CUDA Toolkit for Ubuntu Linux 10.10 32-bit;
3. GPU Computing SDK-complete package including all code samples
These three files can be downloaded from http://developer.nvidia.com/cu?toolkit-40and saved to the/cuda_installation directory.

Okay. Prepare these files. We can start to install them. For the sake of convenience, all the operations of the author are completed under the root, because Ubuntu10.10 is disabled by default, so we need to enable it. Run the sudo passwd root command under a common user. If the root user is not enabled before, you will be prompted to enter a new password for the root user, after confirming the password again, switch the user and we can log on as the root user.

Step 1: install NVIDIA Developer Drivers
To install NVIDIA Developer Drivers, exit the graphical interface first. The official document provides the method of pressing Ctrl-Alt-Backspace (start command startx) on the graphic interface ), or run sudo/etc/init. d/gestation stop (start command sudo/etc/init. in addition, execute the command init 3 (start command init 5), but these methods have not been successfully executed in the author's system, so I found a way to directly enter the command line mode when the system starts.
Modify the GRUB configuration file. conf) sudo vi/etc/default/grub, find this line: GRUB_CMDLINE_LINUX_DEFAULT = "quiet splash", change to: GRUB_CMDLINE_LINUX_DEFAULT = "text", save and restart sudo update-grub.
In this way, we can enter the command line mode (the author uses NoteBook, when starting in standard mode, it is stuck in the "Checking Battery state... ", but the above problem does not occur when you use the Recovery mode later.) run the NVIDIA Developer Drivers installation package, sh/cuda_installation/devdriver_4.0_linux_32_270.41.19.run and follow the prompts to complete the installation. Change the Startup Mode back to the default GUI to start and then reboot.

Step 2: Install CUDA Toolkit
Run sh/cuda_installation/cudatoolkit_4.0.17_linux_32_ubuntu10.10.run to complete the installation as prompted. Then set the environment variables and run the following two commands:
Export PATH =/usr/local/cuda/bin: $ PATH
Export LD_LIBRARY_PATH =/usr/local/cuda/lib: $ LD_LIBRARY_PATH
Of course, we can write these two commands ~ /. When the system starts in bashrc, environment variables are automatically added.

Step 3: Install the GPU Computing SDK
Run sh/cuda_installation/gpucomputingsdk_4.0.17_linux.run to complete the installation as prompted.

Step 4: Verify Installation
Run nvcc-V to obtain the CUDA Toolkit version to verify whether the installation is successful. Then, go to the directory ~ /NVIDIA_GPU_Computing_SDK/C. Execute make to compile the Computing SDK sample. to compile all the samples, we also need to install some required libraries before this. The Command provided in the official documentation is:
Sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
However, after installing the above libraries, I still have some examples that cannot be built, so I have added some sudo apt-get install libxi-dev libxmu-dev, in this way, all the samples are compiled and the compiled binary files are stored in ~ /NVIDIA_GPU_Computing_SDK/C/bin/linux/release.
It is worth noting that/usr/lib/libGL will be overwritten during Mesa installation. so, we need to re-install NVIDIA Developer Drivers according to the "Step 1" method, otherwise the system will prompt that the X Window cannot be created when running some samples.

After completing the above steps, we can try to run some samples. The two examples mentioned in the official documents are deviceQuery and bandwidthTest. You can try again. I prefer oceanFFT :), the following figure shows how to run the test case.


In this way, the nvidia cuda development platform in the Ubuntu 10.10 environment is set up and development can begin.

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.