Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasional LAPACKException(22) #171

Open
draftman9 opened this issue Mar 26, 2024 · 1 comment
Open

Occasional LAPACKException(22) #171

draftman9 opened this issue Mar 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@draftman9
Copy link

draftman9 commented Mar 26, 2024

Describe the bug 🐞

LAPACKException(22) appears. I do not know what it is.

Expected behavior

Error does not arise and evaluate the codes without errors.

Minimal Reproducible Example 👇

Without MRE( I can not symplify the codes. Sorry)

Error & Stacktrace ⚠️

ERROR: LoadError: LAPACKException(22)
Stacktrace:
  [1] chklapackerror
    @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/lapack.jl:40 [inlined]
  [2] stegr!(jobz::Char, range::Char, dv::Vector{Float64}, ev::Vector{Float64}, vl::Float64, vu::Float64, il::Int64, iu::Int64)
    @ LinearAlgebra.LAPACK ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/lapack.jl:3999
  [3] stegr!
    @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/lapack.jl:4066 [inlined]
  [4] eigen!
    @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/tridiag.jl:252 [inlined]
  [5] expv!(w::Vector{ComplexF64}, t::ComplexF64, Ks::KrylovSubspace{ComplexF64, Float64, Float64, Matrix{ComplexF64}, Matrix{Float64}}; cache::Nothing, expmethod::ExpMethodHigham2005Base)
    @ ExponentialUtilities ~/.julia/packages/ExponentialUtilities/xLH9y/src/krylov_phiv.jl:122
  [6] expv!
    @ ~/.julia/packages/ExponentialUtilities/xLH9y/src/krylov_phiv.jl:104 [inlined]
  [7] time_exe!(popu_g_e::Matrix{Float64}, psi0::Vector{ComplexF64}, H0_s::SparseMatrixCSC{Float64, Int64}, H1_s::SparseMatrixCSC{ComplexF64, Int64}, epsilont::Vector{Float64}, H_s::SparseMatrixCSC{ComplexF64, Int64}, Ks::KrylovSubspace{ComplexF64, Float64, Float64, Matrix{ComplexF64}, Matrix{Float64}})
    @ Main /media/sda1/sda1/H-2+n-weak_field/main-1s2p/tau50-scan_theta/tf0-dt0.02-w0.375-tau50-th0.1-step8/src/1-constants-and-preparation.jl:68
  [8] tspan!(psi0::Vector{ComplexF64}, H0_s::SparseMatrixCSC{Float64, Int64}, H1_s::SparseMatrixCSC{ComplexF64, Int64}, epsilont::Vector{Float64})
    @ Main /media/sda1/sda1/H-2+n-weak_field/main-1s2p/tau50-scan_theta/tf0-dt0.02-w0.375-tau50-th0.1-step8/src/1-constants-and-preparation.jl:79
  [9] macro expansion
    @ ./timing.jl:279 [inlined]
 [10] (::var"#4#6")()
    @ Main /media/sda1/sda1/H-2+n-weak_field/main-1s2p/tau50-scan_theta/tf0-dt0.02-w0.375-tau50-th0.1-step8/main6-perf7.jl:41
 [11] (::Base.RedirectStdStream)(thunk::var"#4#6", stream::IOStream)
    @ Base ./stream.jl:1429
 [12] #3
    @ /media/sda1/sda1/H-2+n-weak_field/main-1s2p/tau50-scan_theta/tf0-dt0.02-w0.375-tau50-th0.1-step8/main6-perf7.jl:40 [inlined]
 [13] open(::var"#3#5", ::String, ::Vararg{String}; kwargs::@Kwargs{})
    @ Base ./io.jl:396
 [14] open(::Function, ::String, ::String)
    @ Base ./io.jl:393
 [15] top-level scope
    @ /media/sda1/sda1/H-2+n-weak_field/main-1s2p/tau50-scan_theta/tf0-dt0.02-w0.375-tau50-th0.1-step8/main6-perf7.jl:39
in expression starting at /media/sda1/sda1/H-2+n-weak_field/main-1s2p/tau50-scan_theta/tf0-dt0.02-w0.375-tau50-th0.1-step8/main6-perf7.jl:39

Environment (please complete the following information):

  • Output of using Pkg; Pkg.status()
Status 
 `~/.julia/environments/v1.10/Project.toml` 
  [6e4b80f9] BenchmarkTools v1.5.0 
  [d4d017d3] ExponentialUtilities v1.26.1 
  • Output of using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
Status `~/.julia/environments/v1.10/Manifest.toml` 
  [79e6a3ab] Adapt v4.0.4 
  [4fba245c] ArrayInterface v7.9.0 
  [6e4b80f9] BenchmarkTools v1.5.0 
  [d4d017d3] ExponentialUtilities v1.26.1 
  [46192b85] GPUArraysCore v0.1.6 
  [c145ed77] GenericSchur v0.5.4 
  [682c06a0] JSON v0.21.4 
  [69de0a69] Parsers v2.8.1 
  
 [aea7be01]  
PrecompileTools v1.2.1 
   
[21216c6a]  
Preferences v1.4.3 
   
[ae029012] Requires v1.3.0 
   
[56f22d72] Artifacts 
  
  
  
[ade2ca70]  
Dates 
   
[8f399da3] Libdl 
  
   
[37e2e46d]  
LinearAlgebra 
  
  
  
[56ddb016]  
Logging 
   
[a63ad114]  
Mmap 
  
  
[de0858da] Printf 
  
  
  
[9abbd945] Profile 
  
  
  
[9a3f8284] Random 
  
   
[ea8e919c]  
SHA v0.7.0 
  
  
[9e88b42a]  
Serialization 
  
  
[2f01184e]  
SparseArrays v1.10.0 
  
  
[10745b16]  
Statistics v1.10.0 
  
  
[4607b0f0] SuiteSparse 
  
  
 [fa267f1f]  
TOML v1.0.3 
  [cf7118a7] UUIDs 
  
   
[4ec0a83e] Unicode 
  
   
[e66e0078]  
CompilerSupportLibraries_jll v1.1.0+0 
  
  [4536629a]  
OpenBLAS_jll v0.3.23+4 
  [bea87d4a]  
SuiteSparse_jll v7.2.1+1 
  [8e850b90]  
libblastrampoline_jll v5.8.0+1 
  • Output of versioninfo()
Julia Version 1.10.2 
  
Commit bd47eca2c8a (2024-03-01 10:14 UTC) 
  
Build Info: 
  
   
Official https://julialang.org/ release 
Platform Info: 
  
  OS:  
Linux 
 ( 
x86_64-linux-gnu 
) 
  
  CPU:  
20 
 × 12th Gen Intel(R) Core(TM) i7-12700 
  WORD_SIZE: 64 
  LIBM: libopenlibm 
  LLVM: libLLVM- 
15 
.0.7 (ORCJIT, alderlake) 
Threads: 1 default, 0 interactive, 1 GC (on 20 virtual cores) 
Environment: 
  
  LD_LIBRARY_PATH = /opt/intel/oneapi/vpl/2023.0.0/lib:/opt/intel/oneapi/tbb/2021.8.0/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/2021.8.0//libfabric/lib:/opt/intel/oneapi/mpi/2021.8.0//lib/release:/opt/intel/oneapi/mpi/2021.8.0//lib:/opt/intel/oneapi/mkl/2023.0.0/lib/intel64:/opt/intel/oneapi/itac/2021.8.0/slib:/opt/intel/oneapi/ipp/2021.7.0/lib/intel64:/opt/intel/oneapi/ippcp/2021.6.3/lib/intel64:/opt/intel/oneapi/ipp/2021.7.0/lib/intel64:/opt/intel/oneapi/dnnl/2023.0.0/cpu_dpcpp_gpu_dpcpp/lib:/opt/intel/oneapi/debugger/2023.0.0/gdb/intel64/lib:/opt/intel/oneapi/debugger/2023.0.0/libipt/intel64/lib:/opt/intel/oneapi/debugger/2023.0.0/dep/lib:/opt/intel/oneapi/dal/2023.0.0/lib/intel64:/opt/intel/oneapi/compiler/2023.0.0/linux/lib:/opt/intel/oneapi/compiler/2023.0.0/linux/lib/x64:/opt/intel/oneapi/compiler/2023.0.0/linux/lib/oclfpga/host/linux64/lib:/opt/intel/oneapi/compiler/2023.0.0/linux/compiler/lib/intel64_lin:/opt/intel/oneapi/ccl/2021.8.0/lib/cpu_gpu_dpcpp 
  JULIA_PKG_SERVER = https://mirrors.tuna.tsinghua.edu.cn/julia 

Additional context

When I run the codes firstly:

open( "./data/out.log", "a") do io
    redirect_stdout(io) do
        @time global popu_g_e = tspan!(psi0, H0_s, H1_s, epsilont)
    end
end

The error will arises. But if I run the codes above secondly, the error will dispear and give me the right results. So now the work around method is to run the codes above two times...

I searched the related error on the google. I only got one item: @Jutho/KrylovKit.jl#57

@ChrisRackauckas
Copy link
Member

This seems to come from the lapack balance code, not entirely sure why though.

Even with a non-simple example, with no example this will not be solvable and should just be closed if no example of the behavior can be provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants