I was trying to set the granularity level to per process instead of per thread by
int retval = PAPI_set_granularity(2); and
even tried
retval = PAPI_set_cmp_granularity(PAPI_GRN_PROC,0);
can anyone please point out the error and if possible correct the function call.