diff --git a/mpi/docs/06-user-defined-communicators.md b/mpi/docs/06-user-defined-communicators.md index a5ccdbc12..17c5f4788 100644 --- a/mpi/docs/06-user-defined-communicators.md +++ b/mpi/docs/06-user-defined-communicators.md @@ -61,10 +61,10 @@ if (rank%2 == 0) { MPI_Comm_split(MPI_COMM_WORLD, color, rank, &subcomm); -MPI_Comm_rank(subcomm, &mysubid); +MPI_Comm_rank(subcomm, &subrank); printf ("I am rank %d in MPI_COMM_WORLD, but" - "%d in Comm %d.\n", rank, mysubid, + "%d in Comm %d.\n", rank, subrank, color); ``` @@ -100,7 +100,7 @@ if (rank%2 == 0) { } MPI_Comm_split(MPI_COMM_WORLD, color, rank, &subcomm); -MPI_Comm_rank(subcomm, &mysubid); +MPI_Comm_rank(subcomm, &subrank); MPI_Bcast(sendbuf, 8, MPI_INT, 0, subcomm); ``` diff --git a/mpi/docs/09-user-defined-datatypes.md b/mpi/docs/09-user-defined-datatypes.md index 2fe3d56ac..faab6de9e 100644 --- a/mpi/docs/09-user-defined-datatypes.md +++ b/mpi/docs/09-user-defined-datatypes.md @@ -179,7 +179,7 @@ call mpi_type_free(rowtype, ierr)