[libfabric-users] trouble by FI_SOURCE use

Biddiscombe, John A. biddisco at cscs.ch
Sun Mar 10 01:21:17 PST 2019

Hello list

I need to use a particular port number when setting up a connection, so I have

fabric_hints_->src_addr    = socket_data;
fabric_hints_->addr_format = FI_SOCKADDR_IN;
fabric_hints_->src_addrlen = sizeof(struct sockaddr_in);
fabric_hints_->caps        = FI_MSG | FI_RMA | FI_SOURCE |

and all is well, but when a message comes in -
if (src_addr == FI_ADDR_NOTAVAIL)
    LOG_DEBUG_MSG("Source address not available...\n");

my check for the source fails. This is documented - however the documentation/examples appear ambiguous

"src_addr - source address
If specified, indicates the source address. This field will be ignored in hints if FI_SOURCE flag is set."

But the examples/tutorials use src_addr and still set FI_SOURCE, so I tried it too and the endpoint is created on the correct port number. I'm happy.

Requests that the endpoint return source addressing data as part of its completion data."
So if I need the endpoint on a certain port number and I set src_addr, but now the FI_SOURCE flag is dropped, but I also want to know where messages are coming from - how do I get the source information with the message?

Apologies if this question appears trivial, I've not looked at the code for a long time and forgotten much of what I knew about libfabric.



Dr. John Biddiscombe,                    email:biddisco @.at.@ cscs.ch
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Trevano 131, 6900 Lugano, Switzerland   | Fax:  +41 (91) 610.82.82
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/libfabric-users/attachments/20190310/0105ed75/attachment.html>

More information about the Libfabric-users mailing list