Page 1 of 1

PAPI_FP_OPS always zero

PostPosted: Fri Feb 11, 2011 4:22 pm
by massimo
Hello, I just installed papi-4.1.2.1 on a linux system with kernel 2.6.38.
Apparently everything went just fine but when I ran the test program "flops" (in the subdir ctests) I got the following output:

Real_time: 9.005781 Proc_time: 13.490558 Total flpins: 0 MFLOPS: 0.000000
flops.c PASSED

that is ZERO mflops. I tried other programs and always I get PAPI_FP_OPS = 0.
The "papi_avail" utility shows in its output

PAPI_FP_INS 0x80000034 Yes No Floating point instructions
PAPI_FP_OPS 0x80000066 Yes Yes Floating point operations

so I would expect it to measure MFLOPS. Is there anything else I can try?
I append below also the output of the cat /cpu/procinfo per one of the CPU of my system
Thanks in advance for any help,
Massimo

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
stepping : 5
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid
bogomips : 4533.93
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

Re: PAPI_FP_OPS always zero

PostPosted: Fri Feb 11, 2011 4:46 pm
by danterpstra
This is obviously wrong.
What compiler and version are you using?

Re: PAPI_FP_OPS always zero

PostPosted: Fri Feb 11, 2011 5:02 pm
by massimo
Here is the output of gcc -v

Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)

Thanks!
Massimo

Re: PAPI_FP_OPS always zero

PostPosted: Fri Feb 11, 2011 5:53 pm
by danterpstra
32 or 64 bit?

Re: PAPI_FP_OPS always zero

PostPosted: Fri Feb 11, 2011 5:55 pm
by massimo
32 bit.

Thanks,
Massimo

Re: PAPI_FP_OPS always zero

PostPosted: Fri Feb 11, 2011 6:29 pm
by vweaver1
massimo wrote:32 bit.

This is the problem, the current PAPI_FP_OPS event code is counting SSE style events, but a 32-bit i686 compiler is not going to generate those by default.

We're currently investigating the best way to update the PAPI_FP_OPS event on Nehalem to avoid this problem

Re: PAPI_FP_OPS always zero

PostPosted: Sat Feb 12, 2011 3:07 am
by massimo
Thanks a lot. I will upgrade the operating system to the 64 bit version.
Thanks again,
Massimo