[SciPy-Dev] Lapack alignment test in linalg failing

Ralf Gommers ralf.gommers at googlemail.com
Sun May 30 10:11:33 EDT 2010


Hi Anne,

Will you be able to resolve this issue before the first release candidate
for 0.8.0 comes out (planned on June 11th)? If not, can you please mark it
as knownfail in 0.8.x?

Thanks,
Ralf


[below is copy of thread from April 13]

Anne Archibald wrote:
> On 12 April 2010 16:34, Warren Weckesser <warren.weckesser <at> enthought.com> wrote:

>
>> Anne Archibald wrote:
>>
>>> On 12 April 2010 12:22, Warren Weckesser <warren.weckesser <at> enthought.com> wrote:
>>>

>>>
>>>> I created a ticket: http://projects.scipy.org/scipy/ticket/1152
>>>>
>>>> If any of the original authors or editors of the code that tests

>>>> misaligned arrays are still around, some feedback would be appreciated,
>>>> especially about why the misalignment is being done twice.  I'm not sure
>>>> if that is intentional.

>>>>
>>>>
>>> That code is my fault, and it's a mess. I think the correct way to
>>> handle this is to catch the "NaNs/Infs present" exception, or possibly

>>> to edit the misaligned arrays to remove any NaNs/Infs. Unfortunately
>>> the bug this was attempting to tickle is deep in the bowels of ATLAS,
>>> and is very difficult to trigger correctly; in particular, an identity

>>> matrix does not trigger the bug. This is the reason S is misaligned
>>> twice: it takes that kind of bizarre data to trigger the bug. Since
>>> the symptom of the bug is a segfault, raising a "no NaNs" error

>>> qualifies as a pass (though I'm a little surprised you got any NaNs -
>>> what platform are you using?)
>>>
>>>
>>>
>> Using scipy 0.8.0 r6120 or later, I get the same error on Mac OSX, Linux

>> (RH 64 bit), and Windows XP.
>>
>
> That is disturbing. I'll try to take a look at this version when I get
> home and see if I trigger the bug.
>
>
>> Does the test really need to reuse the output of the first call of

>> solve() as the input to the second call? That is, does it really need
>> overwrite enabled?  If so, then catching the exception and calling that
>> a "pass" doesn't seem right, because that prevents the underlying lapack

>> routine from being called the second time.
>>
>
> The bug is only triggered when overwrite is enabled, but the code does
> not actually reuse any argument arrays.

The arrays are reused in check_lapack_misaligned(); this is what is

causing the error.  When func=solve, args=(S,b) and
kwargs={overwrite_a:True, overwrite_b:True}, and when i=0, 'solve' is
called once on line 1071 (referring to rev 6321), and again on line
1074. In the second call, a[i] is a transposed view of the same data as

the previous call, and b is the same array.  The error occurs when the
first call results in NaNs in the arrays.

Warren

>  I should at least rearrange
> the code so that the different offsets are different tests (so that

> all get run even if one fails), but I had in mind catching the
> exception on one call of the LAPACK function but then passing on to
> the others.
>
> Anne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100530/5fb5203e/attachment.html>


More information about the SciPy-Dev mailing list