Chapter 4. Messaging with ZeroMQ and MPI

This chapter covers messaging and its use in parallel programming. Unlike threading, a system that utilizes multiple processes does not have a single memory area that the entire system can access. This means that if different subprocesses are to communicate, they must pass data back and forth in the form of messages. In this chapter, we will introduce and discuss two popular message passing mechanisms: ZeroMQ and MPI.

The following topics will be covered:

  • The storage hierarchy address spaces, and data locality
  • Concepts of ZeroMQ
  • Messaging patterns in ZeroMQ
  • Concepts of MPI
  • Messaging patterns in MPI
  • MPI and process control

The storage hierarchy

It is easy to ignore where data is stored in serial applications. This ...

Get Mastering IPython 4.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.