Vtune Live-Ubuntu Install Instructions (Windows - Persistence)

Vtune Live-Ubuntu Install Instructions (Windows - Persistence)

CSE141 - Taylor Winter 2014 March 6th, 2014

1 Tech Support

The following instructions are quite involved if you run into problems contact me [Shelby Thomas] at [sht005@eng.ucsd.edu].

2 USB Setup

You will need a USB drive or external storage that is at least 4GB to accommodate the operating system and the software that we will be using. We recommend this 8GB USB drive from the bookstore . It has great reviews on amazon and costs the same.

Note: Ubuntu is not guaranteed to have the wireless drivers available for your desktop/laptop so it is recommended that you follow the rest of the setup while connected through ethernet.

2.1 Download Ubuntu

We will be using Ubuntu 13.10, it can downloaded at . Choose the appropriate flavor for your system (32/64bit).

2.2 Download Universal-USB-Installer

This program allows us to create a bootable USB, and has the unique advatange of giving us the option to include persistent storage in our live boot. Can be downloaded from

2.3 Installing Ubuntu

Run the Universal-USB-Installer and select Ubuntu under Step 1.

In Step 2 navigate to the Ubuntu ISO that you have downloaded.

In Step 3 select your USB flash drive letter.

1

Select the option for persistent storage and drag the bar to indicate how much space to allocate. You'll need at least 1.5GB.

WARNING: Double check the drive name to make sure that you are actually writing to your USB and not your external hardrive or other storage device. Protip: Installing to the USB can take up to 5 minutes, it will not be instantaneous

3 Boot

If you've successfully installed Ubuntu on your USB reboot your computer and bypass the normal bootloader to boot from USB. The method to do this varies from computer to computer so I can't give any specific instructions but the information is widely available online. For Lenovo Thinkpads there will be a blue button you can hit on startup, on other computers you'll need to press F12 or F11. Sometimes instructions to access the bios will also show up on the boot screen as well.

When Ubuntu loads choose "Try Ubuntu" as we will be running everything through this USB device. You will be selecting this option everytime you load the USB.

4 Verification of Persistence

To ensure that persistence is really working, open up a terminal on Ubuntu [press the circular icon on the top left and type terminal, it'll show up after a second] and make a file on the desktop and then reboot.

Note: Reboot can take a few minutes, and a couple black screen stating that Ubuntu is sending a broadcast message will show up. You'll need to just wait for the operation to complete. However, if you've waited for about 10 minutes then just hard reset the computer. I don't recommend hard resetting the computer every time you shutdown as it could corrupt the filesystem and you may lose all of your files. If anyone wants to try hard resetting their computer and letting me know the stats of how many times it corrupted the file system vs.how many times it did not I'd like to know. So far I'm at 50-50 but I've only tried with two computers.

Once you've rebooted and clicked "Try Ubuntu" once more, ensure the file you created is on the desktop. If it is, then this portion of installation is complete.

5 Vtune

Vtune will allow you to profile executables and look for bottlenecks in the software, it is what we will be using to complete the rest of the projects in the class.

2

5.1 Download

Vtune can be downloaded from make sure to choose the Linux Installer. It will ask to create an account but what you decide to put here is to your discretion. Just make sure to use any valid email address as the download link will be sent there.

5.2 Download (Alternative Options)

If you can't get internet to work, to get VTune there are a couple of things you can do to get VTune on the usb.

5.2.1 Secondary USB Download VTune on another USB and then you boot into Ubuntu you'll be able to copy the installer from the secondary USB to the Ubuntu boot. Unfortunately, some computers put USB slots so close to each other (A majority of MacBooks have this issue) you won't be able to use two USB keys at once.

5.2.2 Windows Parition Download VTune to the Windows parition (download the Linux version of VTune) and when you boot into Ubuntu you can access the Windows file system from the file manager. Just copy the .gz file from wherever you downloaded it to your Ubuntu desktop.

5.3 Install

Once you've downloaded Vtune through the email link, open a terminal and locate to where VTune was downloaded. In this folder run the command:

tar -xvf vtune_amplifier_xe_2013_update15.tar.gz cd vtune_amplifier_xe_2013_update15.tar.gz sudo ./install.sh To unzip, open the folder, and begin install.

The installer is fairly straight forward and when it asks for what kind of license choose "evaluation".

5.4 Finishing up

When installation is complete, run the commands

source /opt/intel/vtune_amplifier_xe_2013/amplxe-vars.sh echo 0 | sudo tee /proc/sys/kernel/nmi_watchdog Vtune is now installed on your system and you are ready to begin profiling. Note that you still need to run these two commands everytime you reboot into Ubuntu. Alternatively, if you want Ubuntu to do this automatically at boot time see the optional section.

3

6 (Optional) Keeping Settings Persistent

To make sure that all of our settings are persistent between reboots, we will add a few lines to the startup variables on Ubuntu.

6.1 Sourcing Vtune Variables on Shell Start

cd ~ gedit .bashrc Insert line: source /opt/intel/vtune_amplifier_xe_2013/amplxe-vars.sh Anywhere after the first block of comments

6.2 Disabling NMI Watchdog on Startup

By default some settings that allow us to measure performance are disabled. To make sure that this is not the case, we will edit some system files to give us access and make sure it happens at every startup

sudo gedit /etc/rc.local Insert line: echo 0 | sudo tee /proc/sys/kernel/nmi_watchdog On the second to last line right before the "echo 0". These commands will now run at boot time.

7 The Basics

Run the following command to start Vtune amplxe-gui When started click on "new project". After selecting an appropriate name, browser to the sample program in the google doc (app.cpp).

Familiarize yourself with all the options on this page, this is a very powerful tool and there are many different parameters to tweak if you so choose. Select "OK".

On the next page you are given many different metric to profile from. For this tutorial we will just be looking at "General Exploration" but feel free to run the sample program against the other tests as well.

This concludes the Vtune installation and setup tutorial.

4

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download