Why does my program work with MVAPICH2, but not OpenMPI?
You may get errors like: [abe0872:6882] *** An error occurred in MPI_Sendrecv [abe0872:6882] *** on communicator MPI_COMM_WORLD [abe0872:6882] *** MPI_ERR_RANK: invalid rank [abe0872:6882] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort) when using OpenMPI, but not in MVAPICH2 if the code is explicitly using rank -1 in send/recv calls. In MVAPICH2, MPI_PROC_NULL is defined as -1, but with OpenMPI it’s defined as -2, hence the difference in runtime behavior. The proper thing for the code to do is use MPI_PROC_NULL (instead of -1) when that is the intention.