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

Problems running in a thread on Linux/Mac (with solution) #20

Open
jeffheaton opened this issue Dec 4, 2023 · 0 comments
Open

Problems running in a thread on Linux/Mac (with solution) #20

jeffheaton opened this issue Dec 4, 2023 · 0 comments

Comments

@jeffheaton
Copy link

jeffheaton commented Dec 4, 2023

Just adding this note in case anyone else runs into this. I tried to run this code in a thread on Mac/Linux and was met with a bus error, no stack trace. Really not fun to debug. You can fix this with:

# Need this setting because of this issue:
# https://github.com/numpy/numpy/issues/654
os.environ["OPENBLAS_NUM_THREADS"] = "1"

Make sure that its called before anything else, well maybe mostly Numpy. This is due to this line in utils.py:

inv_A = np.linalg.inv(A)  # we assume A invertible!

Also, I do have this codebase running on Mac M1 if anyone has use, happy to post a PR.

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

No branches or pull requests

1 participant