Merge branch 'master' into irrep
This commit is contained in:
commit
3b110cfeda
|
|
@ -1,3 +1,9 @@
|
||||||
|
# Calculation outputs
|
||||||
|
*.dat
|
||||||
|
*.csv
|
||||||
|
*.hdf5
|
||||||
|
*.out
|
||||||
|
|
||||||
# Temporary and scratch files
|
# Temporary and scratch files
|
||||||
temp/
|
temp/
|
||||||
scratch/
|
scratch/
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
include("common.jl")
|
include("common.jl")
|
||||||
using TensorOperations, KrylovKit, LinearAlgebra, CUDA, CUDA.CUTENSOR
|
using TensorOperations, KrylovKit, LinearAlgebra, CUDA, cuTENSOR, NVTX
|
||||||
|
|
||||||
@enum Hamiltonian_backend cpu_tensor gpu_cutensor
|
@enum Hamiltonian_backend cpu_tensor gpu_cutensor
|
||||||
|
|
||||||
|
|
@ -134,7 +134,7 @@ function eig(H::Hamiltonian{T}, levels::Int; resonances = !H.hermitian)::Tuple{V
|
||||||
x₀ = CUDA.rand(Complex{T}, vectorDims(H)...)
|
x₀ = CUDA.rand(Complex{T}, vectorDims(H)...)
|
||||||
synchronize()
|
synchronize()
|
||||||
end
|
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
|
resonances || info.converged < levels && throw(error("Not enough convergence")) # don't check convergence for resonances
|
||||||
if H.hermitian evals = real.(evals) end
|
if H.hermitian evals = real.(evals) end
|
||||||
if H.mode == gpu_cutensor # to avoid possible GPU memory leak
|
if H.mode == gpu_cutensor # to avoid possible GPU memory leak
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue