Skip to content

MPI Processes added for OpenMC Depletion#123

Open
garcs2 wants to merge 7 commits intowatts-dev:developmentfrom
garcs2:parallel_openmc
Open

MPI Processes added for OpenMC Depletion#123
garcs2 wants to merge 7 commits intowatts-dev:developmentfrom
garcs2:parallel_openmc

Conversation

@garcs2
Copy link
Copy Markdown

@garcs2 garcs2 commented Mar 19, 2026

Description

This PR updates functionality in src/watts/fileutils.py and src/watts/results.py to allow for more than one mpi processes to be utilized in openmc calculations which are most relevant for depletion. Previously launching more than one mpi process would 1) open separate tmp directories per rank leading to permissions issues when reading statepoint files and 2) would lead to race issues when cleaning up context manager. This PR updates cd_tmpdir() and move_files() to force all ranks to run in the same tmp directory and to only allow for one rank to move files after calculation is complete. Example of MPI usage with WATTS is shown in examples/1App_OpenMC_Depletion using example VHTR model. New tests for serial and mpi usage of cd_tmpdir and move_files is also implemented and checked.

Fixes #122

Checklist:

  • My code follows the style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have updated the CHANGELOG.md file (if applicable)
  • I have successfully run examples that may be affected by my changes

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.

MPI parallelization not possible with depletion in OpenMC

1 participant