[IPython-dev] Numpy with OpenBLAS vs. IPython
Florian M. Wagner
wagnerfl at student.ethz.ch
Fri Nov 1 05:42:10 EDT 2013
Any ideas? Has someone here a functioning setup with Numpy-OpenBlas and
the scientific (I)Python stack on Linux and is willing to share the
necessary installation steps?
Am 30.10.2013 09:46, schrieb Florian M. Wagner:
> I reproduced the error with the latest IPython source:
>
> fwagner at fwagner-notebook ~/Downloads/ipython $ ipython
> Python 2.7.4 (default, Sep 26 2013, 03:20:26)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 2.0.0-dev -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help -> Python's own help system.
> object? -> Details about 'object', use 'object??' for extra details.
>
> In [1]: A = np.random.randn(50,50)
>
> In [2]: A[0,0]
> Out[2]: 0.62268531821589967
>
> In [3]: A.T.dot(A)
> Speicherzugriffsfehler
>
> Compared to:
>
> Python 2.7.4 (default, Sep 26 2013, 03:20:26)
> [GCC 4.7.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy as np
> >>> A = np.random.randn(50,50)
> >>> A.T.dot(A)
> array([[ 4.61866860e+01, 1.97714469e+00, 8.78842173e+00, ...,
> -9.65143259e+00, 4.74312877e+00, -1.85163266e+01],
> [ 1.97714469e+00, 4.50113072e+01, -1.13105045e+01, ...,
> 2.31604581e+00, 4.93068512e+00, 1.29316267e+01],
> [ 8.78842173e+00, -1.13105045e+01, 6.02859864e+01, ...,
> -2.65040891e+00, 3.98374437e+00, -1.54860323e+01],
> ...,
> [ -9.65143259e+00, 2.31604581e+00, -2.65040891e+00, ...,
> 3.81774984e+01, 1.63768677e+00, 1.16681961e+01],
> [ 4.74312877e+00, 4.93068512e+00, 3.98374437e+00, ...,
> 1.63768677e+00, 5.11159138e+01, 6.56039753e-02],
> [ -1.85163266e+01, 1.29316267e+01, -1.54860323e+01, ...,
> 1.16681961e+01, 6.56039753e-02, 6.61061915e+01]])
>
>
>
> Am 30.10.2013 09:33, schrieb Florian M. Wagner:
>> Thanks guys,
>>
>> @Julian: Reducing the thread number did not help
>> @Thomas: dap is mpl-basemap dependency, fixed the import issue, but the
>> error still occurs
>>
>> It is really weird that it is occuring only when printing the array, or
>> slicing the array. And whats more weird, that it works in plain Python
>> as I understood that IPython has no numpy dependency?
>>
>> Thanks and regards
>> Florian
>>
>> Am 29.10.2013 19:39, schrieb Julian Taylor:
>>> does this also happen if you do this before starting ipython?
>>>
>>> export OPENBLAS_NUM_THREADS=1
>>> (assuming bash shell)
>>>
>>> On 29.10.2013 17:19, Florian M. Wagner wrote:
>>>> Dear all,
>>>>
>>>> I recently compiled numpy with OpenBlas for faster matrix-matrix
>>>> multiplication. Everything works fine, but IPython seems to dislike it.
>>>> I get a Segmentation Fault error when trying this (I reinstalled IPython
>>>> 1.1.0 after numpy compilation):
>>>>
>>>> fwagner at fwagner-notebook ~ $ ipython -c "import numpy as np; print
>>>> np.__version__; import IPython; print IPython.__version__; A =
>>>> np.random.randn(600, 600); print A[20,53]; print A"
>>>> /usr/local/bin/ipython:5: UserWarning: Module dap was already
>>>> imported from None, but /usr/lib/python2.7/dist-packages is being
>>>> added to sys.path
>>>> from pkg_resources import load_entry_point
>>>> 1.9.0.dev-54d3559
>>>> 1.1.0
>>>> -2.1004055886
>>>> Speicherzugriffsfehler
>>>>
>>>> In comparison, this works fine (just python instead of ipython):
>>>>
>>>> fwagner at fwagner-notebook ~ $ python -c "import numpy as np; print
>>>> np.__version__; import IPython; print IPython.__version__; A =
>>>> np.random.randn(600, 600); print A[20,53]; print A"
>>>> 1.9.0.dev-54d3559
>>>> 1.1.0
>>>> -1.10282239744
>>>> [[ 0.13798084 -0.39195796 -0.15309986 ..., 1.47471232 -0.9158455
>>>> 0.97060671]
>>>> [ 0.25720169 0.51895478 0.55175787 ..., -0.02010573 0.78047754
>>>> -1.07891961]
>>>> [ 1.59478156 0.81245486 -0.03959768 ..., -0.04816659 -0.03356907
>>>> -0.11860379]
>>>> ...,
>>>> [-0.06299817 -0.0956477 -0.32987518 ..., -1.47714386 1.66736916
>>>> -0.47704276]
>>>> [-0.93769589 1.50006542 0.97782803 ..., -0.5034154 1.31592011
>>>> -0.74482995]
>>>> [-0.24661336 -0.98979706 -0.39366363 ..., 0.20507632 0.8701609
>>>> -1.10449957]]
>>>>
>>>> Any ideas what might cause this problem?
>>>>
>>>> Thanks,
>>>>
>>>> Florian
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> IPython-dev mailing list
>>>> IPython-dev at scipy.org
>>>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131101/93d20bdb/attachment.html>
More information about the IPython-dev
mailing list