sirocco-rt / sirocco

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

HPC RSE: improving the parallel scaling of Python #1049

Closed Edward-RSE closed 7 months ago

Edward-RSE commented 8 months ago

This PR merges in changes related to the second HPC RSE project at the University of Southampton. There were X aims to this project:

  1. Improve the parallel scaling of Python by parallelising serial bottleneck in the ionisation calculation (e.g. wind_rad_init(), wind_cooling() and update_wind())
  2. Re-factor, re-structure and optimise MPI communication
  3. Improve memory access patterns for memory intensive parts of the program
  4. Implement additional unit testing where appropriate

This is a large pull request and it has touched a lot of files. There have been a lot of changes to the source code and I have also re-normalized the style using run_indent.py which touched files I did not work on. The directory structure of unit test data has also been modified, which has resulted in file changes.

Detailed Changes

Edward-RSE commented 8 months ago

FYI, the checks fail on the Balmer test which is also happening on the dev branch.

kslong commented 8 months ago

Obviously, we want to wait to merge this until I return from Tahiti in about 10 days from now, given that this merge will refactor a good bit of the code.

jhmatthews commented 8 months ago

@Edward-RSE the dev branch is passing tests since Knox reverted the integration changes, so is that weird? Or does it mean a pull/rebase is needed?

Edward-RSE commented 8 months ago

Oops, it's actually failing in fixed temperature mode for this model. Brb, fixing and adding a new test

Edward-RSE commented 8 months ago

In the end the test was failing because of the Balmer test using a shell wind, not because of fixed temperature mode (which seems to work, although it would be good to get a proper test model for that). However, now I'm having an issue with some memory management at the end of the program so I'm going to convert this PR back to draft until that's fixed.

I also found another issue to do with allocating memory for domains in the utility programs, which wasn't caught in the test suites. It would be good to also test the entire menagerie of programs.

Edward-RSE commented 8 months ago

This should be good to go now. There was an issue relating to setting up 1D models, which is now fixed.