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

Fix CommonSpaces and MPI #2176

Merged
merged 2 commits into from
Feb 14, 2025
Merged

Fix CommonSpaces and MPI #2176

merged 2 commits into from
Feb 14, 2025

Conversation

Sbozzolo
Copy link
Member

@Sbozzolo Sbozzolo commented Feb 10, 2025

The CommonGrids module passes down the context to all the grid it creates. This is a problem for IntervalTopology, because it can only be created with Singletons.

This commit fixes this issue and adds test checking that we can create CommonSpaces with MPI and CUDA

Closes #2175

@Sbozzolo Sbozzolo force-pushed the gb/common_mpi branch 4 times, most recently from 19f1a7f to a7ec52d Compare February 10, 2025 21:37
Comment on lines +81 to +82
# Column spaces are not supported with MPI
if !(ClimaComms.context() isa ClimaComms.MPICommsContext)
Copy link
Member

Choose a reason for hiding this comment

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

Does this just not work?

Copy link
Member Author

Choose a reason for hiding this comment

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

I had this error:

  AssertionError: Columns can only be created on Singleton contextes.

But maybe it's because I am not caught up to main. Let me try rebasing

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I added that @assert. I'll verify again

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the assert because creating columns in MPI settings is not possible:

@assert context isa ClimaComms.SingletonCommsContext

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@charleskawczynski charleskawczynski left a comment

Choose a reason for hiding this comment

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

Overall this PR looks like a good set of fixes / improvements.

@Sbozzolo Sbozzolo force-pushed the gb/common_mpi branch 3 times, most recently from 0c105bc to 76896fd Compare February 14, 2025 20:29
The `CommonGrids` module passes down the context to all the grid it
creates. This is a problem for IntervalTopology, because it can only be
created with Singletons.

This commit fixes this issue and adds test checking that we can create
CommonSpaces with MPI and CUDA
@Sbozzolo Sbozzolo merged commit cba0723 into main Feb 14, 2025
35 checks passed
@Sbozzolo Sbozzolo deleted the gb/common_mpi branch February 14, 2025 23:47
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.

CommonSpaces are not compatible with MPI
2 participants