Add macros for queries and messages.
Each message and query is assigned a different number so that it can be passed easily to the head node.
Add macro for query and msg tags.
Each type of message (query, msg) is assigned a number. They will be used as tags when passing messages so the recipient (master) will know what it is getting.
Add MPI header to the include list.
Add master loop.
Add a function for the master thread to loop in. Also, add a macro for a progress message.
Change MSG_PROGRESS to TAG_DATA.
Changed the message content to a separate tag so that its contents could hold the size of the data to come.
Make basic template for Master_Loop().
Within Master_Loop(), add an MPI_Recv() and a switch to determine the meaning of the message.
Add code to deal with MSG_DONE.
If a process finishes, the master process will add it to done_list, and done_count will increment.
Add code to deal with TAG_DATA.
When a slave tells the master that it is sending data, the master will then attempt to receive a message of the size of the previous message's contents.
Add assert statement to avoid buffer overflow.
Assert statement added prior to receiving data from slave process in order to ensure that the size of the incoming data is smaller than the maximum size (max_data). max_data should be equal to the greatest possible level.
Add MAX_LEVEL macro.
Ensure that max_data will always be equal to the maximum level by making the maximum level a global macro.
Add functions for querying and messaging master.
Slave_Q_Master() is a simple function that sends a query and receives a response. Slave_Msg_Master() is a simple function that sends a message to the master without a response.
Add comments to new functions.
Add comments to Slave_Q_Master(), Slave_Msg_Master(), and Master_Loop() to explain what they do, what the variables mean, and how they work.
Add to the README.
Add more to the README file to explain the sorting and the culling done.
Add new macro for new message.
Add a message for telling a slave to continue working or to tell the master that it is still working.
Add new macro for error message.
Add function for slave to get instructions.
Reduce communication for data transmission.
Use the fact that the MPI_Recv() requires to know an upper bound for the amount of data to be passed instead of the exact amount to reduce the communication by one pass.
Fix how data_size extracts size data from status.
Instead of using the status.size directly, it needs to go through MPI_Get_count().
Add prototype of Slave_Loop().
Each slave process will run Slave_Loop() to loop through its values. The prototype is now written. Also, as a word choice fix, all instances of the word "problem" in the comments with "exercise".
Add Slave_Loop() description.