[SciPy-Dev] Platform-dependent tests?

Ralf Gommers ralf.gommers@googlemail....
Wed Jun 1 17:12:43 CDT 2011


On Tue, May 31, 2011 at 12:13 AM, Warren Weckesser <
warren.weckesser@enthought.com> wrote:

> Jeff Armstrong has enhanced the Schur decomposition function
> scipy.linalg.schur to expose the ability to sort the eigenvalues (more
> accurately, group them according to a boolean function); see
> https://github.com/scipy/scipy/pull/23.  schur() is a wrapper for the
> DGEES Fortran library function.  According to its documentation, if the
> matrix is poorly scaled, the eigenvalues can fail to satisfy the sorting
> condition *after* they've been sorted, because of rounding errors.  The
> function returns an error code when this occurs.
>
> Jeff's code checks for this condition, and he also added a couple unit
> tests for it.  Unfortunately, the tests fail on my computer--that is, the
> error condition does not happen.  This is not surprising, as the error
> condition relies on the behavior of rounding errors.  So, to the question:
> is there a way to make these tests platform-dependent, so that they only run
> on a platform/architecture/whatever where the tests are known to trigger the
> desired condition?  Or is the result likely to depend on so many other
> factors (compiler and optimization settings, third party math library, phase
> of the moon, etc) that it is hopeless to try?
>

The test still enabled in Jeff's branch fails for me, while the
commented-out one would actually pass.

It's straightforward to make the test platform-dependent with the skipif
decorator, but I think you don't want to test this. The result will depend
on the exact config used, of which there are way too many. Failing tests
like these usually lead to some users thinking there's something wrong with
their install.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20110602/a74715d5/attachment.html 


More information about the SciPy-Dev mailing list