mir-group / phoebe

A high-performance framework for solving phonon and electron Boltzmann equations
https://mir-group.github.io/phoebe/
MIT License
83 stars 19 forks source link

Minor Bugfix + more robust ScaLAPACK block size choice #192

Closed jcoulter12 closed 1 year ago

jcoulter12 commented 1 year ago

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.