Skip to content

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

@jeffheaton

Description

@jeffheaton

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions