Skip to content

numpy.linalg hangs with multiprocessing and OpenBLAS / Linux #4813

Closed

Description

@vmarkovtsev

Consider the following code:

import numpy
from numpy.linalg import inv
from multiprocessing import Process

def hang():
    a = numpy.identity(3)
    b = inv(a)


p = Process(target=hang)
p.start()
p.join()

If numpy uses OpenBLAS, it hangs forever consuming 100% CPU with OPENBLAS_NUM_THREADS>1. If export OPENBLAS_NUM_THREADS=1, it works OK.
I am testing this code on 32-core machine, if this matters.
It may be related to issue #654

numpy version 1.8.1
python version 3.4.1
openblas version 0.2.8
ubuntu 14.04

Activity

  1. pv commented on Jun 18, 2014

    @pv
    Member

    If this is a duplicate of gh-654, as it seems, it is an issue of a combination between multiprocessing and OpenBLAS, and cannot be fixed in Numpy.

    The issue that caused gh-654 seems to be addressed in OpenBLAS 0.2.9.

  2. pv commented on Jun 18, 2014

    @pv
    Member

    Please reopen if upgrading to Openblas 0.2.9 does not fix the issue.

  3. vmarkovtsev commented on Jun 19, 2014

    @vmarkovtsev
    Author

    I confirm that OpenBLAS 0.2.9 fixes this issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions