HELP on PAPI 3.70 in Ubuntu Linux 9.10

Open discussion of PAPI.

HELP on PAPI 3.70 in Ubuntu Linux 9.10

Postby koukos » Tue Oct 06, 2009 3:31 pm

Good evening.

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 support
in 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 i
encounter. At first i realized that there is no need for a custom kernel built in Ubuntu because the
kernel 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 :
# CPU
KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid", MODE="0444" #This was the initial kernel mode under /lib/udev/rules.d
KERNEL=="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=yes
the dump is :

checking for architecture... i686
checking for OS... linux
checking for OS version... 2.6.31-11-generic
checking for CPU type... core
checking for 32 or 64 bit mode... default
............................
checking for working MMTIMER... no
checking for working CLOCK_REALTIME_HR POSIX 1b timer... no
checking for working CLOCK_REALTIME POSIX 1b timer... yes
checking for real time clock or cycle counter... clock_realtime
checking for working __thread... yes
checking for high performance thread local storage... __thread
checking for working CLOCK_THREAD_CPUTIME_ID POSIX 1b timer... yes
checking for thread virtual clock or cycle counter... clock_thread_cputime_id
checking for /sys/class/perfctr... no
checking for /dev/perfctr... yes
checking for /sys/kernel/perfmon/version... no
checking for /proc/perfmon... no
configure: Generating perfmon_events_table.h
checking for building tests static... no
checking for which libraries to build... shared static
checking for perfctr version... 2.6
checking for Makefile to use... linux-pcl
checking for library to link... static
configure: Compiling genpapifdef with gcc
configure: Generating fpapi.h
configure: Generating f77papi.h
configure: Generating f90papi.h
configure: creating ./config.status
config.status: creating Makefile
config.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.

When i try to make the lib i get the following errors.

gcc -fPIC -DPIC -shared -Wl,-soname -Wl,libpapi.so -Xlinker "-rpath" -Xlinker "/usr/local/lib" -Wl,-rpath-link -Wl,/home/koukos/Desktop/papi-3.7.0/src/libpfm-3.y/lib -I. -g -O2 -DSTATIC_PERFMON_EVENTS_TABLE -D_GNU_SOURCE -Wall -DUSE_COMPILER_TLS -DPAPI_NO_MEMORY_MANAGEMENT -D_REENTRANT -DSTATIC_PERFMON_EVENTS_TABLE -I/home/koukos/Desktop/papi-3.7.0/src/libpfm-3.y/include -DSUBSTRATE_USES_LIBPFM -DSUBSTRATE=\"pcl.h\" papi_pfm_events.c sys_perf_counter_open.c x86_cache_info.c papi.c papi_internal.c papi_hl.c extras.c multiplex.c papi_fwrappers.c papi_fwrappers_.c papi_fwrappers__.c PAPI_FWRAPPERS.c papi_data.c threads.c perfmon-memory.c pcl.c papi_preset.c papi_vector.c papi_memory.c -o libpapi.so -Bdynamic -L/home/koukos/Desktop/papi-3.7.0/src/libpfm-3.y/lib -lpfm
In file included from papi_internal.h:177,
from papi_pfm_events.c:18:
pcl.h:37:26: error: perf_counter.h: No such file or directory

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.

Thanks.

Constantinos Koukos
Computer Architecture and VLSI Systems,
Institute of Computer Science [at] forth.gr
koukos
 
Posts: 2
Joined: Tue Oct 06, 2009 2:49 pm

Re: HELP on PAPI 3.70 in Ubuntu Linux 9.10

Postby Dan Terpstra » Tue Oct 06, 2009 4:27 pm

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.h
to
/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.
Dan Terpstra
 
Posts: 57
Joined: Mon Aug 24, 2009 5:42 pm

Re: HELP on PAPI 3.70 in Ubuntu Linux 9.10

Postby koukos » Tue Oct 06, 2009 8:41 pm

Thanks.

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 users
don'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/zero
PAPI 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 FAILED
Line # 63
Error in PAPI_start: PAPI_EINVAL

I tried to change /etc/udev/rules.d/50-udev-default.rules like

# CPU
KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid", MODE="0644"
KERNEL=="msr[0-9]*", NAME="cpu/%n/msr", MODE="0644"
KERNEL=="microcode", NAME="cpu/microcode", MODE="0644"
KERNEL=="perfctr", NAME="perfctr", MODE="0666"

and chmod 666 /lib/udev/devices/perfctr

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 add
the events lib doesn't have permission.

Is there anything i can try to solve this?

Thanks again.
koukos
 
Posts: 2
Joined: Tue Oct 06, 2009 2:49 pm

Re: HELP on PAPI 3.70 in Ubuntu Linux 9.10

Postby ksherdy » Thu Nov 05, 2009 9:35 pm

I would like to say I am impressed with no longer needing to do a kernel build for Ubuntu 9.10, however, I am also experiencing the identical problem.
ksherdy
 
Posts: 3
Joined: Thu Nov 05, 2009 9:30 pm

Re: HELP on PAPI 3.70 in Ubuntu Linux 9.10

Postby Dan Terpstra » Fri Nov 06, 2009 12:13 pm

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.
Dan Terpstra
 
Posts: 57
Joined: Mon Aug 24, 2009 5:42 pm

Re: HELP on PAPI 3.70 in Ubuntu Linux 9.10

Postby ksherdy » Sun Nov 15, 2009 2:31 am

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

As before using papi 3.7.0 the 'make test' command fails as follows.

make test
cd ctests; make CC="gcc" CC_R="gcc -pthread" CFLAGS="-I.. -g -O2 -DSTATIC_PERFMON_EVENTS_TABLE -D_REENTRANT -D_GNU_SOURCE -Wall -DUSE_COMPILER_TLS -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PERFMON_EVENTS_TABLE -DPCLINCLUDE=\"./perf_counter.h\" -I/home/ksherdy/SW-Archive/papi-3.7.1/src/libpfm-3.y/include -DSUBSTRATE_USES_LIBPFM" SMPCFLGS="" OMPCFLGS="" TOPTFLAGS="-g -O" NOOPT="" LDFLAGS=" " LIBRARY=../libpapi.a ear serial forkexec_tests overflow_tests profile_tests multiplex_and_pthreads shared
make[1]: Entering directory `/home/ksherdy/SW-Archive/papi-3.7.1/src/ctests'
make[1]: Nothing to be done for `ear'.
make[1]: Nothing to be done for `serial'.
make[1]: Nothing to be done for `forkexec_tests'.
make[1]: Nothing to be done for `overflow_tests'.
make[1]: Nothing to be done for `profile_tests'.
make[1]: Nothing to be done for `multiplex_and_pthreads'.
make[1]: Nothing to be done for `shared'.
make[1]: Leaving directory `/home/ksherdy/SW-Archive/papi-3.7.1/src/ctests'
ctests/zero
PAPI 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 FAILED
Line # 63
Error in PAPI_start: PAPI_EINVAL

make: *** [test] Error 1

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.
ksherdy
 
Posts: 3
Joined: Thu Nov 05, 2009 9:30 pm

Re: HELP on PAPI 3.70 in Ubuntu Linux 9.10

Postby hdpfeiffer » Tue Oct 19, 2010 12:22 pm

I am getting the same error. Did anyone get a solution to this problem or should I be using a different version of papi on Ubuntu 9.10?

Thanks.
hdpfeiffer
 
Posts: 1
Joined: Tue Oct 19, 2010 12:13 pm

Re: HELP on PAPI 3.70 in Ubuntu Linux 9.10

Postby danterpstra » Wed Oct 20, 2010 12:00 pm

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.
danterpstra
 
Posts: 63
Joined: Wed Jun 23, 2010 2:21 pm


Return to General discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron