-
Notifications
You must be signed in to change notification settings - Fork 388
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
2.0 deprecations #10250
2.0 deprecations #10250
Conversation
Several defines and values should not have been exposed in the public header files. Remove or move the definitions into internal headers. This removes the chance of possible conflicts with application definitions and API breakage. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Jianxin Xiong <[email protected]>
74ef6ba
to
d833ed5
Compare
bot:aws:retest |
@shijin-aws Could you check the AWS CI error? |
Ompi 4.1.x failed to compile with this PR. @wenduwan The log is pretty long and I haven't seen how it could be caused by this PR
|
This looks odd. But one oddity in open mpi is |
@hppritcha Do you have any thoughts? For libfabric 2.0 do we need to make configury changes in ompi? |
This first commit in the PR removed That's probably the reason of the failure. |
In this case I think open mpi should be more defensive, and define its own container_of - @hppritcha what do you think? |
@j-xiong While I don't think open mpi is doing the right thing, I also wonder if there is a strong reason to move the container_of macro in libfabric? As a result of this change, existing open mpi tarballs will not build with libfabric 2.0. There might be other problems as well but we can go from here. |
ompi cannot rely on |
|
I agree with the long-term plan to have applications define container_of individually. But I would like to explore it is ok to keep it in libfabric header for now so open mpi(and maybe other affected packages) can take actions separately. In other words, does container_of have to be relocated as part of libfabric 2.0? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice any issues. Not sure if the Pragma works for all builds (windows, OS X, etc.)
Updating the major version from 1 to 2 indicates that the changes may break apps. Otherwise, this is just another minor version update. The expectation is that apps may actually need to update to support the newer version. container_of() doesn't include a prefix, can conflict with other definitions, and was never defined as a usable API. As a possible option, you could introduce a new header, e.g. fi-compat.h, where removed/deprecated definitions are relocated to. That header could be included using a compiler define. Then the upper app wouldn't need to change, but it would need to specify a define when building against the libfabric headers. (I think this might work...) |
I see. So moving this macro likely requires major version bump. This makes sense. Thanks for the suggestion. I need to poke the open mpi community on the mitigation for users who want to build old open mpi with libfabric 2.0. |
The pragma works with macos. Result from macos build check:
On windows it is not recognized and produces a warning but still serves the purpose of attracting the attention:
|
I am going to ignore the AWC CI failure for now. Please let me know if there are any other concerns about that. |
@j-xiong can you hold it for 1 day, we need to fix our CI otherwise all the future main branch PR will fail after this one is merged. |
@shijin-aws Sure. Please let me know when you think it is ready. |
man/fi_av.3.md
Outdated
@@ -13,7 +13,8 @@ fi_av_open / fi_close | |||
: Open or close an address vector | |||
|
|||
fi_av_bind | |||
: Associate an address vector with an event queue. | |||
: Associate an address vector with an event queue. This funciton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelled function wrong
man/fi_av.3.md
Outdated
to operate asynchronously by specifying the FI_EVENT flag to | ||
`fi_av_open`. When requesting asynchronous operation, the application | ||
must first bind an event queue to the AV before inserting addresses. See | ||
protocols. AV operations are synchronous by default. See |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove the "by default" since there is no alternative anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative is in the deprecated section, but I think I can make it clearer.
man/fi_av.3.md
Outdated
Because the fi_addr_t values returned from an insertion call are | ||
deterministic, applications may not need to provide the fi_addr_t | ||
output parameters to insertion calls. The exception is when | ||
authentication keys are required for communication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed you removed the part in av_insert that specifies that the fi_addr_t can be used as an index into an array, presumably because it might be extended to into include other information in the upper 32 bits or something. It feels like that conflicts with this addition. The app should be providing the fi_addr, even in FI_AV_TABLE in order to save the full context of information, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removed part just enumerates a few possible cases which table index as one of them. They are removed because we don't really need those details here, especially since we are deprecating the av map semantics.
The upper 32-bit usage is in a later patch, we don't need to count for that now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought another exception is FI_AV_TABLE_USER_ID
? In that case fi_addr_t
is also an input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am changing this to: The exception is when the fi_addr_t parameters are also used as input for supplying authentication keys or user defined IDs
return -FI_ENOEQ; | ||
} | ||
|
||
if (flags & FI_SYNC_ERR) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never used FI_SYNC_ERR before - it seems like it requires an EQ for the AV. Does this need to be deprecated as well? There seem to still be providers that check this value and use it. Just clarifying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flag allows details of errors being reported for synchronous av insertion. It doesn't require av-eq binding, but requires the context parameter pointing to array for storing error codes.
@@ -372,7 +372,6 @@ int main(int argc, char **argv) | |||
hints->mode = FI_CONTEXT; | |||
hints->domain_attr->mr_mode = opts.mr_mode; | |||
hints->domain_attr->resource_mgmt = FI_RM_ENABLED; | |||
hints->rx_attr->total_buffered_recv = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not important but if you're going to update the patch set anyway, "compatibility" is spelled wrong in the commit message
@@ -181,8 +181,7 @@ static int validate_tx_ordering_bits(char *node, char *service, uint64_t flags, | |||
struct fi_info *hints, struct fi_info **info) | |||
{ | |||
return validate_bit_combos(node, service, flags, hints, info, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to just remove the entire validate_tx/rx_ordering_bits tests. The validate_bit_combos iterates over all combinations of the bits and tests all combinations of them so if it's set to 0, there are no bits to test so the call is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait. the value passed in is all 1, not 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh sorry must have misread that!
@@ -1048,11 +1048,6 @@ transfer operation in order to guarantee that ordering is met. | |||
update operations. If not atomic updates may be | |||
transmitted out of order from their submission. | |||
|
|||
*FI_ORDER_NONE* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to remove or add a deprecated note like the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was missed in the transition. Need to add a deprecated note.
d833ed5
to
594dd91
Compare
Previously mtl_ofi_request.h inadvertently used container_of as defined by libfabric in include/rdma/fabric.h, however libfabric is removing that symbol from their headers as part of changes supporting libfabric 2.0 API. (see ofiwg/libfabric#10250). This change defines our own (compatible) container_of macro to remove the external dependence, but only if it is not already defined. Signed-off-by: Luke Robison <[email protected]>
open-mpi/ompi#12724 has been merged to ompi main to fix the illegal container_of import The current plan is to backport this fix to 4.1.x and 5.0.x branch by today, since we are always building the head of ompi branches in AWS CI, this should be ok |
@@ -685,7 +676,7 @@ buffer associated with a failed or aborted insertion will be set to | |||
FI_ADDR_NOTAVAIL. | |||
|
|||
All other calls return FI_SUCCESS on success, or a negative value corresponding | |||
to fabric errno on error. Fabric errno values are defined in `rdma/fi_errno.h`. | |||
to fabric errno on error. Fabric errno values are defined in `rdma/fi_errno.h`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a convention, double spaces have been used in the man pages between full sentences. Doesn't seem to affect the output though.
@@ -678,17 +678,10 @@ int efa_av_insert(struct fid_av *av_fid, const void *addr, | |||
|
|||
/* cancel remaining request and log to event queue */ | |||
for (; i < count ; i++) { | |||
if (av->util_av.eq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure why efa has to do this before with no support of FI_EVENT
include/rdma/fi_domain.h
Outdated
@@ -327,7 +327,7 @@ struct fi_ops_mr { | |||
}; | |||
|
|||
/* Domain bind flags */ | |||
#define FI_REG_MR (1ULL << 59) | |||
#define FI_REG_MR (1ULL << 59) /* deprecated */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to do the pragma trick in af29844 for all deprecated bits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
@@ -73,7 +73,7 @@ const struct fi_domain_attr efa_domain_attr = { | |||
.control_progress = FI_PROGRESS_AUTO, | |||
.data_progress = FI_PROGRESS_AUTO, | |||
.resource_mgmt = FI_RM_DISABLED, | |||
.mr_mode = OFI_MR_BASIC_MAP | FI_MR_LOCAL | FI_MR_BASIC, | |||
.mr_mode = OFI_MR_BASIC_MAP | FI_MR_LOCAL | OFI_MR_BASIC, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe efa code has more occurrence for FI_LOCAL_MR
to handle old API, but it's ok to leave as is for this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is only one occurrence in efa unit test, which I think should leave it as it is (tests are only supposed to see public headers).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep yep
Deprecate support for asynchronous insertions and AV_MAP. The format of the fi_addr_t value will either be indexed based in the standard case or provider defined in more advanced use cases, based on the AV configuration (such as using auth_keys). Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Jianxin Xiong <[email protected]>
Remove FI_BUFFERED_RECV as an exported API option. Since it's currently used internally between mrail and rxm, make it an internal only option. It has a limited use case for multirail over rxm over connected endpoints where shared receive queues are not available. With shared receive queues, the feature wouldn't be needed, as mrail could own the buffers outright. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Jianxin Xiong <[email protected]>
Deprecate overly complicated threading models and focus on specific models to allow better alignment between application designs and provider implementation. Use FI_THREAD_DOMAIN as the preferred lockless threading model for standard endpoints. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Jianxin Xiong <[email protected]>
Combine data and control progress into one progress option. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Jianxin Xiong <[email protected]>
Completions are always unordered. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Jianxin Xiong <[email protected]>
Field was deprecated and only serves as a placeholder for compatibility. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Jianxin Xiong <[email protected]>
Feature is not implemented natively by providers. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Jianxin Xiong <[email protected]>
Remove FI_ORDER_NONE (flag that's 0) and FI_ORDER_STRICT (which isn't a flag, and covers only a portion of the valid flags). Remove FI_ORDER_DATA, which will not be supported by version 2 in order to allow for greater provider optimization. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Jianxin Xiong <[email protected]>
Disallow users hand-crafting or hand-copying their own fi_info structs. This allows the library to allocate hidden fields for internal use. Plus, there's no need to apps to do this, given that the API call is way easier to use. Signed-off-by: Sean Hefty <[email protected]>
Mark 'struct fid_wait' and 'struct fid_poll' as deprecated, as well as the following functions that take objetcs of these types as input: fi_wait_open() fi_wait() fi_poll_open() fi_poll() fi_poll_add() fi_poll_del() Providers use internal version of these functions to avoid compiler warnings. Signed-off-by: Jianxin Xiong <[email protected]>
This wait object type is only implemened by the sockets provider as an exmaple. Signed-off-by: Jianxin Xiong <[email protected]>
FI_MR_BASIC / FI_MR_SCALABLE / FI_MR_UNSPEC / FI_LOCAL_MR have been deprecated since verison 1.5. However, no mechanism was in place to discourage their usage. Add compiler directives to generate warning messages if these defintions are used. Providers use internal version of these values to maintain application compatibility w/o generating warning messages. Signed-off-by: Jianxin Xiong <[email protected]>
594dd91
to
d689aa8
Compare
@shijin-aws Can you restart AWS CI? |
bot:aws:retest |
@shijin-aws @wenduwan What is the current CI error? |
No description provided. |
1 similar comment
No description provided. |
Now I'm seeing a bunch of fabtests failures |
Looks like our port randomization logic was lost somewhere 🤔 |
@j-xiong We have a couple CI changes coming up but it will take some time to deploy. Let me rerun the test locally. |
@shijin-aws @j-xiong Could you restart AWS CI? Our fixes have been deployed. |
bot:aws:restart |
bot:aws:restart > bot:aws:retest |
bot:aws:retest |
This is the first part of reworked #10009. It contains all the API deprecations. Major changes from the original PR: