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

coll MCA variables READONLY scope prevents their use via MPI_T tools interface #12903

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

burlen
Copy link

@burlen burlen commented Nov 1, 2024

Several of the coll component's MCA variables are restrictively scoped as MCA_BASE_VAR_SCOPE_READONLY. A variable scoped READONLY can be set on the command line but not with the MPI_T tools interface. A change to MCA_BASE_VAR_SCOPE_ALL would enable these to be set by the MPI_T tools interface.

Resolves #12902

Burlen Loring added 5 commits November 6, 2024 18:37
Changes several variables scope from READONLY to ALL so that they can be set
via MPI_T interface

Signed-off-by: Burlen Loring <[email protected]>
Changes several variables scope from READONLY to ALL so that they can be set
via MPI_T interface

Signed-off-by: Burlen Loring <[email protected]>
Changes several variables scope from READONLY to ALL so that they can be set
via MPI_T interface

Signed-off-by: Burlen Loring <[email protected]>
Changes several variables scope from READONLY to ALL so that they can be set
via MPI_T interface

Signed-off-by: Burlen Loring <[email protected]>
Changes several variables scope from READONLY to ALL so that they can be set
via MPI_T interface

Signed-off-by: Burlen Loring <[email protected]>
@burlen burlen force-pushed the coll_mca_var_scope branch from 563973f to 75befb8 Compare November 7, 2024 00:39
@burlen
Copy link
Author

burlen commented Nov 7, 2024

updated copyright, and rebased from main

@bosilca bosilca merged commit 7b2ac18 into open-mpi:main Nov 7, 2024
15 checks passed
@gkatev
Copy link
Contributor

gkatev commented Nov 8, 2024

Is there any reason not to have a variable registered in a way that allows it to be set from the MPI_T tools interface? Maybe just to 'protect' important variables from being altered from tools? I basically want to make sure that I should also do the same thing for coll/xhc's variables. But also asking out of curiosity, since I think I'm seeing many/most variables in OMPI being registered READONLY rather than READ_ALL with SETTABLE.

@bosilca
Copy link
Member

bosilca commented Nov 8, 2024

It will depend on how they are read and used.If they are cached by a framework being able to set them might not lead to what you expect. To be blunt, many of the MCA variables shall never be altered after MPI_Init as this might have unexpected outcomes.

Talking specifically about the collective MCA, I somehow had the assumption that changing these MCA variables will only affect future communicators. But it turns out that is incorrect: once changed an MCA variable impacts all collectives, including in existing communicators.

@burlen
Copy link
Author

burlen commented Nov 11, 2024

once changed an MCA variable impacts all collectives, including in existing communicators.

It's not quite right for the coll tuned component. In the tuned component, MCA variables are stored in global variables. When a communicator is created the value of the global variable is read and stored in the communicator itself(here). Future calls reference the value cached in the communicator, so changing MCA variable only impacts collectives on future communicators. The settings stick to the communicator.

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.

coll MCA variables READONLY scope prevents their use via MPI_T tools interface
3 participants