This PR is addressing issue #1126, which states the documentation for MPI communication is not sufficient for the complexity of the code.
To address this I have written a new page in the Sphinx documentation which breaks down the communication code in detail. This page documents how the standard communication pattern works and how the size of the comm buffer is calculated (with simple code examples). It also includes a section on how to add a new variable to an existing communication.
I opted to create a Sphinx page instead of adding to the Doxygen comments for each function, to keep that comment block from becoming too unwieldily and long. In each comment block, I reference the new Sphinx page for anyone who wants more details.
(I also noticed that the malloc's in a lot of the functions were unchecked, so I have added checks to make sure memory is allocated correctly)
I think that is a good way to have dealt with this issue, including having a reference in the .c file to the documentation on sphinx. I am happy for this to be merged.
This PR is addressing issue #1126, which states the documentation for MPI communication is not sufficient for the complexity of the code.
To address this I have written a new page in the Sphinx documentation which breaks down the communication code in detail. This page documents how the standard communication pattern works and how the size of the comm buffer is calculated (with simple code examples). It also includes a section on how to add a new variable to an existing communication.
I opted to create a Sphinx page instead of adding to the Doxygen comments for each function, to keep that comment block from becoming too unwieldily and long. In each comment block, I reference the new Sphinx page for anyone who wants more details.
(I also noticed that the malloc's in a lot of the functions were unchecked, so I have added checks to make sure memory is allocated correctly)