- Code: Select all
CALL ZLARCM( M, N, RWORK( IRVT ), M, VT, LDVT, A, LDA,
$ RWORK( NRWORK ) )
we see that this is incorrect because RWORK in ZLARCM requires workspace of size 2*M*N and the larger dimension is not put in the formula. Since NRWORK = 2*N*N+N (assuming that N <= M) we get that the required workspace for RWORK is at least 2*N*(M+N) + N which is larger than 5*N*N+7*N for sufficiently large M.
I found out that something was wrong in this subroutine when I consistently was getting segmentation error working with the documented size of RWORK.