Jupyter lab StackOverflowError when computing inverse matrix

I recently updated Julia to version 1.7. When trying to do a straightforward computation in the Jupyterlab environment such as:

using Random

Random.seed!(42)

A = rand(1000, 1000)

inv(A)

I get the following error (literally just one word and nothing else):

StackOverflowError:

The same commands ran on the REPL do not give this error. I tried with my Anaconda-installed Jupyter lab and the installation using the IJulia package, but it made no difference. Only the VSCode implementation of the Jupyter notebook works. The issue in VSCode is that I cannot instantiate a multi-threaded kernel.

Any idea what could be going on and how can I fix it?

Thanks!

Hey @mrazomej, welcome to the forum!

If you are on macOS, it may be this bug:

Unfortunately it was overlooked before launch. We need to wait until a new version comes to have it fixed. Another option is using MKL instead of openblas as the linear algebra library.

2 Likes

Thank you so much! I’ll downgrade to 1.6 in the meantime then.

Yes, I think it has to be 1.6.3 because 1.6.4 has the same issue.

1 Like