Presentation is loading. Please wait.

Presentation is loading. Please wait.

MPI_AlltoAllv Function Outline int MPI_Alltoallv ( void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int.

Similar presentations


Presentation on theme: "MPI_AlltoAllv Function Outline int MPI_Alltoallv ( void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int."— Presentation transcript:

1 MPI_AlltoAllv Function Outline int MPI_Alltoallv ( void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int *rdispls, MPI_Datatype recvtype, MPI_Comm comm ) Input Parameters sendbuf starting address of send buffer (choice) sendcounts integer array equal to the group size specifying the number of elements to send to each processor sdispls integer array (of length group size). Entry j specifies the displacement (relative to sendbuf from which to take the outgoing data destined for process j recvcounts integer array equal to the group size specifying the maximum number of elements that can be received from each processor rdispls integer array (of length group size). Entry i specifies the displacement (relative to recvbuf at which to place the incoming data from process i

2 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 send buffer send count array send displacement array Each node in parallel community has

3 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index

4 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index start at index 0

5 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index get next 2 elements

6 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index send to receive buffer of proc with same rank as index

7 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index send to receive buffer of proc with same rank as index this chunk of send buffer goes to receive buffer of proc 0

8 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index for this proc’s next send, start at index 2 of send buffer

9 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index get next 3 elements of send buffer

10 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index send to receive buffer of proc 1

11 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index for final send, start at index 5

12 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index get next 2 elements

13 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index send to receive buffer of proc 2

14 02 13 22 0A 1B 2C 3D 4E 5F 6G Example of Send for Proc 0 Proc 0 send buffer sendcount Array 0 2 5 sdispl Array index this process occurs for each node in the community

15 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0 1 2 3 4 5 6 7 8 proc 0 30 33 26 0 1 2 3 4 5 6 7 8 proc 1 20 12 43 0 1 2 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

16 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2 3 4 5 6 7 8 proc 0 30 33 26 0 1 2 3 4 5 6 7 8 proc 1 20 12 43 0 1 2 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

17 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2 3 4 5 6 7 8 proc 0 30 33 26 0C 1D 2E 3 4 5 6 7 8 proc 1 20 12 43 0 1 2 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

18 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2 3 4 5 6 7 8 proc 0 30 33 26 0C 1D 2E 3 4 5 6 7 8 proc 1 20 12 43 0F 1G 2 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

19 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2 3 4 5 6 7 8 proc 0 30 33 26 0C 1D 2E 3 4 5 6 7 8 proc 1 20 12 43 0F 1G 2 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

20 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2H 3I 4J 5 6 7 8 proc 0 30 33 26 0C 1D 2E 3 4 5 6 7 8 proc 1 20 12 43 0F 1G 2 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

21 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2H 3I 4J 5 6 7 8 proc 0 30 33 26 0C 1D 2E 3K 4L 5M 6 7 8 proc 1 20 12 43 0F 1G 2 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

22 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2H 3I 4J 5 6 7 8 proc 0 30 33 26 0C 1D 2E 3K 4L 5M 6 7 8 proc 1 20 12 43 0F 1G 2N 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

23 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2H 3I 4J 5 6 7 8 proc 0 30 33 26 0C 1D 2E 3K 4L 5M 6 7 8 proc 1 20 12 43 0F 1G 2N 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

24 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2H 3I 4J 5O 6 7 8 proc 0 30 33 26 0C 1D 2E 3K 4L 5M 6 7 8 proc 1 20 12 43 0F 1G 2N 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

25 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2H 3I 4J 5O 6 7 8 proc 0 30 33 26 0C 1D 2E 3K 4L 5M 6P 7Q 8 proc 1 20 12 43 0F 1G 2N 3 4 5 6 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

26 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2H 3I 4J 5O 6 7 8 proc 0 30 33 26 0C 1D 2E 3K 4L 5M 6P 7Q 8 proc 1 20 12 43 0F 1G 2N 3R 4S 5T 6U 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

27 20 32 25 0A 1B 2C 3D 4E 5F 6G 0H 1I 2J 3K 4L 5M 6N 0O 1P 2Q 3R 4S 5T 6U 30 33 16 10 21 43 proc 0proc 1proc 2 20 32 15 0A 1B 2H 3I 4J 5O 6 7 8 proc 0 30 33 26 0C 1D 2E 3K 4L 5M 6P 7Q 8 proc 1 20 12 43 0F 1G 2N 3R 4S 5T 6U 7 8 proc 2 SENDSEND RECEIVERECEIVE rcntrcnt rdsplrdspl rbufferrbuffer

28 Notes on AlltoAllv A receive buffer could potentially be as large as the sum of all send buffer sizes Care must be taken to coincide send counts with receive counts and displacements so data is not overwritten

29


Download ppt "MPI_AlltoAllv Function Outline int MPI_Alltoallv ( void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int."

Similar presentations


Ads by Google