A Slave For The Bifurcation Map


The slave program is nearly identical to the program used for calculating the bifurcation map sequentially.

  1. Inform master that it is ready to work.
  2. Receive m_min, m_max, steps, skip, count from master.
  3. Set m=m_min.
  4. Calculate skip successive y values.
  5. Calculate another count successive y values and save them into a file.
  6. Increase m by (m_max-m_min)/steps.
  7. Go to step 4 and repeat whole process until m=m_max.
  8. Go to step 1 and start over until master says to shut down.
If you compare this to a sequential program for this problem, you will realize that we only added points 1, 2 and 8. In addition to this we have to be a little careful in step 5. The name for the file we use to save our data has to be different for every slave process. In this case we could include the value for m_min in the file name to make sure a later process is not overwriting our results.

The source code for this program in: C


Previous: A lazy master
Next: A parallel plot of the bifurcation diagram
Index: Getting started with PVM