Incoherent results

Open discussion of PAPI.

Incoherent results

Postby adiazpon » Thu Apr 15, 2010 12:14 pm

Hi I have a problem using PAPI, I get some incoherent or coherent results depending on the combination of counters that I used.

For example, if I used: PAPI_TOT_INS, PAPI_INT_INS, PAPI_FP_INS , and PAPI_TOT_CYC; all the counters show the same result during the execution. I get the next results:

-->1 (Read, starting)
PAPI_TOT_INS = 577732409434650008
PAPI_INT_INS = 577756873568368160
PAPI_FP_INS = 577736708696913352
PAPI_TOT_CYC = 4479200
-->2 (Accum, after some computation)
PAPI_TOT_INS = 577732409434650008
PAPI_INT_INS = 577756873568368160
PAPI_FP_INS = 577736708696913352
PAPI_TOT_CYC = 4479200
-->3 (Stop, end)
PAPI_TOT_INS = 577732409434650008
PAPI_INT_INS = 577756873568368160
PAPI_FP_INS = 577736708696913352
PAPI_TOT_CYC = 4479200

And if I use one counter less, I get:

-->1 (Read, starting)
PAPI_TOT_INS = 2847
PAPI_FP_INS = 4
PAPI_TOT_CYC = 6796
-->2 (Accum, after some computation)
PAPI_TOT_INS = 7407431276
PAPI_FP_INS = 25
PAPI_TOT_CYC = 12070063266
-->3 (Stop, end)
PAPI_TOT_INS = 7475
PAPI_FP_INS = 36
PAPI_TOT_CYC = 28476

Those are coherent results. Do anyone have any idea why this happens?

Thanks a lot.
adiazpon
 
Posts: 11
Joined: Wed Mar 03, 2010 1:41 pm

Re: Incoherent results

Postby vweaver1 » Thu Apr 15, 2010 3:12 pm

What type of processor are you running on?

Do you check all of the PAPI calls for errors? These type of results can happen if PAPI reports an error but your code ignores it and reads the counters anyway.
vweaver1
 
Posts: 50
Joined: Wed Feb 17, 2010 4:02 pm

Re: Incoherent results

Postby adiazpon » Fri Apr 16, 2010 5:29 am

I'm running in a:

more /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
stepping : 13
cpu MHz : 800.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no

I commented handle_error function becase in compilation I get this: "undefined reference to `handle_error". But I checked that and you are right thats calls are giving failures:

PAPI_start_counters(Events, NUM_EVENTS) != PAPI_OK and PAPI_read_counters(values, NUM_EVENTS) != PAPI_OK

How can i solve that? What library i need to use for call handle_error function, I suppose that function will give me answer about that problem.

Thanks again.
adiazpon
 
Posts: 11
Joined: Wed Mar 03, 2010 1:41 pm

Re: Incoherent results

Postby adiazpon » Fri Apr 16, 2010 5:59 am

Thinking on last thing you said, I tried to know which counters I can use in execution with this lines

Code: Select all
if (PAPI_get_event_info(Events[i],&info) != PAPI_OK) {
        fprintf (stderr,"Error: No instruction counter? How lame.\n");
        /*exit(1);*/
}
PAPI_event_code_to_name(Events[i], EventCodeStr);

if (info.count>0){
        printf ("This event (%s) is available on this hardware.\n", EventCodeStr);
        EventsAvailable[total_available] = Events[i];
        total_available++;
}else{
        printf ("This event (%s) is NOT!! available on this hardware.\n", EventCodeStr);
}


I put all the counters that were available inside an array, and I continue having the same problem. Error at starting and reading counters.

Execution result:
This event (PAPI_L1_TCM) is available on this hardware.
This event (PAPI_L2_TCM) is available on this hardware.
This event (PAPI_L3_TCM) is NOT!! available on this hardware.
This event (PAPI_L1_TCH) is NOT!! available on this hardware.
This event (PAPI_L2_TCH) is available on this hardware.
This event (PAPI_L3_TCH) is NOT!! available on this hardware.
Error: PAPI_start_counters
Error: PAPI_read_counters
-->1 (Read, principio)
PAPI_L1_TCM = 25769803778
PAPI_L2_TCM = 19348865247240072
PAPI_L2_TCH = 19499357686727896
Error: PAPI_accum_counters
-->2 (Accum, intermedio)
PAPI_L1_TCM = 25769803778
PAPI_L2_TCM = 19348865247240072
PAPI_L2_TCH = 19499357686727896
Error: PAPI_stop_counters
-->3 (Stop, final)
PAPI_L1_TCM = 25769803778
PAPI_L2_TCM = 19348865247240072
PAPI_L2_TCH = 19499357686727896

Thanks.
adiazpon
 
Posts: 11
Joined: Wed Mar 03, 2010 1:41 pm

Re: Incoherent results

Postby adiazpon » Fri Apr 16, 2010 11:53 am

I realised finally looking an the faq that it's a common error on my cpu.

See the faq--> "My program runs fine when measuring 1 or 2 events, but when I add more I get a -8, PAPI_ECNFLCT error code. The error text says, "Event exists. but cannot be counted due to hardware resource limitations". What does this mean?"

I need to solve it with multiplexing, thanks.
adiazpon
 
Posts: 11
Joined: Wed Mar 03, 2010 1:41 pm

Re: Incoherent results

Postby Harlan Kilstein » Tue Jun 15, 2010 2:57 am

adiazpon wrote:I realised finally looking an the faq that it's a common error on my cpu.

See the faq--> "My program runs fine when measuring 1 or 2 events, but when I add more I get a -8, PAPI_ECNFLCT error code. The error text says, "Event exists. but cannot be counted due to hardware resource limitations". What does this mean?"

I need to solve it with multiplexing, thanks.

Thanks
Harlan Kilstein
 
Posts: 1
Joined: Tue Jun 15, 2010 2:54 am


Return to General discussion

Who is online

Users browsing this forum: No registered users and 0 guests