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

MPI_Intercomm_create functionality #22

Closed
a-jp opened this issue Sep 30, 2021 · 6 comments
Closed

MPI_Intercomm_create functionality #22

a-jp opened this issue Sep 30, 2021 · 6 comments
Assignees

Comments

@a-jp
Copy link

a-jp commented Sep 30, 2021

Hi,

Is MPI_Intercomm_create supported by your library? I couldn't see it. Is it something that could be added?

Is there a recommended way to do it if I've already used:

mpl::communicator group(mpl::communicator::split, comm_world, index);

How would I make the call to MPI_Intercomm_create using group?

Any help really appreciated,
Thanks,
Andy

@rabauke rabauke self-assigned this Oct 1, 2021
@rabauke
Copy link
Owner

rabauke commented Oct 1, 2021

@a-jp: MPI inter-communicators are currently not supported. However, this is certainly a feature worth considering.

Although MPI handles all communicators via the same kind of handle, MPL should model inter-communicators by a specific dedicated class, not via mpl::communicator. Thus, this will not be implemented just via a minimal modification of the mpl::communicator class.

One reason, why inter-communicators are not supported by MPL is just that I never had an actual use-case for this. I know the examples from the MPL standard, which are, however, rather academic. Can you please explain your use-case?

@a-jp
Copy link
Author

a-jp commented Oct 3, 2021

@rabauke many thanks for the comments. The use-case here is multiple program, multiple data (MPMD) style launch using: mpirun -np X prog_1 : -np Y prog_2.

In this case comm_world is of size X+Y. Within comm_world two communicators are created:

mpl::communicator group0(mpl::communicator::split, comm_world, 0);

Here 0 is the application number, for prog_1, and group0 is of size X. A second communicator is created as:

mpl::communicator group1(mpl::communicator::split, comm_world, 1);

Here 1 is the application number, for prog_2, and group1 is of size Y.

The use-case is coupling two codes together that can be used to solve a complex multi-domain problem, that is otherwise not solvable via either individual code. The coupling between the codes is achieved via MPI. In this use-case it is essential to be able to communicate between group0 and group1, hence the need for MPI_Intercomm_create.

An older paper, as this is a well established approach, and very relevant reference for this use-case is below [1]. This represents a real use-case and is representative of the type of problem that interests me; namely coupling two codes via MPI.

I hope you consider this for inclusion into your library, for present I will write a simple wrapper class around MPI_Intercomm_create type functions as I go.

Many thanks,

[1]

@rabauke rabauke added this to the 0.2 milestone Oct 3, 2021
@rabauke
Copy link
Owner

rabauke commented Oct 3, 2021

@a-jp Thanks for further details. I will consider inter-communicators as a future feature of MPL.

@a-jp
Copy link
Author

a-jp commented Oct 4, 2021

ok thanks

@a-jp a-jp closed this as completed Oct 4, 2021
@VictorEijkhout
Copy link

VictorEijkhout commented Oct 4, 2021 via email

@rabauke
Copy link
Owner

rabauke commented Oct 11, 2021

This should stay open until milestone has been reached.

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

No branches or pull requests

3 participants