Closed
Description
On macos, using version 1.7.0-rc2
, julia just shows StackOverflowError
with no other info when taking the matrix exp with a ~ 300x300 complex-valued matrix. Minimum example:
using LinearAlgebra
n = 300
m = rand(ComplexF64, n, n);
mex = exp(m);
Alro ran with --startup-file=no
to make sure it's not some clash with other packages.
my versioninfo()
:
Julia Version 1.7.0-rc2
Commit f23fc0d27a (2021-10-20 12:45 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.5.0)
CPU: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_MATHLINK = /Applications/Mathematica.app/Contents/Frameworks/mathlink.framework
JULIA_MATHKERNEL = /Applications/Mathematica.app/Contents/MacOS/MathKernel
Same code runs fine with Version 1.6.3 (2021-09-23)
.
Hardware: Macbook pro (intel) with 16 GB ram, activity monitor shows low memory usage.
In addition, the same code sometimes gives ERROR: LoadError: ReadOnlyMemoryError()
, not sure how to reproduce that one...
Thanks!
Activity
vtjnash commentedon Nov 8, 2021
I can confirm (and seems fixed on master). Looks like an openblas issue:
daviehh commentedon Nov 9, 2021
Looks like it, current master uses
libopenblas64_.0.3.17.dylib
, and by runningin 1.7.0-rc2 the issue is resolved,
so maybe just bump openblas_jll for 1.7?
carstenbauer commentedon Dec 1, 2021
https://discourse.julialang.org/t/inv-causes-stack-overflow-on-julia-1-7-0-and-mac-os/72411/12 seems to be very similar. Perhaps the same cause?
stevengj commentedon Dec 2, 2021
I think it's the same cause as the abovementioned discourse thread.
I'm getting the same issue with
exp
as above on 1.7.0 on macOS (x86_64). It boils down to a LAPACK call: I getStackOverflowError
fromor even if I directly
ccall
to LAPACK:Similarly, the
StackOverflowError
in the discourse thread forinv(A)
boils down to accall((@blasfunc(sgetrf_), libblastrampoline), ...)
.carstenbauer commentedon Dec 2, 2021
Mentioned by @KristofferC on Slack: JuliaPackaging/Yggdrasil#3996
gbaraldi commentedon Dec 2, 2021
It might be that macos is more susceptible to these stackoverflows because, unless I understood incorrectly, the default pthread stack is 512kb on macos and it's larger on other OSs. Linux seems to be 2Mb and windows 1Mb.
[OpenBLAS_jll] Update to `v0.3.13+11`
v0.3.13+11
JuliaLang/julia#4330010 remaining items