Skip to content

Conversation

@hjelmn
Copy link
Member

@hjelmn hjelmn commented Mar 21, 2016

This PR adds support for flag enumerators for MCA variables. A new function and types have been added to mca_base_var_enum.h to support these enumerators. Use mca_base_var_enum_create_flag to create a flag enumerator with a given set of flags and use the enumerator with mca_base_var_register()/mca_base_pvar_register().

Variables using a flag enumerator can take a comma-delimited list of flags. For example, instead of

# set put, get, send, and in-place
btl_vader_flags = 0xf

a user can can now use

# set put, get, send, and in-place
btl_vader_flags = send,put,get,in-place

The old value way of setting the flags will continue to work.

hjelmn added 2 commits March 21, 2016 15:20
This commit adds a new type of enumerator meant to support flag
values. The enumerator parses comma-delimited strings and matches
each string or value to a list of valid flags. Additionally, the
enumerator does some basic checks to see if 1) a flag is valid in the
enumerator, and 2) if any conflicting flags are specified.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
This commit uses the new flag "enumerator" to support comma-delimited
lists of flags for both the btl and btl atomic flags. After this
commit is is valid to specify something like -mca btl_foo_flags
self,put,get,in-place. All non-deprecated flags are supported by the
enumerator.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
@hjelmn hjelmn added this to the v2.1.0 milestone Mar 21, 2016
@hjelmn
Copy link
Member Author

hjelmn commented Mar 21, 2016

I should also mention I changed the semantics of the enum string_from_value function. It now must return an string that can be freed with free(). All the affected code has been updated to reflect this change.

@hjelmn hjelmn merged commit d6e90f2 into open-mpi:master Mar 26, 2016
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.

1 participant