PAPI on pandaboard.

Open discussion of PAPI.

PAPI on pandaboard.

Postby robertbell » Mon Jun 18, 2012 5:39 am

Hi all,

I am trying to compile PAPI on the following system:

Linux pandaboard 3.0.0-1207-omap4 #17-Ubuntu SMP PREEMPT Wed Feb 22 17:07:55 UTC 2012 armv7l armv7l armv7l GNU/Linux

More systems details are below, but I get the following errors:

./configure
.
.
.

make

.
.
.
gcc -fPIC -DPIC -shared -Wl,-soname -Wl,libpapi.so -Xlinker "-rpath" -Xlinker "/usr/local/lib" -Wl,-rpath-link -Wl,/home/rbell/papi-4.4.0/src/libpfm4/lib -I. -g -DSTATIC_PAPI_EVENTS_TABLE -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Wall -I/home/rbell/papi-4.4.0/src/libpfm4/include -DSUBSTRATE_USES_LIBPFM -DSUBSTRATE_NAME_perf_events -Wextra -DSUBSTRATE=\"perf_events.h\" -O2 -DPAPI_NO_MEMORY_MANAGEMENT sys_perf_event_open.c linux-timer.c linux-common.c papi_libpfm4_events.c papi_libpfm_presets.c papi.c papi_internal.c papi_hl.c extras.c multiplex.c papi_fwrappers.c papi_fwrappers_.c papi_fwrappers__.c upper_PAPI_FWRAPPERS.c papi_data.c threads.c cpus.c linux-memory.c perf_events.c papi_preset.c papi_vector.c papi_memory.c freq.c papi_user_events.c -o libpapi.so.4 -Bdynamic -L/home/rbell/papi-4.4.0/src/libpfm4/lib -lpfm
/tmp/ccbugCDx.s: Assembler messages:
/tmp/ccbugCDx.s:341: Error: selected processor does not support Thumb mode `swp r3,r3,[r2]'
/tmp/ccbugCDx.s:846: Error: selected processor does not support Thumb mode `swp r2,r2,[r1]'
/tmp/ccbugCDx.s:1042: Error: selected processor does not support Thumb mode `swp r3,r3,[r2]'
/tmp/ccbugCDx.s:2589: Error: selected processor does not support Thumb mode `swp r3,r3,[r2]'
/tmp/ccbugCDx.s: Assembler messages:
/tmp/ccbugCDx.s:560: Error: selected processor does not support Thumb mode `swp r3,r3,[r2]'
/tmp/ccbugCDx.s:5212: Error: selected processor does not support Thumb mode `swp r2,r2,[r0]'
/tmp/ccbugCDx.s:5640: Error: selected processor does not support Thumb mode `swp r2,r2,[r1]'
/tmp/ccbugCDx.s:11033: Error: selected processor does not support Thumb mode `swp r0,r0,[r3]'
/tmp/ccbugCDx.s: Assembler messages:
.
.
.

Any insight would be most appreciated.

Best,

Robert.

------
Detailed info:

PAPI version: 4.4.0.

CPU info:

rbell@pandaboard:~/papi-4.4.0/src$ cat /proc/cpuinfo
Processor : ARMv7 Processor rev 3 (v7l)
processor : 0
BogoMIPS : 2007.19

processor : 1
BogoMIPS : 1965.18

Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x1
CPU part : 0xc09
CPU revision : 3

Hardware : OMAP4 Panda board
Revision : 0020
Serial : 0000000000000000

Other info:

cat /proc/sys/kernel/perf_event_paranoid
1
robertbell
 
Posts: 2
Joined: Mon Jun 18, 2012 5:22 am

Re: PAPI on pandaboard.

Postby K_Gilbert » Thu Jun 21, 2012 2:10 pm

I'm currently attempting to run PAPI (4.4.0) on a Pandaboard as well (Linux Panda1 3.2.0-1414-omap4 #19-Ubuntu SMP PREEMPT Thu May 31 15:23:07 UTC 2012 armv7l armv7l armv7l GNU/Linux). I received the same assembler error messages, and after some digging learned that the op-code 'swp' is no longer utilized in new ARM processors (such as the Cortex A9 ARMv7l currently being used on the Pandaboard). After building each file one by one, the offending file appears to be 'linux-lock.h' inside of the /papi-4.4.0/src/ directory. With the help of my professor, I followed advice provided on Ubuntu Wiki and replaced the inline assembly with the equivalent GCC intrinsic code. (https://wiki.ubuntu.com/ARM/Thumb2 ; under "Assembler Errors"). Below is the broken assembly function commented out and replaced with the working GCC call:

static inline int __arm_papi_spin_lock (volatile unsigned int *lock)
{
unsigned int val;

do {
val = __sync_lock_test_and_set(lock, 1); //GCC intrinsic, replace assembly inline code
/* asm volatile ("swp %0, %1, [%2]"
: "=r" (val)
: "0" (1), "r" (lock)
: "memory"); */
} while (val != 0);

return 0;
}

Altering this file appended the assembler errors, and allowed me to make and install PAPI. However, I am currently running into problems when trying to run the tests; namely, a substantial amount of them fail. I mention this because you said you were running on a Pandaboard as well. This may simply be a mistake on my part, but it appears that PAPI has some problems reading the hardware registers on this ARM processor, giving me "PAPI_ECNFLCT" errors rather often, meaning "The underlying counter hardware can not count this event and other events in the EventSet simultaneously." Regardless, I hope this helps you and good luck!
K_Gilbert
 
Posts: 1
Joined: Thu Jun 21, 2012 10:53 am

Re: PAPI on pandaboard.

Postby fayindark » Mon Oct 08, 2012 6:10 am

K_Gilbert wrote: Below is the broken assembly function commented out and replaced with the working GCC call:

static inline int __arm_papi_spin_lock (volatile unsigned int *lock)
{
unsigned int val;

do {
val = __sync_lock_test_and_set(lock, 1); //GCC intrinsic, replace assembly inline code
/* asm volatile ("swp %0, %1, [%2]"
: "=r" (val)
: "0" (1), "r" (lock)
: "memory"); */
} while (val != 0);

return 0;
}

Altering this file appended the assembler errors, and allowed me to make and install PAPI. However, I am currently running into problems when trying to run the tests; namely, a substantial amount of them fail. I mention this because you said you were running on a Pandaboard as well. This may simply be a mistake on my part, but it appears that PAPI has some problems reading the hardware registers on this ARM processor, giving me "PAPI_ECNFLCT" errors rather often, meaning "The underlying counter hardware can not count this event and other events in the EventSet simultaneously." Regardless, I hope this helps you and good luck!


Hi,Gilbert, I have tried your solution and I works. However, the PAPI_ECNFLCT problem is still there. Do you have any suggestion about this?
fayindark
 
Posts: 5
Joined: Thu Sep 29, 2011 3:03 pm


Return to General discussion

Who is online

Users browsing this forum: Rereesogy and 2 guests

cron