Skip to content

Coll han: fix allreduce dynamic calling internal han algo on sub_comm #10456

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

Merged

Conversation

FlorentGermain-Bull
Copy link
Contributor

Fix for #8248 (a little bit late).
This PR reactivates the dynamic mechanism and corrects the initial bug.
To make it simple, the dynamic had a bug that caused a call to an internal han implementation on a sub_communicator but with a wrong module, leading to a segfault.

@ompiteam-bot
Copy link

Can one of the admins verify this patch?

@awlauria
Copy link
Contributor

awlauria commented Jun 8, 2022

ok to test

@FlorentGermain-Bull FlorentGermain-Bull force-pushed the coll_han_fix_dynamic_allreduce branch from eeb479e to 97d2e34 Compare June 8, 2022 13:58
@open-mpi open-mpi deleted a comment from ibm-ompi Jun 8, 2022
@open-mpi open-mpi deleted a comment from ibm-ompi Jun 8, 2022
@open-mpi open-mpi deleted a comment from ibm-ompi Jun 8, 2022
@jjhursey
Copy link
Member

jjhursey commented Jun 8, 2022

bot:ibm:retest

@open-mpi open-mpi deleted a comment from ibm-ompi Jun 8, 2022
@open-mpi open-mpi deleted a comment from ibm-ompi Jun 8, 2022
@open-mpi open-mpi deleted a comment from ibm-ompi Jun 8, 2022
@open-mpi open-mpi deleted a comment from ibm-ompi Jun 8, 2022
@open-mpi open-mpi deleted a comment from ibm-ompi Jun 8, 2022
@open-mpi open-mpi deleted a comment from ibm-ompi Jun 8, 2022
@jjhursey
Copy link
Member

jjhursey commented Jun 9, 2022

bot:ibm:retest

@awlauria
Copy link
Contributor

Can this get a review?

@@ -116,7 +116,7 @@ int mca_coll_han_comm_create_new(struct ompi_communicator_t *comm,
/*
* This sub-communicator contains the ranks that share my node.
*/
opal_info_set(&comm_info, "ompi_comm_coll_preference", "^han");
opal_info_set(&comm_info, "ompi_comm_coll_preference", "han");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change? IIRC, the intention is to disable HAN in the sub communicators, not enable it.

Copy link
Contributor

Choose a reason for hiding this comment

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

In the dynamic path, the decision for which submodule to use on each level is taken at collective-op-time, instead of on comm-split-time, like in the classic path. The topo_lvl key attached to the new comm will let han know that this is a sub-comm and decide accordingly when a collective is called on it

Copy link
Contributor

Choose a reason for hiding this comment

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

My descriptions in #10458 might help

Copy link
Contributor

Choose a reason for hiding this comment

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

So that fixes the dynamic selection. But doesn't that interfere with the static selection? I remember we put the preference key in in order to prevent han from selecting itself in the subcomm.

Copy link
Contributor

Choose a reason for hiding this comment

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

So the two paths exist together. Some methods use the dynamic (mainly the simple ones), through mca_coll_han_comm_create_new, while others use the old/non-dynamic one through mca_coll_han_comm_create. If we exclude HAN on the dynamic path sub-comm, the component with the next higher priority gets chosen, but in this way the submodule to use cannot be tuned

Copy link
Contributor

@gkatev gkatev Jul 14, 2022

Choose a reason for hiding this comment

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

So no, the two paths do not affect each other. Each one creates different sub-comms, in a slightly different way, and the chosen path is determined by the respective collective primitive implementation. Yes this is a bit akward! (#10438)

Copy link
Contributor

Choose a reason for hiding this comment

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

Btw if you attempt to test all this I believe you will need a fix for #10335

Copy link
Contributor

Choose a reason for hiding this comment

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

I see now that this is in mca_coll_han_comm_create_new (a terrible name, btw). I guess that's fine then

@jsquyres
Copy link
Member

@bosilca ?

@awlauria
Copy link
Contributor

awlauria commented Aug 2, 2022

@bosilca is this good to go?

@awlauria
Copy link
Contributor

@bosilca ping do you agree with the change?

@jsquyres
Copy link
Member

@FlorentGermain-Bull Can you rebase this PR so that it picks up the new CI? Thanks!

@FlorentGermain-Bull FlorentGermain-Bull force-pushed the coll_han_fix_dynamic_allreduce branch from 97d2e34 to f242689 Compare September 29, 2022 11:30
@awlauria awlauria merged commit a5cef90 into open-mpi:main Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants