Page 1 of 1

Matrix transpose in LAPACKE_dsygvx

PostPosted: Sun Aug 28, 2016 10:29 pm
by pysmile
Hi,

I am working on LAPACKE_dsygvx. In LAPACKE_dsygvx_work.c, input and output matrices (matrix A & B) are transposed before and after calling LAPACK_dsygvx (line 110). The subroutine uses LAPACKE_dsy_trans to transpose symmetric matrix A, which seems reasonable to me. But it uses LAPACKE_dge_trans to transpose symmetric matrix B. From LAPACK document, B is triangular matrix as output. So it seems more straightforward for me to use LAPACKE_dsy_trans.
What is more, I still have a concern about this. If memory is limited, a user may use rest space to store other data. e.g., the upper triangular part of is used to store symmetric matrix and the lower triangular part (diagonal line excluded) can be used to store unit triangular matrix. So the data of the unit triangular matrix may be overwritten after transposing symmetric matrix back if LAPACKE_dge_trans is used.

Are there any other reasons for choosing LAPACKE_dge_trans?

Re: Matrix transpose in LAPACKE_dsygvx

PostPosted: Mon Dec 26, 2016 5:34 am
by Julien Langou
Thanks for the bug report. (Please submit an issue on GitHub next time.)
This is corrected, see: https://github.com/Reference-LAPACK/lapack/commit/94a68a2937b4b3769aca5281dd4d588b36f1e42c
I have checked the `sister` subroutines lapacke_chbpvx_work.c and lapacke_chpgvx_work.c and they were all good.
Cheers,
Julien.