Modify the output master to accept three types of messages from the slaves.
These types are
The master continues to receive messages until it has received an exit message
from each slave. For simplicity in programming, have each slave send the
- Ordered output (just like the previous exercise)
- Unordered output (as if each slave printed directly)
- Exit notification (see below)
with the ordered output mode, and
Hello from slave 3
Goodbye from slave 3
with the unordered output mode.
I'm exiting (3)
You may want to use these MPI routines in your solution: