Look at the mpi-default-dev package. Most packages using MPI should
depend on it (only depending on eg libopenmpi-dev if its specifically
openmpi dependent).
Edit /usr/share/mpi-default-dev/debian_defaults locally, change
openmpi -> mpich. Then
# apt install libmpich-dev mpich
# apt remove libopenmpi-dev openmpi-bin
This also removes mpi-default-dev, which is a "build-depends" of
building (most) packages with MPI. I'm on buster, if that matters.
I would like to re-build the packages the debian way (sort of a local
NMU), ie, apt source <package>; apt build-dep <package>; ...; debuild
-us -uc.
Oops; correct. No need to do the "apt remove".
Do the above, without the apt remove, _before_ doing the rebuild a la NMU.