Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MPI barriers in TemporaryDirectoryChanger and Output cache. #984

Merged
merged 3 commits into from Nov 18, 2022

Conversation

ntouran
Copy link
Member

@ntouran ntouran commented Nov 18, 2022

Description

These utilities aren't always used in a way that has all MPI nodes synced up. For example if worker x has 3 tasks and worker y has 5, that could lead to a deadlock if they use these utilities. Rather than requiring all clients of these utlities know the MPI global state, we just remove the barriers, and will deal with file lock issues in more forgiving ways.

Closes #982


Checklist

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify that the new/changed code works.
  • The release notes (location doc/release/0.X.rst) are up-to-date with any bug fixes or new features.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in setup.py.

These utilities aren't always used in a way that has all MPI nodes
synced up. For example if worker x has 3 tasks and worker y has 5,
that could lead to a deadlock if they use these utilities.
Rather than requiring all clients of these utlities know the MPI
global state, we just remove the barriers, and will deal with
file lock issues in more forgiving ways.

Closes #982
@@ -26,6 +26,7 @@
from armi.utils.directoryChangers import TemporaryDirectoryChanger

THIS_DIR = os.path.dirname(__file__)
MPI_COMM = context.MPI_COMM
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops don't need this

Copy link
Member

@john-science john-science left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me!

But I will need @onufer to test if this code solves his bug downstream.

@onufer
Copy link
Contributor

onufer commented Nov 18, 2022

problem is solved.

@john-science john-science merged commit 323e949 into main Nov 18, 2022
@john-science john-science deleted the ntouran/982-no-barriers branch November 18, 2022 14:39
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.

Remove MPI awareness requirements from Temporary Directory Changer and Output Cache
4 participants