开发者

Is there special variables shared between MPI processees?

I'm new in MPI programming world and i'm wondering if there is some variables shared between MPI processees and accessible from any process without ha开发者_高级运维ving to send/receive them ?

Thanks


No. There are no "user space" variables or buffers that are automatically shared between ranks of an MPI job.

There are some common variables (e.g. total number of ranks) that are setup by the MPI environment and are guaranteed to be "the same" across all the ranks - but are not "shared" (e.g. there is a local read-only copy of the values across all the ranks). In many cases, the values are accessed through MPI_* calls, and may also be available other ways depending on the specifics of the implementation.


Nope. Many times your MPI code will be running on many computers at once, so there is no way for them to share data other than to transfer a message over the network.

For multicore machines most MPI implementations detect if the processes are running on the same chip and use an optimized message passing algorithm that avoids any communication on the network, and in some cases reuses buffers to avoid intermediate memory copies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜