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.esResearch AssistantDepartment of Statistics and Computer ScienceLa 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 toanother. Their introduction into high-level languages has been a step backwardsfrom which _we may never recover_." --- Anthony Hoare---Personal:Javier RuizTel (+34) 616 95 93 94Avda. Milán, 42, 1ºCTejina (La Laguna)

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 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.

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.

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.)