sirocco-rt / sirocco

This is the repository for Sirocco, the radiative transfer code used to model winds in AGN and other systems
GNU General Public License v3.0
30 stars 24 forks source link

Improve MPI communication documentation #1129

Closed Edward-RSE closed 5 days ago

Edward-RSE commented 1 week ago

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)

kslong commented 1 week ago

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.