1) In cases where very many MPI processes were used with very few electronic states, a process could occasionally come up with zero electronic states, resulting in a seg fault during the determination of the chemical potential.
2) In cases with very few states and the full scattering matrix used, ScaLAPACK would sometimes throw an internal error because block sizes were too small. Unfortunately, this error doesn't return an error code and so it's not possible to detect and kill the run, but it does result in a slightly incorrect value. Ideally this fix ends that issue, however, if an error referencing PDORMTR error is seen during the scattering matrix diagonalization, the results should never be trusted and the user should contact a developer.
Two edge-case bug fixes are included in this PR:
1) In cases where very many MPI processes were used with very few electronic states, a process could occasionally come up with zero electronic states, resulting in a seg fault during the determination of the chemical potential. 2) In cases with very few states and the full scattering matrix used, ScaLAPACK would sometimes throw an internal error because block sizes were too small. Unfortunately, this error doesn't return an error code and so it's not possible to detect and kill the run, but it does result in a slightly incorrect value. Ideally this fix ends that issue, however, if an error referencing PDORMTR error is seen during the scattering matrix diagonalization, the results should never be trusted and the user should contact a developer.