[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization
From: |
Dmitri A. Sergatskov |
Subject: |
[Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization |
Date: |
Fri, 10 Feb 2023 16:19:47 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?63787>
Summary: test pcg may fail at high optimization
Project: GNU Octave
Submitter: dasergatskov
Submitted: Fri 10 Feb 2023 09:19:45 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 8.0.90
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Fri 10 Feb 2023 09:19:45 PM UTC By: Dmitri A. Sergatskov <dasergatskov>
With gcc 11 or gcc 12 and (_O2 -mavx -mavx2 -flto)
"test pcg" fails:
octave:1> test pcg
***** testif HAVE_CHOLMOD
## pcg solves preconditioned linear system with A HPD
N = 20;
A = sparse (toeplitz ([4, 1, zeros(1, 18)])) + ...
i * sparse (toeplitz ([0, 1, zeros(1, 18)], [0, -1, zeros(1,18)]));
b = A * ones (N, 1);
M2 = chol (A + 0.1 * eye (N)); # Factor of a perturbed matrix
M = M2' * M2;
Hermitian_A = ishermitian (A);
Hermitian_M = ishermitian (M);
[x, flag] = pcg (A, b, [], 2*N, M);
assert (Hermitian_A, true);
assert (Hermitian_M, true);
assert (flag, 0);
assert (x, ones (N, 1), -1e-4);
!!!!! test failed
ASSERT errors for: assert (Hermitian_M,true)
Location | Observed | Expected | Reason
() 0 1 Abs err 1 exceeds tol 0 by 1
-verbaatim-
due to :
octave:2> N = 20;
A = sparse (toeplitz ([4, 1, zeros(1, 18)])) + ...
i * sparse (toeplitz ([0, 1, zeros(1, 18)], [0, -1, zeros(1,18)]));
b = A * ones (N, 1);
M2 = chol (A + 0.1 * eye (N)); # Factor of a perturbed matrix
M = M2' * M2;
octave:7> ishermitian (M)
ans = 0
octave:8> Z = M - M'
Z =
Compressed Column Sparse (rows = 20, cols = 20, nnz = 19 [4.8%])
(2, 2) -> 0 - 5.0446e-18i
(3, 3) -> 0 - 5.1973e-17i
(4, 4) -> 0 + 2.0610e-17i
(5, 5) -> 0 + 1.6595e-17i
(6, 6) -> 0 - 4.0964e-17i
(7, 7) -> 0 - 2.9936e-18i
(8, 8) -> 0 - 3.1185e-17i
(9, 9) -> 0 - 5.5264e-17i
(10, 10) -> 0 - 6.4907e-19i
(11, 11) -> 0 + 5.3025e-17i
(12, 12) -> 0 - 2.8965e-17i
(13, 13) -> 0 - 2.2264e-17i
(14, 14) -> 0 + 5.3442e-18i
(15, 15) -> 0 - 2.1381e-18i
(16, 16) -> 0 - 3.6669e-17i
(17, 17) -> 0 - 4.4072e-17i
(18, 18) -> 0 - 2.9208e-18i
(19, 19) -> 0 + 5.4313e-17i
(20, 20) -> 0 + 4.2576e-17i
I think the "Hermitian_M = ishermitian (M);" should be
replaced with relaxed version "Hermitian_M = ishermitian (M, eps);" or
similar.
Dmitri.
--
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63787>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization,
Dmitri A. Sergatskov <=
- [Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization, Arun Giridhar, 2023/02/10
- [Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization, Dmitri A. Sergatskov, 2023/02/10
- [Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization, Rik, 2023/02/11
- [Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization, Dmitri A. Sergatskov, 2023/02/11
- [Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization, Dmitri A. Sergatskov, 2023/02/11
- [Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization, Rik, 2023/02/11
- [Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization, Dmitri A. Sergatskov, 2023/02/11
- [Octave-bug-tracker] [bug #63787] test pcg may fail at high optimization, Rik, 2023/02/11