File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -367,28 +367,6 @@ Examples
367
367
message = comm.recv(source = sender, tag = 0 )
368
368
print (message)
369
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
370
.. tab :: broadcast
393
371
394
372
.. code-block :: python
You can’t perform that action at this time.
0 commit comments