1 / 29

MPI_AlltoAllv Function Outline

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

karlas
Download Presentation

MPI_AlltoAllv Function Outline

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. Each node in parallel community has send displacement array send buffer send count array proc 0 proc 1 proc 2

  3. Example of Send for Proc 0 sendcount Array index sdispl Array index Proc 0 send buffer

  4. Example of Send for Proc 0 start at index 0 sendcount Array index sdispl Array index Proc 0 send buffer

  5. Example of Send for Proc 0 get next 2 elements sendcount Array index sdispl Array index Proc 0 send buffer

  6. Example of Send for Proc 0 send to receive buffer of proc with same rankas index sendcount Array index sdispl Array index Proc 0 send buffer

  7. Example of Send for Proc 0 send to receive buffer of proc with same rankas index this chunk of send buffer goes to receive buffer of proc 0 sendcount Array index sdispl Array index Proc 0 send buffer

  8. Example of Send for Proc 0 for this proc’s next send, start at index 2 of send buffer sendcount Array index sdispl Array index Proc 0 send buffer

  9. Example of Send for Proc 0 get next 3 elements of send buffer sendcount Array index sdispl Array index Proc 0 send buffer

  10. Example of Send for Proc 0 send to receive buffer of proc 1 sendcount Array index sdispl Array index Proc 0 send buffer

  11. Example of Send for Proc 0 for final send, start at index 5 sendcount Array sdispl Array index Proc 0 send buffer

  12. Example of Send for Proc 0 get next 2 elements sendcount Array sdispl Array index Proc 0 send buffer

  13. Example of Send for Proc 0 send to receive buffer of proc 2 sendcount Array sdispl Array index Proc 0 send buffer

  14. Example of Send for Proc 0 this process occurs for each node in the community sendcount Array sdispl Array index Proc 0 send buffer

  15. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  16. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  17. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  18. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  19. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  20. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  21. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  22. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  23. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  24. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  25. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  26. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  27. proc 0 proc 1 proc 2 SEND proc 0 proc 1 proc 2 rdspl rcnt rbuf fer RECE I VE

  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

More Related