[Numpy-discussion] svd + multiprocessing hangs

Julian Taylor jtaylor.debian@googlemail....
Wed Jun 12 12:27:43 CDT 2013


On 12.06.2013 18:07, Uwe Schmitt wrote:
> Dear all,
> 
> the following code hangs on my Ubuntu machine.
> I use self compiled numpy 1.7.1 and Python
> 2.7.3
> 
> -----
> 
> import numpy
> import numpy.linalg
> import multiprocessing
> 
> def classify():
>     X = numpy.random.random((10,3))
>     print "before svd"
>     numpy.linalg.svd(X)
>     print "this message is not printed"
> 
> 
> if __name__ == "__main__":
>     p = multiprocessing.Process(target=classify, args=())
>     p.start()
>     p.join()
> 

I'm guessing you are using openblas?
check with:
ls -l /etc/alternatives/libblas.so.3

there are known hanging problems with openblas and multiprocessing.
you can work around them by disabling threading in openblas
(OPENBLAS_NUM_THREADS=1).


More information about the NumPy-Discussion mailing list