Add examples for interactive use of MPI.

Closes #2934.