PAPI_3.7.1 Flops doesn't work properly Intel Core i7/Nehalem

Open discussion of PAPI.

PAPI_3.7.1 Flops doesn't work properly Intel Core i7/Nehalem

Postby Dmitry » Mon Dec 14, 2009 2:38 pm

Good Afternoon,

my proc is "Intel Core i7/Nehalem".

The measuring of Flops doesn't work properly in my tests.
I have seen in the code, that the function _papi_hwd_get_real_usec(void) calculates the time over the cycles and cpu's frequency:

Code: Select all
((long long)get_cycles() / (long long)_papi_hwi_system_info.hw_info.mhz);


But the frequency of cpu is not constant, it may be changed during the calculation (e.g. 1600...2800 MHz) .

Is it BUG or something else ?

Thank's
Dmitry
Dmitry
 
Posts: 13
Joined: Mon Dec 14, 2009 2:16 pm

Re: PAPI_3.7.1 Flops doesn't work properly Intel Core i7/Nehalem

Postby Dan Terpstra » Tue Dec 15, 2009 8:30 am

Hi -
The measurement of floating point operations for Nehalem is correct. This can be seen in several of our tests in the ctests directory, such as calibrate, first and zero. From your comment below, your concern is with the rate, floating point operations per second. You are correct that the processor frequency of newer processors can change in the middle of a test, or between the time when the cpu speed (hwi_system_info.hw_info.mhz) was calculated and when the test was run. The current PAPI code does not take this into account and can thus produce anomalous results. In other words, yes, this is a bug.
One way you can get around this is to compute floating point operations per cycle by measuring PAPI_FP_OPS and PAPI_TOT_CYC. Then you can postulate a clock rate or compute FLOPS for a variety of clock rates.
Hope this helps.
Dan Terpstra
 
Posts: 57
Joined: Mon Aug 24, 2009 5:42 pm

Re: PAPI_3.7.1 Flops doesn't work properly Intel Core i7/Nehalem

Postby Dmitry » Tue Dec 15, 2009 11:10 am

Hi,
thank you for your answer. Yes of course, I've asked about flops per second.
It's most possible to take a sys_time as "real time".
So you can compute the floating point operations per cycle by measuring PAPI_FP_OPS and sys_time. I think, it's a suitable way? May be it's possibly to correct this bug in such way ?
Dmitry
 
Posts: 13
Joined: Mon Dec 14, 2009 2:16 pm

Re: PAPI_3.7.1 Flops doesn't work properly Intel Core i7/Nehalem

Postby Dan Terpstra » Tue Jan 05, 2010 11:27 am

System time is usually coarser grained than we would like to provide for PAPI. You can certainly use this approach yourself to measure floating point operations and divide by the system time. Just keep in mind that you may not get consistent results, both because of the granularity issue and because the clock speed of the processor can still change during the run.
Dan Terpstra
 
Posts: 57
Joined: Mon Aug 24, 2009 5:42 pm


Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest