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

MPITopology usage with comm_cart not as presented in docs #71

Closed
chowland opened this issue Jan 23, 2023 · 1 comment
Closed

MPITopology usage with comm_cart not as presented in docs #71

chowland opened this issue Jan 23, 2023 · 1 comment

Comments

@chowland
Copy link

I've noticed that the usage of MPITopology with a pre-existing Cartesian communicator doesn't work following the documentation. Simply passing

dims = (2,3)
MPI.Init()
comm_cart = MPI.Cart_create(MPI.COMM_WORLD, dims)
topo = MPITopology(comm_cart)

gives an error, which is fixed by specifying

topo = MPITopology{2}(comm_cart)

I'm not sure whether this is intended (and should then be changed in the docs) or whether another method for MPITopology should be defined to make things work as suggested by the documentation

@jipolanco
Copy link
Owner

You're right, it's a documentation issue. It should be MPITopology{2}(comm_cart) as you noticed. Thanks for catching that.

Note that in the docs for the MPITopology type the right constructor is used:

comm = MPI.COMM_WORLD
@assert MPI.Comm_size(comm) == 8
pdims = (4, 2)
comm_cart = MPI.Cart_create(comm, pdims)
topology = MPITopology{2}(comm_cart)

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

No branches or pull requests

2 participants