Make MPI test more flexible