Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The utils-multiprocessing.ipynb example does not work on Mac OS X without MKL #1

Open
ppeder08 opened this issue May 30, 2014 · 1 comment

Comments

@ppeder08
Copy link
Collaborator

This bug is not caused by magni but rather numpy (or multiprocessing). It is present on Mac OS X for versions of Python and numpy that have not been compiled against MKL. The following piece of code illustrates the problem:

import multiprocessing as mp

import numpy as np


def compute(n):
    print('Enter')
    np.dot(np.eye(n), np.eye(n))
    print('Exit')


print('\nWithout multiprocessing:')
compute(1000)

print('\nWith multiprocessing:')
workers = mp.Pool(1)
results = workers.map(compute, (1000, 1000))

The above code hangs in the workers.map call when executing np.dot(np.eye(n), np.eye(n)). Strangely, there is no problem if the non-multiprocessing call to compute is ommitted, or the value of n is reduced sufficiently.

@ppeder08
Copy link
Collaborator Author

ppeder08 commented Jun 4, 2014

An issue has been submitted upstream (numpy/numpy#4776).

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

No branches or pull requests

1 participant