Skip to content

Conversation

@anand-avinash
Copy link
Contributor

This PR is meant to carry forward what we decided in #372. Specifically, we will stop fixing the issue #364, and instead, provide a script for user to help with determining the number of MPI processes needed to run the simulation. In case a user provides more MPI slots than needed, the code will produce an error and direct the user to relevant info on selecting the correct number of MPI slots. With these changes, there will be no need for MPI_COMM_GRID as MPI_COMM_GRID.COMM_OBS_GRID will always point to MPI.COMM_WORLD. So in this PR we will:

  • include selective incremental changes from Fix issue #364 #372
  • remove MPI_COMM_GRID and update the code accordingly

The script for determining the correct number of MPI slots will be implemented in a separate PR.

@github-actions
Copy link

github-actions bot commented Jun 9, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  litebird_sim
  __init__.py
  io.py
  madam.py
  mpi.py
  observations.py 697-700, 1048-1051
  pointings_in_obs.py
  simulations.py 1343, 1421-1422
  litebird_sim/mapmaking
  binner.py
  common.py
  destriper.py 499, 746-747, 987, 1004, 1418, 1652, 1683
Project Total  

This report was generated by python-coverage-comment-action

@anand-avinash
Copy link
Contributor Author

To avoid creating empty observations, we need to avoid leaving an MPI process unused. For that we have to compare n_blocks_det * n_blocks_time against comm.size both while creating observations and also when we call Observation.set_n_blocks(). In test/test_mpi.py, there are several tests that modify the number of blocks by calling set_n_blocks() and make it different from comm.size. So majority of the tests fail when more than one MPI process is used. How should we modify these tests? @ziotom78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants