-
Notifications
You must be signed in to change notification settings - Fork 451
examples: Hoti examples msg, rdm_tagged, rdm_rma, tcp_socket #11442
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
base: main
Are you sure you want to change the base?
Conversation
with FI_EP_MSG endpoint Signed-off-by: Rajalaxmi Angadi <[email protected]>
Tagged messages are data transfers which carry a key or tag with the message buffer. The tag is used at the receiving endpoint to match the incoming message with a corresponding receive buffer. Message tags match when the receive buffer tag is the same as the send buffer tag. Signed-off-by: Rajalaxmi Angadi <[email protected]>
example showing remote memory access with rdm endpoint with write and read apis. Signed-off-by: Rajalaxmi Angadi <[email protected]>
Example used send and recv apis to transfer messages. Signed-off-by: Rajalaxmi Angadi <[email protected]>
|
bot:aws:retest |
1 similar comment
|
bot:aws:retest |
| * FI_EP_DGRAM - unconnected, unreliable | ||
| * The type of endpoint will be requested in hints/fi_getinfo. | ||
| * Different providers support differen types of endpoints. TCP | ||
| * supports only FI_EP_MSG but when used with RxM, can support |
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.
tcp directly supports FI_EP_MSG and FI_EP_RDM. The list of returned providers will include tcp;ofi_rxm, but it will be prioritized after tcp without rxm, assuming there are not other hints preventing tcp to be supported on it's own (FI_ATOMIC, maybe?).
| if (ret) | ||
| return ret; | ||
| /* | ||
| * ret = sync_progress(); |
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.
remove commented if not needed
| hints->caps = FI_TAGGED; | ||
| hints->mode = FI_CONTEXT; | ||
| hints->tx_attr->op_flags = FI_DELIVERY_COMPLETE; | ||
| hints->fabric_attr->prov_name = "shm"; |
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.
did you intend to limit this to shm?
|
|
||
| > **Note:** The server and client must use the same provider. The server | ||
| address provided to the client must match the provider/interface being used. | ||
| Specifying `FI_PROVIDER` is optional; libfabric will select the fastest |
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.
rather than fastest interface, I would say "the provider/interface expected to be most performant"
|
|
||
| #### Client | ||
| ```bash | ||
| FI_PROVIDER=<prov> ./fi_example_rdm_rma <server_addr> |
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.
code block doesn't close
|
|
||
| #### Client | ||
| ```bash | ||
| ./fi_example_tcp_socket -s <server_addr> -c |
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.
code block doesn't close
| ssize_t rd; | ||
|
|
||
| /* | ||
| * Initializes all basic OFI resources to allow for a server/client |
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.
Initialize
| { | ||
| rd = fi_eq_sread(eq, &event, &entry, sizeof(entry), -1, 0); | ||
| if (rd != sizeof entry) { | ||
| ret = (int) rd; |
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.
alignment of this line is off.
| err: | ||
| if (info) | ||
| fi_reject(pep, info->handle, NULL, 0); | ||
| return ret; |
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 goto that target this label, could just move this block there. Or do you actually want to have more locations jumping to here instead of returnimg?
| printf("fi_enable: %d", ret); | ||
| return ret; | ||
| } |
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.
alignment is off.
| hints->caps = FI_MSG; | ||
|
|
||
| /* Specifically request the tcp provider for the simple test */ | ||
| hints->fabric_attr->prov_name = "tcp"; |
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.
With the provider explicitly set to tcp here, the use of the FI_PROVIDER environment makes no sense. Either change here or the usage in the README file.
| { | ||
| int ret; | ||
| do { | ||
| ret = fi_read(ep, buf_read, BUF_SIZE, local_desc_read, fi_addr, remote_addr_read, |
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.
alignment of this line is off.
| ret = sync_progress(); | ||
| if (ret) | ||
| return ret; | ||
|
|
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.
remove this empty line.
| /* | ||
| * Specifically request the tcp provider for the simple test | ||
| */ | ||
| hints->fabric_attr->prov_name = "tcp"; |
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.
Same comment as the other similar place.
| } | ||
| } | ||
|
|
||
| return err ? err: 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.
see the other comment.
| break; | ||
| } | ||
| } | ||
| return err ? err: 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.
same here.
No description provided.