fix hierarchical mns w.r.t. MPI installed with a dummy toolchain

enhanced version of #983 by @kcgthb (which should have been opened targeting `develop`
If you got access to the easyconfig (which we do through ```ec`` I think?), we can look at the deps to determine the compiler?