[SciPy-User] understanding machine precision

Keith Goodman kwgoodman@gmail....
Tue Dec 14 14:17:25 CST 2010


On Tue, Dec 14, 2010 at 11:38 AM,  <josef.pktd@gmail.com> wrote:
> On Tue, Dec 14, 2010 at 2:29 PM, Francesc Alted <faltet@pytables.org> wrote:
>> A Tuesday 14 December 2010 20:17:10 Nils Wagner escrigué:
>>> Hi all,
>>>
>>> I am using ATLAS
>>>
>>> python -i try_deterministic.py
>>>
>>> lstsq
>>> 0.0
>>> 0.0
>>> 0.0
>>> 0.0
>>> 0.0
>>
>> That's interesting.  Maybe Josef is using a threaded ATLAS?  I
>> positively know that threading introduces variability in the order that
>> the computations are done.  However, I'm not sure on why ATLAS has
>> decided to use several threads for so small matrices ((100, 10)) :-/
>
> No, I'm using an old plain ATLAS with a single CPU, but if Skipper is
> getting it also with 32bit mkl, then there might still be another
> Windows "feature" in play.
>
> Since my results are identical across python session, but not within,
> the results are still deterministic and cannot depend on how busy my
> computer is.

Come to think if it, one of my tests is to compare the output of each
new release of one of my packages with the previous release. My
colleague runs the test on a windows machine. He gets a difference in
output when there should be none. Even after pulling the installer
apart and installing the non-ATLAS version he sees the difference on
windows. It would be great to figure out what is going on.

$ python -i try_deterministic.py

lstsq
0.0
0.0
0.0
0.0
0.0

pinv
0.0
0.0
0.0
0.0
0.0

pinv2
0.0
0.0
0.0
0.0
0.0

$ uname -a
Linux kg 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 10:14:11 UTC 2010
x86_64 GNU/Linux

>>> np.show_config()
atlas_threads_info:
  NOT AVAILABLE
blas_opt_info:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/local/lib']
    define_macros = [('ATLAS_INFO', '"\\"3.8.3\\""')]
    language = c
atlas_blas_threads_info:
  NOT AVAILABLE
lapack_opt_info:
    libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/local/lib']
    define_macros = [('NO_ATLAS_INFO', 2)]
    language = f77
atlas_info:
    libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/local/lib']
    language = f77
lapack_mkl_info:
  NOT AVAILABLE
blas_mkl_info:
  NOT AVAILABLE
atlas_blas_info:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/local/lib']
    language = c
mkl_info:
  NOT AVAILABLE


More information about the SciPy-User mailing list