You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes svdsolve throws a DomainError on v0.5.4 and now v0.6.0:
using LinearAlgebra, KrylovKit, StableRNGs
m, n =4100, 4200
X =randn(StableRNG(1234), m, n)
# should work for r <= 4096 == BLOCKSIZE
r =10svdsolve(X, m, r, :LR, Float64, krylovdim=r);
# this should throw the DomainError; takes a long time
r =4097# BLOCKSIZE + 1svdsolve(X, m, r, :LR, Float64, krylovdim=r);
I did not study the multithreaded code closely but would adding something like
prevpow(2, max(1, div(BLOCKSIZE, n)))
be sufficient? It certainly avoids the error but not sure about impact on performance. Admittedly, this is a highly contrived edge case. I can't recall how I came across this error in the first place a few months ago. My example was constructed after peeking at the multithreaded code.
Sometimes
svdsolve
throws aDomainError
on v0.5.4 and now v0.6.0:The stacktrace (see below) hints at a
prevpow
call that may be the source of the problem; see for example https://github.com/Jutho/KrylovKit.jl/blob/v0.6.0/src/orthonormal.jl#L167. My guess is that we somehow end up withprevpow(2, 0)
which throws the error.I did not study the multithreaded code closely but would adding something like
be sufficient? It certainly avoids the error but not sure about impact on performance. Admittedly, this is a highly contrived edge case. I can't recall how I came across this error in the first place a few months ago. My example was constructed after peeking at the multithreaded code.
Other information
Stacktrace:
Julia command:
Version info:
julia> versioninfo() Julia Version 1.7.3 Commit 742b9abb4d (2022-05-06 12:58 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
The text was updated successfully, but these errors were encountered: