- , MPI , . MPI , . , . Send/Recv, MPI_Bcast. , , MPI- .
- , , . , .
:
- (MPI_Barrier).
- , :
- (MPI_Bcast);
- (gather) (root) (MPI_Gather, MPI_Gatherv);
- (gather) (MPI_Allgather, MPI_Allgatherv);
- (scatter) (MPI_Scatter, MPI_Scatterv);
- Scatter/Gather (All-to-All), , , (MPI_Alltoall, MPI_Alltoallv).
- (sum, min, max .) , :
- (MPI_Reduce);
- (MPI_Allreduce);
- Reduce/Scatter (MPI_Reduce_scatter);
- (MPI_Scan).
, MPI_Bcast, :
- , ;
- "" , , , , , . "v" .
:
|
|
- -.
- . , , , .
- .
- .
- .
: , , . , . , , , , . , .
, : MPI_Barrier MPI_Bcast.
MPI_Barrier , . ( " " ).
C:
int MPI_Barrier(MPI_Comm comm)
IN comm - .
, , , . , , . .
MPI_Bcast. root comm.
:
int MPI_Bcast(void* buffer, int count, MPI_Datatype datatype, int root,
MPI_Comm comm)
INOUT | buffer | - ; |
IN | count | - ; |
IN | datatype | - ; |
IN | root | - -; |
IN | comm | - . |
comm, , - root. . 4.1 Bcast.
4.1. Bcast.
MPI_Bcast.
... IF (MYID.EQ. 0) THEN PRINT *, ' N: ' READ *, N END IF CALL MPI_BCAST(N, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, IERR)