[libfabric-users] A couple more questions

Hefty, Sean sean.hefty at intel.com
Fri Feb 24 10:26:59 PST 2017


Dear John,

> 1) When I get a completion – using a shared CQ – how can I find the
> endpoint that the completion came from? I could put the endpoint
> context into the context* field of the send, but I’m already using that
> for another pointer I need. Is there an easy way, or will I have to
> store the endpoint in my other structure and get it from the pointer
> I’m using already?

You need to retrieve it from the context passed into the operation.

> 2) I’d like to have a shared receive queue between all remote endpoints
> so that I do not need to prepost buffers individually. I can’t find the
> documentation that shows me how to set this up. I have shared CQ’s ok,
> but not the receive buffers.

This is a shared receive context.  See fi_srx_context().  When allocating the endpoint, set the rx_ctx_cnt endpoint attribute to FI_SHARED_CONTEXT.  The shared Rx context will need to be bound to the EP.  This fabtest may be helpful to look at as well:

https://github.com/ofiwg/fabtests/blob/master/simple/shared_ctx.c

Sincerely,
The List


More information about the Libfabric-users mailing list