A Slave For The Bifurcation Map
The slave program is nearly identical to the program used for calculating the
bifurcation map sequentially.
- Inform master that it is ready to work.
- Receive m_min, m_max, steps, skip, count from master.
- Set m=m_min.
- Calculate skip successive y values.
- Calculate another count successive y values and save them
into a file.
- Increase m by (m_max-m_min)/steps.
- Go to step 4 and repeat whole process until m=m_max.
- 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