We use cookies to enhance your experience on our website. By continuing to use our website, you are agreeing to our use of cookies. You can change your cookie settings at any time. Find out more
Oxford University Press
  OUP Worldwide
Advanced Search
Printer-Friendly View

Companion Website

Boudreau and Swanson: Applied Computational Physics

Chapter 09: Parallel Computing

example code (.tgz)

  • HELLOWORLD: introduces parallelism using the MPI paradigm.
  • MPI0: an MPI example code that carries out a modest calculation.
  • THREAD0: introduces parallelism using the thread model.
  • THREAD1: shows a better, more encapsulated way to achieve parallelism.
  • SERVER: contains a server which talks over a socket to a client.
  • CLIENT: implements a client to talk to the server. After building both server and client, start the server then execute the client. In this example, the server can only handle one client connection at a time.
  • FORK: how to fork a subprocess.
  • PIPE: how to fork a subprocess and communicate bidirectionally.
  • MULTISERVER: a non-blocking version of the SERVER which forks a clone of itself every time a client requests a connection.
  • ELABORATE-CS-EXAMPLE: an elaborate client/server example. The client carries out a simple fit to data points and transmits points one by one to the server.

About this book
Price, bibliographic details, and more information on the book