Lapacke/Chameleon conversion of submatrix
At https://gitlab.inria.fr/solverstack/chameleon/blob/master/compute/pztile.c#L51 and https://gitlab.inria.fr/solverstack/chameleon/blob/master/compute/pztile.c#L107 a descriptor with the morse_get<xxx>_cm() family of callback function is created to access 'tiles' in the given lapack matrix, in order to convert the matrix to the chameleon(plasma) style
dB = morse_desc_init(
MorseComplexDouble, dA->mb, dA->nb, dA->bsiz,
lda, dA->n, dA->i, dA->j, dA->m, dA->n, 1, 1);
I do not understand why the descriptor B should retain submatrix property (da->i and da->j). Isn't that a error to construct a submatrix in this way?
My use case is that I do a QR factorization on a tall-and-skinny (m+1 blocks)-by-(m blocks ) matrix in order to solve a GELS problem, then I apply Q^{H} on the right hand side (which is (m+1 block)-by-(1block)). Since in my algorithm, it is not mandatory to compute the GELS solution if the residual have not yet converged to the wanted accuracy, I want to first evaluate the norm of the residual (vector by vector) so I copy the submatrix of my right hand side actually containing the residual norm (i.e the 1-block-by-1-block at the very bottom of my right hand side) into a lapack matrix to evaluate these norms.
But I have the impression that the lacpy algorithm used by the pztile_to_lapack try to access a non existing tile in the B descriptor. (With on tile per block, the RUNTIME_desc_create have only allocated an array for one data_handle in schedopt field of dB which is the expected behaviour yet lacpy try to access the data_handle array past the first slot)