JuliaLinearAlgebra / IterativeSolvers.jl

Iterative algorithms for solving linear systems, eigensystems, and singular value problems
MIT License
394 stars 106 forks source link

minres! crashes hard for a complex system #301

Closed RaghuSivapuram closed 2 years ago

RaghuSivapuram commented 3 years ago

I am using minres! to obtain an improved solution than the given initial guess. The system matrices and the initial guess are complex. I get this crash when I call: minres!(U, Kd, F; maxiter=20) where Kd, U are complex.

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks. Exception: EXCEPTION_ACCESS_VIOLATION at 0x1fec08e0 -- Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks. Exception: EXCEPTION_ACCESS_VIOLATION at 0x1fec08e0 -- OLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks. Exception: EXCEPTION_ACCESS_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks. Exception: EXCEPTION_ACCESSVDCABS164 at C:\Users\sivap\AppData\Local\Programs\Julia-1.6.1\bin\libopenblas64.DLL (unknown line) in expression starting at C:\Users\sivap.julia\MyPackages\dev\FinEtoolsRapidHarmonicVA\batchr.jl:43 in expression starting at at 0x1fec08e0 -- at 0x1fec08e0 -- ing at at 0x1fec08e0 -- at 0x1fec08e0 -- rs\sivap\AppData\Local\Programs\Julia-1.6.1\bin\libopenblas64.DLL (unknown line)

Please let me know if I'm misusing the function.

haampie commented 3 years ago

Can you provide something reproducible? I don't see this failing.

julia> using LinearAlgebra, IterativeSolvers

julia> A = rand(ComplexF64, 100, 100); A += A' + 100I; x = ones(ComplexF64, 100); b = A * x;

julia> A * minres(A, b) - b |> norm
1.7369022090081076e-5
fredrikekre commented 3 years ago

https://github.com/JuliaLang/julia/issues/40963

RaghuSivapuram commented 3 years ago

using LinearAlgebra, IterativeSolvers, SparseArrays

A = sprand(19400, 19400, 0.1) + 1.0im * sprand(19400, 19400, 0.1) F = rand(ComplexF64, 19400) x = zeros(ComplexF64, 19400)

minres!(x, A, F; maxiter=20) blows up.

haampie commented 3 years ago

@RaghuSivapuram can you share more details (os, cpu, julia version...) in https://github.com/JuliaLang/julia/issues/40963?

RaghuSivapuram commented 2 years ago

This problem doesn't occur in Julia 1.7.