BUG: QRMatrix: Prepended zero-valued rows lead to wrong QR decompositions
Summary
Matrices prepended with zero-valued rows lead to wrong QR decompositions. (Appended zero rows are fine). e.g.:
A =
4 3
(
(0 0 0)
(1 2 3)
(5 6 7)
(9 10 11)
)
Reduced QR decomposition produces the following wrong R matrix:
R =
3 3
(
(0 0 0)
(-1 11.8322 13.3534)
(-5 -8.88178e-16 0.828079)
)
rather than the correct R matrix:
R =
[[-1.03440804e+01 -1.17941852e+01 -1.32442899e+01]
[ 0.00000000e+00 -9.47204446e-01 -1.89440889e+00]
[ 0.00000000e+00 0.00000000e+00 7.10058168e-15]]
)
Steps to reproduce
Compile and execute: Test-A.zip
Environment information
api = 2107
patch = 0
HEAD = 72e67c7d1b
version = com
compiler = Clang (system)
= clang version 9.0.1
mpi = SYSTEMOPENMPI
= mpirun (Open MPI) 1.10.7.0.5e373bf1fd
OS = Description: openSUSE Leap 15.3
opts = linux64ClangDPInt32Opt
Edited by Kutalmış Berçin