some code to handle MPICH3's mpiexec