<br><br><div class="gmail_quote">On Sun, May 13, 2012 at 1:14 PM, Paul Anton Letnes <span dir="ltr"><<a href="mailto:paul.anton.letnes@gmail.com" target="_blank">paul.anton.letnes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Sat, May 12, 2012 at 9:50 PM, Ralf Gommers<br>
<<a href="mailto:ralf.gommers@googlemail.com">ralf.gommers@googlemail.com</a>> wrote:<br>
><br>
><br>
> On Sun, May 6, 2012 at 12:12 AM, Charles R Harris<br>
> <<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>> wrote:<br>
>><br>
>><br>
>><br>
>> On Sat, May 5, 2012 at 2:56 PM, Paul Anton Letnes<br>
>> <<a href="mailto:paul.anton.letnes@gmail.com">paul.anton.letnes@gmail.com</a>> wrote:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> I'm getting a couple of errors when testing. System:<br>
>>> Arch Linux (updated today)<br>
>>> Python 3.2.3<br>
>>> gcc 4.7.0<br>
>>> (Anything else?)<br>
>>><br>
>>> I think that this error:<br>
>>> AssertionError: selectedrealkind(19): expected -1 but got 16<br>
>>> is due to the fact that newer versions of gfortran actually supports<br>
>>> precision this high (quad precision).<br>
>>><br>
>><br>
>> Yes, but it should be fixed. I can't duplicate this here with a fresh<br>
>> checkout of the branch.<br>
><br>
><br>
> This failure makes no sense to me.<br>
><br>
> Error comes from this code:<br>
><br>
>     'selectedrealkind(%s): expected %r but got %r' %  (i,<br>
> selected_real_kind(i), selectedrealkind(i)))<br>
><br>
> So "selected_real_kind(19)" returns -1.<br>
><br>
> selected_real_kind is the function<br>
> numpy.f2py.crackfortran._selected_real_kind_func, which is defined as:<br>
><br>
> def _selected_real_kind_func(p, r=0, radix=0):<br>
>     #XXX: This should be processor dependent<br>
>     # This is only good for 0 <= p <= 20<br>
>     if p < 7: return 4<br>
>     if p < 16: return 8<br>
>     if platform.machine().lower().startswith('power'):<br>
>         if p <= 20:<br>
>             return 16<br>
>     else:<br>
>         if p < 19:<br>
>             return 10<br>
>         elif p <= 20:<br>
>             return 16<br>
>     return -1<br>
><br>
> For p=19 this function should always return 16. So the result from compiling<br>
> foo.f90 is fine, but the test is broken in a very strange way.<br>
><br>
> Paul, is the failure reproducible on your machine? If so, can you try to<br>
> debug it?<br>
><br>
> Ralf<br>
<br>
</div></div>Hi Ralf.<br>
<br>
The Arch numpy (1.6.1) for python 2.7, installed via pacman (the<br>
package manager) has this problem.<br>
<br>
After installation of numpy 1.6.2rc1 in a virtualenv, the test passes.<br>
Maybe the bug was fixed in the RC, and I screwed up which numpy<br>
version I tested? I'm sorry that I can't find out - I just built a new<br>
machine, and the old one is lying around the livingroom in pieces. Was<br>
that particular bit of code changed between 1.6.1 and 1.6.2rc1?<br>
<span class="HOEnZb"></span></blockquote></div><br>It was actually, in <a href="https://github.com/numpy/numpy/commit/e7f2210e1">https://github.com/numpy/numpy/commit/e7f2210e1</a>.<br><br>So you tested 1.6.1 by accident before, and it's working now? Problem solved in that case.<br>
<br>Ralf<br><br>