Skip to content

Conversation

@rajalaxmia
Copy link

No description provided.

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]>
@Zhenye-Na
Copy link
Contributor

bot:aws:retest

1 similar comment
@shijin-aws
Copy link
Contributor

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
Copy link
Contributor

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();
Copy link
Contributor

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";
Copy link
Contributor

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
Copy link
Contributor

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>
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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;
Copy link
Contributor

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.

Comment on lines +304 to +307
err:
if (info)
fi_reject(pep, info->handle, NULL, 0);
return ret;
Copy link
Contributor

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?

Comment on lines +286 to +288
printf("fi_enable: %d", ret);
return ret;
}
Copy link
Contributor

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";
Copy link
Contributor

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,
Copy link
Contributor

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;

Copy link
Contributor

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";
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants