Question about Multiplex Mode

Open discussion of PAPI.

Question about Multiplex Mode

Postby rogerio » Mon Nov 09, 2015 8:16 am

Hi,

I have a doubt about the multiplex PAPI mode.
I'm need to get the values of performance counters to Float Point Instructions (FLOPS) and memory traffic in all the levels in memory hierarchy (acesses in caches levels and Main Memory).

I have read the PAPI documentation and some performance guides (intel).
I know that the hardware has few performance counters...
I test my Event Set using papi tools (papi_event_chooser and papi_command_line) and in normal mode I can not get all counters, because this hardware limitation.

So, I'm trying to use the multiplex mode. In my first test I'm considering only the Last Level Cache (LLC).

I choose this Event Set:

{"PAPI_DP_OPS", "PAPI_L3_TCA", "PAPI_L3_TCR", "UNHALTED_CORE_CYCLES", "UNHALTED_REFERENCE_CYCLES"}

And the correspondent Event Set with native events (I believe):

{"FP_COMP_OPS_EXE:SSE_SCALAR_DOUBLE", "FP_COMP_OPS_EXE:SSE_FP_PACKED_DOUBLE", "SIMD_FP_256:PACKED_DOUBLE", "perf::PERF_COUNT_HW_CACHE_LL:READ", "perf::PERF_COUNT_HW_CACHE_LL:WRITE", "UNHALTED_CORE_CYCLES", "UNHALTED_REFERENCE_CYCLES"}

I'm using all the initializations library, multiplex... as in multiplex.* samples code.

But PAPI is not returning the last two events in my set, these values always are zero.

When I read about the multiplex in PAPI, I understood that this mode exists to allow get more events than available number of hardware counters.
PAPI switches during the execution mapping my N events in hardware counters (4 if hyper threading is activated).
It lost in precision, but I get measures of all events in my Event Set.

But, I don't know If I'm doing something wrong...

My processor is - Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz.
L1 cache: 32KB data, 32KB instruction per core
L2 cache: 256KB per core
L3 cache: 24MB accessible by all cores
QPI: 6.4GT/sec
2 processors: 24 cores
64 Gb RAM

Is possible get measures of all events at the same execution or I need to split my measuring process and execute more times switching between different event sets?

Thanks for help!

Best regards,
Rogério
rogerio
 
Posts: 1
Joined: Mon Nov 09, 2015 8:12 am

Re: Question about Multiplex Mode

Postby s_ragate » Fri Jan 15, 2016 4:02 pm

The last 2 events are Architectural native events. I have not tried mixing PAPI preset events and architectural native events before for multiplexing. Could you please try only PAPI preset events (the ones with PAPI) and check multiplexing and let us know? It may not be related but just curious to see. Meanwhile I can check this combination for you.
s_ragate
 
Posts: 7
Joined: Fri Apr 10, 2015 1:55 pm

Re: Question about Multiplex Mode

Postby s_ragate » Fri Jan 15, 2016 4:52 pm

Hi,

I tried the same combination of events in PAPI MULTIPLEX and it worked for me, but I tried on a different machine. Please try the following on your machine and let me know,

*****************************************************************************************************************************************************************
#include<stdio.h>
#include<papi.h>
#include<stdlib.h>
#include<math.h>

int main(void){

char* events[]={"PAPI_DP_OPS","PAPI_L3_TCA","PAPI_L3_TCR","UNHALTED_CORE_CYCLES","UNHALTED_REFERENCE_CYCLES"};
long long values[5];
int EventSet=PAPI_NULL;
int i,ret;
if((ret=PAPI_library_init(PAPI_VER_CURRENT))!=PAPI_VER_CURRENT){
printf("lib_init:%s\n",PAPI_strerror(ret));
exit(-1);
}

if((ret=PAPI_multiplex_init())!=PAPI_OK){
printf("Multx init: %s\n",PAPI_strerror(ret));
exit(-1);
}

if((ret=PAPI_create_eventset(&EventSet))!=PAPI_OK){
printf("crete_eventset :%s \n",PAPI_strerror(ret));
exit(-1);
}

if((ret=PAPI_assign_eventset_component(EventSet,0))!=PAPI_OK){
printf("crete_eventset :%s \n",PAPI_strerror(ret));
exit(-1);
}


if((ret=PAPI_set_multiplex(EventSet))!=PAPI_OK){
printf("set multpx :%s \n",PAPI_strerror(ret));
exit(-1);
}

for(i=0;i<5;++i){
if((ret=PAPI_add_named_event(EventSet,events[i]))!=PAPI_OK){
printf("Add event:%s \n",PAPI_strerror(ret));
exit(-1);
}
}
if((ret=PAPI_start(EventSet))!=PAPI_OK){
printf("Start event: %s \n",PAPI_strerror(ret));
exit(-1);
}

int a=0;
for(i=1;i<10000;++i)
a=a+797*i;


if((ret=PAPI_stop(EventSet,values))!=PAPI_OK){
printf("stop event: %s \n",PAPI_strerror(ret));
exit(-1);
}

printf("\n\n");
for(i=0;i<5;++i)
printf("Event %s = %lld \n",events[i],values[i]);

return 0;

}

**********************************************************************************************************************************
s_ragate
 
Posts: 7
Joined: Fri Apr 10, 2015 1:55 pm


Return to General discussion (read-only)

Who is online

Users browsing this forum: No registered users and 1 guest

cron