Skip to content

DBDSDC returns non-orthogonal U and V for a specific matrix #255

Open
@sergey-v-kuznetsov

Description

@sergey-v-kuznetsov

I'm attaching a Fortran code which demonstrates the problem. The code reads two diagonal matrix from a file in the binary format and call DBDSDC:
CALL DBDSDC( 'U', 'I', N, S, E, U, M, VT,
$ M, DUM, IDUM, WORK(INIAD), IWORK,
$ INFO )
but DBDSDC returns non-orthogonal U and V. It should be noted that DBDSDC returns orthogonal matrices if we slightly change any diagonal entry.

Here are steps to reproduce:

bash-4.2$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0 Build 20180611
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.

bash-4.2$ ifort reproducer.f ../lapack-3.7.1/liblapack.a ../lapack-3.7.1/librefblas.a
bash-4.2$ ./a.out
Check orthogonality of U
Orthogonality test failed
Max element in U^T * U - I 0.999872111722121
Row and column numbers of max entries 619 620
Check orthogonality of VT
Orthogonality test failed
Max element in U^T * U - I 0.999872111722121
Row and column numbers of max entries 619 620

If we slightly change the last diagonal entry by inserting
s(n) =s(n)+1.D-15
the attached test passes:
bash-4.2$ ./a.out
Check orthogonality of U
Orthogonality test passed
Check orthogonality of VT
Orthogonality test passed
Repoducer.zip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions