From 970bbbda4c904bd4c300eb874ec9d97017fdd820 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Thu, 10 Aug 2023 09:11:00 +0000 Subject: [PATCH] Specify krylovdim --- Hamiltonian.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hamiltonian.jl b/Hamiltonian.jl index 321c343..f368cf6 100644 --- a/Hamiltonian.jl +++ b/Hamiltonian.jl @@ -134,7 +134,7 @@ function eig(H::Hamiltonian{T}, levels::Int; resonances = !H.hermitian)::Tuple{V x₀ = CUDA.rand(Complex{T}, vectorDims(H)...) synchronize() end - evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = H.hermitian, tol = tolerance) + evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = H.hermitian, tol = tolerance, krylovdim = levels * 2) resonances || info.converged < levels && throw(error("Not enough convergence")) # don't check convergence for resonances if H.hermitian evals = real.(evals) end if H.mode == gpu_cutensor # to avoid possible GPU memory leak