I would like some help on installing PAPi to the latest linux 2.6.31 kernel with PCL support.So as it seems i have correctly built and installed the kernel,modules,headers with PCL supportin an ubuntu (9.10) still beta system but i can't install PAPI. I read in the manual that this mode(not requiring a kernel patch) is still experimental and i would like to post some problems iencounter. At first i realized that there is no need for a custom kernel built in Ubuntu because thekernel is by default built with PCL. Also it has APIC and SMT support by default.I have correctly installed perfctr under /lib/udev/devices/and modified the /etc/udev/rules.d/50-udev-default.rules (in this distribution looks more than suse config) as :# CPUKERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid", MODE="0444" #This was the initial kernel mode under /lib/udev/rules.dKERNEL=="msr[0-9]*", NAME="cpu/%n/msr", MODE="0444" # so i kept the permissions unchanged.KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"KERNEL=="perfctr", NAME="perfctr", MODE="0666" # I also tried 0644. Failed as well.

so when i make ./configure --with-pcl=yesthe dump is :

checking for architecture... i686checking for OS... linuxchecking for OS version... 2.6.31-11-genericchecking for CPU type... corechecking for 32 or 64 bit mode... default............................checking for working MMTIMER... nochecking for working CLOCK_REALTIME_HR POSIX 1b timer... nochecking for working CLOCK_REALTIME POSIX 1b timer... yeschecking for real time clock or cycle counter... clock_realtimechecking for working __thread... yeschecking for high performance thread local storage... __threadchecking for working CLOCK_THREAD_CPUTIME_ID POSIX 1b timer... yeschecking for thread virtual clock or cycle counter... clock_thread_cputime_idchecking for /sys/class/perfctr... nochecking for /dev/perfctr... yeschecking for /sys/kernel/perfmon/version... nochecking for /proc/perfmon... noconfigure: Generating perfmon_events_table.hchecking for building tests static... nochecking for which libraries to build... shared staticchecking for perfctr version... 2.6checking for Makefile to use... linux-pclchecking for library to link... staticconfigure: Compiling genpapifdef with gccconfigure: Generating fpapi.hconfigure: Generating f77papi.hconfigure: Generating f90papi.hconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating config.h

This far perfctr version is detected as 2.6 and /dev/perfctr is detected but /sys/class/perfctr seems to be missing.The GCC is 4.4.1.

in did the perf_counter.h exists and it is located under : /usr/src/linux-headers-2.6.31-11/arch/x86/include/asm.i also notice that in the above gcc command -I doesn't have a path but a dot(.) instead ?A lot of other errors occurs during compilation but i think it's because of the missing header file so i don't post them.

Am i doing something wrong or forgetting something? What i can do to compile the lib?Sorry if i am posting on wrong section i didn't found any bugs or help section.

I think the problem is that Ubuntu isn't properly exporting perf_counter.h to a directory where you can include it. You can try putting in a soft link from/usr/include/linux/perf_counter.hto/usr/src/linux-headers-2.6.31-11/include/linux/perf_counter.h

That worked for us when we had a similar problem.Also note that although the perfctr patch and perf_counters should play nicely together, there is no need to install perfctr if you want to use the built-in perf_counters. I know it's confusing, but I hope this helps.

It actually worked.in pcl.h at line 37 there is an #include "perf_counter.h" so a soft link directly to the papi/src/ directory solved the problem.This actually compiled with both a custom and the distribution kernel which means that Ubuntu 9.10 usersdon't have to make a custom kernel to use PAPI but when i tried to make test it failed with:

koukos@2K-Laptop:~/Desktop/papi-3.7.0/src$ make test................ctests/zeroPAPI Error: sys_perf_counter_open returned error on event #0. Unix says, Operation not permitted.PAPI_FP_INS is not available.PAPI Error: sys_perf_counter_open returned error on event #0. Unix says, Operation not permitted.PAPI_TOT_CYC is not available.zero.c FAILEDLine # 63Error in PAPI_start: PAPI_EINVAL

and reboot, make clean, reconfigure, recompile but the error insists?As i can realize from the zero.c source code the first init statements :PAPI_library_init , PAPI_get_hardware_info succeeds but when try to addthe events lib doesn't have permission.

We are working on cleaning up the install process for perf_events on new kernels. If you're brave enough, you could try accessing cvs directly and checking out the papi-3-7-0 branch. Be forwarned that we are aware of, and working to fix bugs in the perf_event interface that cause many events to return zero counts. To access cvs, see the PAPI FAQ: http://icl.cs.utk.edu/papi/faq/index.html#172. Use the cvs command line: cvs co -r papi-3-7-0 papi to get the proper branch.

I have Ubuntu 9.10 installed on a Dell Inspiron 6400 laptop with a Core 2 Duo processor (Intel Centrino Duo). The kernel version is 2.6.31-14

I download papi 3.7.1 following the instructions at 'http://spiral.cs.drexel.edu/wiki/Papi370Ubuntu910'. I added --with-pcl-incdir=. to the configuration parameters './configure --with-pcl=yes --prefix=/usr/local/papi-3.7.1 --with-pcl-incdir=.'

I curious to find out if I will be able to install PAPI without a custom kernel build in the way described by 'http://spiral.cs.drexel.edu/wiki/Papi370Ubuntu910'. I'm not sure what the next steps are to correct the error.

You really shouldn't be using PAPI 3.7 anymore. If you're stuck with a 2.6.31 kernel, I'd recommend trying PAPI 4.1.0. But you'd probably be happier with a more recent kernel (2.6.32 or higher) and PAPI 4.1.1.