diff --git a/notebooks/mpi_collectives.ipynb b/notebooks/mpi_collectives.ipynb index c0785d1..1cdfd6b 100644 --- a/notebooks/mpi_collectives.ipynb +++ b/notebooks/mpi_collectives.ipynb @@ -771,9 +771,11 @@ " rank = MPI.Comm_rank(comm)\n", " if rank == 2\n", " sndbuf = [2]\n", - " MPI.Send(sndbuf, comm2; dest=3, tag=0)\n", + " req1 = MPI.Isend(sndbuf, comm2; dest=3, tag=0)\n", " sndbuf = [1]\n", - " MPI.Send(sndbuf, comm; dest=3, tag=0)\n", + " req2 = MPI.Isend(sndbuf, comm; dest=3, tag=0)\n", + " MPI.Wait(req2)\n", + " MPI.Wait(req1)\n", " end\n", " if rank == 3\n", " rcvbuf = zeros(Int,1)\n",