???????? ? ???????????? ??????????. ?????????? ???????????????? MPI (???? ??????) - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

???????? ? ???????????? ??????????. ?????????? ???????????????? MPI (???? ??????)

Description:

Title: . MPI Author: ASA Last modified by – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 19
Provided by: asa1177
Category:
Tags: mpi

less

Transcript and Presenter's Notes

Title: ???????? ? ???????????? ??????????. ?????????? ???????????????? MPI (???? ??????)


1
???????? ? ???????????? ??????????. ??????????
???????????????? MPI (???? ??????)
  • ??????? ????????? ?????????, ?.?.-?.?., ?.?.
    ??????????? ???????????? ??????????????
    ?????????? ???? ???

2
MPI
  • MPI_ISEND(BUF, COUNT, DATATYPE, DEST, MSGTAG,
    COMM, REQUEST, IERR)
  • lttypegt BUF()
  • INTEGER COUNT, DATATYPE, DEST, MSGTAG, COMM,
    REQUEST, IERR
  • ????????????? ??????? ?????????. ??????? ??
    ??????? ?????????? ????? ????? ?????????????
    ????????. ?????????? REQUEST ??????????????
    ?????????.

3
MPI
  • ??????????? ??????? MPI_ISEND
  • MPI_IBSEND  ???????? ????????? ? ????????????.
  • MPI_ISSEND  ???????? ????????? ? ??????????????.
  • MPI_IRSEND  ???????? ????????? ?? ??????????.

4
MPI
  • MPI_IRECV(BUF, COUNT, DATATYPE, SOURCE, MSGTAG,
    COMM, REQUEST, IERR)
  • lttypegt BUF()
  • INTEGER COUNT, DATATYPE, SOURCE, MSGTAG, COMM,
    REQUEST, IERR
  • ????????????? ????? ?????????. ??????? ?? ???????
    ?????????? ????? ????? ????????????? ????????.
    ?????????? REQUEST ?????????????? ?????????.

5
MPI
  • ?????????, ???????????? ????? ?? ???????
    MPI_SEND, MPI_ISEND ? ????? ?? ???? ??
    ???????????, ????? ???? ??????? ????? ?? ????????
    MPI_RECV ? MPI_IRECV.
  • ?? ?????????? ????????????? ???????? ?? ???????
    ?????????? ? ???????????? ?????? ??????!

6
MPI
  • MPI_IPROBE(SOURCE, MSGTAG, COMM, FLAG, STATUS,
    IERR)
  • LOGICAL FLAG
  • INTEGER SOURCE, MSGTAG, COMM, IERR,
    STATUS(MPI_STATUS_SIZE)
  • ????????? ?????????? ? ????????? ??????????
    ????????? ??? ??????????. FLAG ??????????
    ???????? .TRUE., ???? ????????? ? ???????????
    ?????????? ??? ????? ???? ???????.

7
MPI
  • MPI_WAIT(REQUEST, STATUS, IERR)
  • INTEGER REQUEST, IERR, STATUS(MPI_STATUS_SIZE)
  • ???????? ?????????? ??????????? ????????,
    ??????????????? ? ??????????????? REQUEST. ???
    ?????????????? ?????? ???????????? ????????
    STATUS. REQUEST ??????????????? ? ????????
    MPI_REQUEST_NULL.

8
MPI
  • MPI_WAITALL(COUNT, REQUESTS, STATUSES, IERR)
  • INTEGER COUNT, REQUESTS(), STATUSES(MPI_STATUS_SI
    ZE,), IERR
  • ???????? ?????????? COUNT ??????????? ????????,
    ??????????????? ? ???????????????? REQUESTS. ???
    ????????????? ??????? ???????????? ????????? ?
    ??????? STATUSES.

9
MPI
  • prev rank - 1
  • next rank 1
  • if (rank .eq. 0) prev numtasks - 1
  • if (rank .eq. numtasks - 1) next 0
  • call MPI_IRECV(buf(1), 1, MPI_INTEGER,
  • prev, tag1, MPI_COMM_WORLD, reqs(1),
  • ierr)
  • call MPI_IRECV(buf(2), 1, MPI_INTEGER,
  • next, tag2, MPI_COMM_WORLD, reqs(2),
  • ierr)

10
MPI
  • call MPI_ISEND(rank, 1, MPI_INTEGER,
  • prev, tag2, MPI_COMM_WORLD, reqs(3),
  • ierr)
  • call MPI_ISEND(rank, 1, MPI_INTEGER,
  • next, tag1, MPI_COMM_WORLD, reqs(4),
  • ierr)
  • call MPI_WAITALL(4, reqs, stats, ierr)

11
MPI
  • MPI_WAITANY(COUNT, REQUESTS, INDEX, STATUS, IERR)
  • INTEGER COUNT, REQUESTS(), INDEX,
    STATUS(MPI_STATUS_SIZE), IERR
  • ???????? ?????????? ????? ?? COUNT ???????????
    ????????, ??????????????? ? ????????????????
    REQUESTS. ??? ?????????????? ?????? ????????????
    ???????? STATUS.

12
MPI
  • ???? ? ??????? ?????? ??????????? ????????? ??
    ????????? ????????, ?? ????????? ??????? ?????
    ??????? ???? ?? ???.
  • ???????? INDEX ???????? ????? ???????? ? ???????
    REQUESTS, ??????????? ????????????? ???????????
    ????????.

13
MPI
  • MPI_WAITSOME(INCOUNT, REQUESTS, OUTCOUNT,
    INDEXES, STATUSES, IERR)
  • INTEGER INCOUNT, REQUESTS(), OUTCOUNT,
    INDEXES(), IERR,
  • STATUSES(MPI_STATUS_SIZE,)
  • ???????? ?????????? ???? ?? ????? ?? INCOUNT
    ??????????? ????????, ??????????????? ?
    ???????????????? REQUESTS.

14
MPI
  • ???????? OUTCOUNT ???????? ????? ???????????
    ????????, ? ?????? OUTCOUNT ????????? ???????
    INDEXES ???????? ?????? ????????? ???????
    REQUESTS ? ?? ????????????????.
  • ?????? OUTCOUNT ????????? ??????? STATUSES
    ???????? ????????? ??????????? ???????? (???
    ????????????? ???????).

15
MPI
  • MPI_TEST(REQUEST, FLAG, STATUS, IERR)
  • LOGICAL FLAG
  • INTEGER REQUEST, IERR, STATUS(MPI_STATUS_SIZE)
  • ???????? ????????????? ??????????? ????????,
    ??????????????? ? ??????????????? REQUEST. ?
    ????????? FLAG ???????????? ???????? .TRUE., ????
    ???????? ?????????.

16
MPI
  • MPI_TESTALL(COUNT, REQUESTS, FLAG, STATUSES,
    IERR)
  • LOGICAL FLAG
  • INTEGER COUNT, REQUESTS(), STATUSES(MPI_STATUS_SI
    ZE,), IERR
  • ???????? ????????????? COUNT ???????????
    ????????, ??????????????? ? ????????????????
    REQUESTS.

17
MPI
  • MPI_TESTANY(COUNT, REQUESTS, INDEX, FLAG, STATUS,
    IERR)
  • LOGICAL FLAG
  • INTEGER COUNT, REQUESTS(), INDEX,
    STATUS(MPI_STATUS_SIZE), IERR
  • ? ????????? FLAG ???????????? ???????? .TRUE.,
    ???? ???? ?? ???? ?? ???????? ???????????? ??????
    ?????????.

18
MPI
  • MPI_TESTSOME(INCOUNT, REQUESTS, OUTCOUNT,
    INDEXES, STATUSES, IERR)
  • INTEGER INCOUNT, REQUESTS(), OUTCOUNT,
    INDEXES(), IERR,
  • STATUSES(MPI_STATUS_SIZE,)
  • ?????? MPI_WAITSOME, ?? ??????? ??????????
    ??????????. ???? ?? ???? ?? ???????? ??
    ???????????, ?? ???????? OUTCOUNT ????? ?????
    ????.
Write a Comment
User Comments (0)
About PowerShow.com