Skip to content

Fix passing MPI communicators Participant#256

Merged
IshaanDesai merged 3 commits intodevelopfrom
fix-init-with-mpi
Apr 10, 2026
Merged

Fix passing MPI communicators Participant#256
IshaanDesai merged 3 commits intodevelopfrom
fix-init-with-mpi

Conversation

@fsimonis
Copy link
Copy Markdown
Member

@fsimonis fsimonis commented Apr 10, 2026

This PR fixes passing communicators to the participant initialization.

It used mpi4py.MPI._addressof to get the address to the underlying C comm and then forwards that to the participant interface.

Closes #188

@fsimonis fsimonis marked this pull request as draft April 10, 2026 11:42
@fsimonis fsimonis self-assigned this Apr 10, 2026
@fsimonis fsimonis added the bug Something isn't working label Apr 10, 2026
@valentinaschueller
Copy link
Copy Markdown

@fsimonis I can confirm that this works!

@fsimonis fsimonis force-pushed the fix-init-with-mpi branch from 2ee3e1c to 9208cd1 Compare April 10, 2026 12:44
@fsimonis
Copy link
Copy Markdown
Member Author

I did some more digging and mpi4py has functionality to expose the address directly.
Meaning we can simply hotfix this.

@fsimonis fsimonis marked this pull request as ready for review April 10, 2026 12:48
@fsimonis fsimonis requested a review from IshaanDesai April 10, 2026 12:48
Copy link
Copy Markdown
Member

@IshaanDesai IshaanDesai left a comment

Choose a reason for hiding this comment

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

Looks good 👍 @valentinaschueller thanks for confirming that this works! I hope the latest solution also works for you.

Co-authored-by: Ishaan Desai <ishaandesai@gmail.com>
@IshaanDesai IshaanDesai merged commit f40889a into develop Apr 10, 2026
10 of 20 checks passed
@IshaanDesai IshaanDesai deleted the fix-init-with-mpi branch April 10, 2026 14:19
@valentinaschueller
Copy link
Copy Markdown

It does! Thank you both for taking care of this so quickly 🙂

@IshaanDesai
Copy link
Copy Markdown
Member

It does! Thank you both for taking care of this so quickly 🙂

Our pleasure. I will do a bugfix release soon.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for custom MPI communicator

3 participants