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

mca/base: add a new MCA variable type for include lists #12826

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hjelmn
Copy link
Member

@hjelmn hjelmn commented Sep 24, 2024

It is not uncommon in Open MPI to register a string variable to allow specifying an exclude or exclude list (every framework registers one). Given this common patten it is worthwhile to formalize an MCA include list variable type: MCA_BASE_VAR_TYPE_INCLUDE_LIST. Variables of this type use a new opal object (mca_base_var_include_list_t) that stores and argv-style array and an exclude- list flag. To register an include list variable the caller must first either OBJ_CONSTRUCT the object or allocate it with OBJ_NEW. Variables of this type are exposed as strings to MPI_T.

@hjelmn hjelmn requested a review from jsquyres September 24, 2024 20:13
@hjelmn hjelmn force-pushed the make_include_lists_a_variable_type_for_mca branch 3 times, most recently from 4f203e3 to 2ed9438 Compare September 24, 2024 22:15
@rhc54
Copy link
Contributor

rhc54 commented Sep 25, 2024

Hmmm...given the interconnection between the OMPI and PMIx/PRRTE codes, and that they both utilize the MCA architecture, I wonder if we will create confusion if we don't bring this across to the others? There is no connection between MPI_T and those other codes, so if that is the primary motivator here, then perhaps it is less of an issue? Just pondering - if we want to maintain the similarity, then it doesn't seem like it would take much to do the port.

@hjelmn
Copy link
Member Author

hjelmn commented Sep 25, 2024

@rhc54 Just depends on if this is useful. From an external perspective these are just strings like today. Internally the parsing is just handled inside the MCA base to avoid boilerplate code for parsing these. It may still be worth porting over to prrte if that still uses MCA given it centralizes the include/exclude logic. We did this with enums as well-- used to have a lot of code taking an int or string and converting it to a string or int.

@hjelmn
Copy link
Member Author

hjelmn commented Oct 4, 2024

I am cleaning this one up a bit. Hold off on reviews. Adding support for regex include lists since I have a need for that.

It is not uncommon in Open MPI to register a string variable to allow specifying
an exclude or exclude list (every framework registers one). Given this common
patten it is worthwhile to formalize an MCA include list variable type:
MCA_BASE_VAR_TYPE_INCLUDE_LIST. Variables of this type use a new opal object
(mca_base_var_include_list_t) that stores and argv-style array and an exclude-
list flag. To register an include list variable the caller must first either
OBJ_CONSTRUCT the object or allocate it with OBJ_NEW. Variables of this type are
exposed as strings to MPI_T.

Signed-off-by: Nathan Hjelm <[email protected]>
@hjelmn hjelmn force-pushed the make_include_lists_a_variable_type_for_mca branch from 2ed9438 to bb835ff Compare October 16, 2024 16:30
@hjelmn
Copy link
Member Author

hjelmn commented Oct 16, 2024

Ok, ready to go.

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.

2 participants