PapiUbuntu

From NA-Wiki

Jump to: navigation, search

This howto describes how to install perfctr and papi and how you can use them to benchmark your codes.

The installation is tested in Ubuntu Hardy 8.04

Contents

Installation

perfctr kernel patch

First become root, by doing sudo su - in a terminal. Then install and unpack the linux kernel source,

apt-get install linux-source-2.6.24
cd /usr/src
tar xvjf linux-source-2.6.24.tar.bz2 

And then get the perfctr package,

cd /usr/local/src
wget http://user.it.uu.se/~mikpe/linux/perfctr/2.6/perfctr-2.6.32.tar.gz
tar xvzf perfctr-2.6.32.tar.gz

Now we apply the perfctr patch to the kernel source,

cd /usr/src/linux-source-2.6.24
/usr/local/src/perfctr-2.6.32/update-kernel --patch=2.6.24

Now build the kernel with

make oldconfig

and answer the questions as,

 Performance monitoring counters support (PERFCTR) [N/m/y/?] (NEW) m
   Additional internal consistency checks (PERFCTR_DEBUG) [N/y/?] (NEW) n
   Init-time hardware tests (PERFCTR_INIT_TESTS) [N/y/?] (NEW) y
   Virtual performance counters support (PERFCTR_VIRTUAL) [N/y/?] (NEW) y
   Global performance counters support (PERFCTR_GLOBAL) [N/y/?] (NEW) y

Now, build the kernel, and install it

make-kpkg kernel-image --initrd --append-to-version=-perfctr0
dpkg -i /usr/src/linux-image-2.6.24.*-perfctr0-*.deb

Add perfctr to /etc/modules by typing

echo perfctr >> /etc/modules

and make udev rules

echo 'KERNEL=="perfctr",MODE="0666"' > /etc/udev/rules.d/20-perfctr.rules

module assistant

Because we have compiled our own kernel, we need to rebuild the following drivers ourself.

m-a a-i -l 2.6.24.3-perfctr0 nvidia-new-kernel
m-a a-i -l 2.6.24.3-perfctr0 alsa
m-a a-i -l 2.6.24.3-perfctr0 openafs

and replace the Xorg drivers as well,

apt-get install nvidia-glx-new nvidia-glx-new-dev

Since we have compiled our own nvidia new driver which isn't labeled "nvidia_new", we need to add an alias for it,

echo alias nvidia_new nvidia >> /etc/modprobe.d/aliases

Warning! You might need to rebuild additional modules!

Now you must reboot into your new kernel for the final step.

papi

Final step, installing Papi. Again, become root and type,

cd /usr/local/src
wget http://icl.cs.utk.edu/projects/papi/downloads/papi-3.6.0.tar.gz
tar xvzf papi-3.6.0.tar.gz
cd papi-3.6.0/src
./configure
make
make fulltest

Lets hope everything PASS! and then,

make install-all

Disclaimer: This howto is shameless stolen from http://debianclusters.cs.uni.edu/ We thank them very, very much for providing such excellent howtos!

Usage

To be written.

Personal tools