MPI initialization is more robust, added options for different MPI versions