.


:




:

































 

 

 

 





:

MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims,

int *periods, int reorder, MPI_Comm *comm_cart)

 

IN comm_old - ;
IN ndims - ;
IN dims - ndims, ;
IN periods - ndims (true - , false - );
IN reorder - , , (true) (false);
OUT comm_cart - .

, .. , comm_old. , - , MPI_COMM_NULL. , , . reorder=false , , . reorder=true, MPI .

, , .

:

MPI_Dims_create(int nnodes, int ndims, int *dims)

 

IN nnodes - ;
IN ndims - ;
INOUT dims - ndims, .

dims . dims[i] , ( ). dims[i], 0. , , .. 12- 4 3 1. MPI_Cart_create.

MPI_Cartdim_get

:

MPI_Cartdim_get(MPI_Comm comm, int *ndims)

 

IN comm - ;
OUT ndim - .

ndims comm.

MPI_Cart_get, .

:

MPI_Cart_get(MPI_Comm comm, int ndims, int *dims,

int *periods, int *coords)

 

IN comm - ;
IN ndims - ;
OUT dims - ndims, ;
OUT periods - ndims, ; (true - , false - );
OUT coords - .

. , .

MPI_Cart_rank

:

MPI_Cart_rank(MPI_Comm comm, int *coords, int *rank)

 

IN comm - ;
IN coords - ;
OUT rank - .

0 <= coords(i) < dims(i).

MPI_Cart_coords

:

MPI_Cart_coords(MPI_Comm comm, int rank, int ndims, int *coords)

 

IN comm - ;
IN rank - ;
IN ndim - ;
OUT coords - .

- . MPI MPI_Cart_shift, . , MPI_Sendrecv, MPI_Cart_shift MPI_Sendrecv (source dest).

MPI_Cart_shift

:

MPI_Cart_shift(MPI_Comm comm, int direction, int disp,

int *rank_source, int *rank_dest)

 

IN comm - ;
IN direction - , ;
IN disp - ( , );
OUT rank_source - , ;
OUT rank_dest - , .

. , . MPI_PROC_NULL rank_source, rank_dest. MPI_sendrecv.

- .

MPI_Cart_sub

:

MPI_Cart_sub(MPI_Comm comm, int *remain_dims,

MPI_Comm *newcomm)

 

IN comm - ;
IN remain_dims - ndims, , i-e (remain_dims[i] = true);
OUT newcomm - , , .

. . , 2 3 4, MPI_Cart_sub remain_dims (true, false, true) 2 4. , 1/3 , .

, MPI 6 , .

MPI_Topo_test.

:

MPI_Topo_test(MPI_Comm comm, int *status)

 

IN comm - ;
OUT status - .

MPI_Topo_test status comm. :

MPI_GRAPH - ;
MPI_CART - ;
MPI_UNDEFINED - .

 





:


: 2016-07-29; !; : 408 |


:

:

. .
==> ...

1496 - | 1462 -


© 2015-2024 lektsii.org - -

: 0.012 .