add testing in mpi mode.

testing passed for 2, 4, 8 ranks