What is the difference between ranks and processes in MPI?

前端 未结 3 2096
你的背包
你的背包 2021-02-05 23:46

What is the difference between ranks and processes in MPI?

3条回答
  •  自闭症患者
    2021-02-05 23:54

    Rank is a logical way of numbering processes. For instance, you might have 16 parallel processes running; if you query for the current process' rank via MPI_Comm_rank you'll get 0-15.

    Rank is used to distinguish processes from one another. In basic applications you'll probably have a "master" process on rank = 0 that sends out messages to "slave" applications on rank 1-15. For more advanced applications you can divide workloads even further using ranks (i.e. 0 rank master process, 1-7 perform function A, 8-15 perform function B).

提交回复
热议问题