[pythran] Re: NPB / pythran

  • From: Brunet Pierrick <pierrick.brunet@xxxxxxxxxxxxxxxxxxx>
  • To: pythran@xxxxxxxxxxxxx
  • Date: Sat, 01 Dec 2012 01:02:13 +0100

Le 30/11/2012 15:10, serge Guelton a écrit :
On Fri, Nov 30, 2012 at 10:56:38AM +0100, serge Guelton wrote:
Hi there,

we are currently working on the conversion of OMP Nas Parallel
Benchmark. Just so you know :

the ep benchmark has been converted and works fine in sequential. a bug
in gcc prevents parallelization (no support for thread_private for
non-POD types)

Pierrick is working on cg, and I am looking LU.

Lu seems reaaaaly difficult, I'll give a try to IS.

Hi all,

Today, I had some time to work on cg. I fix the issue I did when I translated the code ( a damn +1 in a range into a for loop ...) and now, I have the same result for C code and python code.
But, I don't have same result for python and pythran.
I think it is due to constant folding.

with r23 = pow(0.5,23.0)
r23*r23*r23*r23*r23*r23 = 2.8698592549372254e-42 (with python)

with pythran, we have constant folding which translate r23 = pow(0.5,23.0) by
r23 = 1.19209289551e-07
r23*r23*r23*r23*r23*r23 = 2.869859254968822e-42

The difference is not really important but may cause some issues. May be it can be solve juste writing constant folding with more significand numbers?

This is not the only issue as the result is not the same between python and pythran if I disable constant folding but it creates a totaly different result.

I am looking for more informations ...

Good night,

Other related posts: