Approach to measure events

Open discussion of PAPI.

Approach to measure events

Postby Javier Ruiz » Mon Oct 03, 2011 8:00 am

Hello,
I am completely new to PAPI, so please excuse if my question are too naïf.

I am trying to correlate power consumption with events, and I am wondering what is the best approach.
Should I measure one event only each time? Or can I group several of them without loosing too much data?

Grouping events is often difficult, for example I can not get L2 cache misses together with accesses and hits.

Thanks in advance for your help,

All the best from Tenerife,

Javier Ruiz

alu3726@etsii.ull.es
Research Assistant
Department of Statistics and Computer Science
La Laguna University
Av. Astrofísico Francisco Sánchez, s/n, 38271 - La Laguna (SPAIN)
---
"Pointers are like jumps, leading wildly from one part of the data structure to
another. Their introduction into high-level languages has been a step backwards
from which _we may never recover_." --- Anthony Hoare
---
Personal:
Javier Ruiz
Tel (+34) 616 95 93 94
Avda. Milán, 42, 1ºC
Tejina (La Laguna)
Javier Ruiz
 
Posts: 4
Joined: Mon Oct 03, 2011 7:14 am

Re: Approach to measure events

Postby danterpstra » Mon Oct 03, 2011 11:21 am

You can generally measure multiple events at one time. Most architectures these days have at least 4 usable counters. However, not all events can be measured at the same time, because sometimes they use conflicting resources or reside on specific counters. You often need to experiment with which events can be counted together. One good way to do that is with the utility utils/papi_event_chooser.
danterpstra
 
Posts: 63
Joined: Wed Jun 23, 2010 2:21 pm

Re: Approach to measure events

Postby Javier Ruiz » Mon Oct 03, 2011 1:22 pm

danterpstra wrote:You can generally measure multiple events at one time. Most architectures these days have at least 4 usable counters. However, not all events can be measured at the same time, because sometimes they use conflicting resources or reside on specific counters. You often need to experiment with which events can be counted together. One good way to do that is with the utility utils/papi_event_chooser.


Thanks for your fast reply!

So an event takes a counter? Or they are multiplexed somehow?

Now, since I need to replicate the tests in several machines with different architecture, first I will have to test what preset events are available, right? and then try to group them in sets. By now, I am just turning on/off some macros in the makefile, prior to compilation, but maybe I should try to script everything a bit.

I guess I am bit tired. Time to go home!

All the best,
Javier
Javier Ruiz
 
Posts: 4
Joined: Mon Oct 03, 2011 7:14 am

Re: Approach to measure events

Postby danterpstra » Mon Oct 03, 2011 2:42 pm

Each event must be loaded into a counter. There are generally hundreds of events but only a small number of counters. The PAPI utilities can help in figuring out what can be counted on different architectures. papi_avail tells you what PRESET events are implemented on a given machine, while papi_native_avail lists all the events native to that machine. papi_event_chooser helps you figure out how many and which events can be counted together, and papi_command_line lets you execute a group of events against a dummy payload just to demonstrate that the events are working. Playing interactively with these utilities can go a long way to figuring out what you can count together.
danterpstra
 
Posts: 63
Joined: Wed Jun 23, 2010 2:21 pm

Re: Approach to measure events

Postby Javier Ruiz » Wed Oct 05, 2011 9:16 am

Many thanks, Dan, to take the time to respond to my doubts.
I am already running some tests successfully, and also I have been using the PAPI utils you pointed me to.

Just another thing, there are runtime utilities like LikWid that seem to do the same job than PAPI, but I guess they might be inferior in some way, uh? (The main advantage that I see in these tools is that you don't have to touch your source code.)

Lunch time!

Best,
Javier
Javier Ruiz
 
Posts: 4
Joined: Mon Oct 03, 2011 7:14 am


Return to General discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron