We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 59075e0 + 4ecb82a commit 6fc5990Copy full SHA for 6fc5990
content/parallel-computing.rst
@@ -367,28 +367,6 @@ Examples
367
message = comm.recv(source=sender, tag=0)
368
print(message)
369
370
- .. tab:: isend/irecv
371
-
372
- .. code-block:: python
373
- :emphasize-lines: 10,15
374
375
- from mpi4py import MPI
376
377
- comm = MPI.COMM_WORLD
378
- rank = comm.Get_rank()
379
- n_ranks = comm.Get_size()
380
381
- if rank != 0:
382
- # All ranks other than 0 should send a message
383
- message = "Hello World, I'm rank {:d}".format(rank)
384
- req = comm.isend(message, dest=0, tag=0)
385
- req.wait()
386
- else:
387
- # Rank 0 will receive each message and print them
388
- for sender in range(1, n_ranks):
389
- req = comm.irecv(source=sender, tag=0)
390
- message = req.wait()
391
- print(message)
392
.. tab:: broadcast
393
394
.. code-block:: python
0 commit comments