I have a case of PDGESVD returning the "heterogeneity detected" error, when requesting left singular vectors.

Here is what happens, and I have an idea for fixing it I'd like to hear feedback on.

In my case, the matrix is more than 2 blocks wider than it is tall. So in the ranks "on the bottom edge", PDEGESVD sets NRU=0, while it is non-zero in the other ranks.

However, when DBDSQR() is then called, the ranks with non-zero NRU ranks have ROTATE set, while the "NRU=0" ranks do not. This sometimes (data dependant) causes the singular values to be different in the last bit, which is reasonable considering that ROTATE or not causes a different algorithm to be used.

So what I'm thinking is that I could modify PDGESVD so that after computing NRU, I could take the collective maximum, so that if *any* set NRU which implies ROTATE in DBDSQR, then I can make adjustments so that they all locally call DBDSQR with at least a minimum of 1, so that they'll use the same algorithm.

Any thoughts whether this sounds like "the right fix?"

If I get this to work, I can certainly submit a patch, but I'm new to ScaLAPACK internals and don't want to take an approach that might be naive, so I welcome all feedback.

thanks

James