[ofiwg] libfabric fi_getinfo question

Jose, Jithin jithin.jose at intel.com
Thu Jul 16 10:54:18 PDT 2015


Hi Vasiliy,

The example looks fine, and the verbs provider should be able to give
valid output for fi_getinfo.
In fact, we tried this example with verbs provider and it gave valid
fi_info.
So, could the failure be because the node name is not resolvable or
something?
If the issue still exists, we can create an issue in github as Dave
mentioned.


One anomaly we noticed is that verbs provider currently returns with
FI_SOCKADDR_IN address format, even though the requested format is
different.
But, this should not result in returning -FI_EINVAL.

- Jithin




-----Original Message-----
From: <ofiwg-bounces at lists.openfabrics.org> on behalf of Vasiliy Tolstov
<v.tolstov at selfip.ru>
Date: Thursday, July 16, 2015 at 2:14 AM
To: ofiwg <ofiwg at lists.openfabrics.org>
Subject: [ofiwg] libfabric fi_getinfo question

>Hello, i'm try to understand usage of libfabric and stuc at simple
>example, it returns
>fi_getinfo(): info.c:34, ret=-22 (Invalid argument)
>
>i'm try to resolve local node address with hostname =
>cn33.z1.mn2.simplecloud.ru and node_desc = cn33.z1.mn2.simplecloud.ru
>
>P.S does it possible to resolve node address via libfabric that
>entered in node_desc
>(/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/infiniband/mlx4_0/node_
>desc)
>
>int main(int argc, char **argv) {
>        int ret;
>        hints = fi_allocinfo();
>        if (hints == NULL) {
>          fprintf(stderr, "%s\n", "failed to alloc info");
>          return -1;
>        }
>        hints->addr_format = FI_SOCKADDR_IB;
>        ret = fi_getinfo(FI_VERSION(1, 0),
>"cn33.z1.mn2.simplecloud.ru", NULL, 0, hints, &fi);
>        if (ret < 0) {
>                FT_PRINTERR("fi_getinfo", ret);
>                return ret;
>        }
>        if (fi == NULL) {
>                fprintf(stderr, "%s\n", "failed to get info");
>                return -1;
>        }
>        for (rp = fi; rp != NULL; rp = rp->next) {
>                if (rp->addr_format == FI_SOCKADDR_IB) {
>                        addrlen = fi->dest_addrlen;
>                        remote_addr = malloc(addrlen);
>                        memcpy(remote_addr, fi->dest_addr, addrlen);
>                }
>        }
>        fi_freeinfo(fi);
>        return 0;
>}
>
>
>-- 
>Vasiliy Tolstov,
>e-mail: v.tolstov at selfip.ru
>_______________________________________________
>ofiwg mailing list
>ofiwg at lists.openfabrics.org
>http://lists.openfabrics.org/mailman/listinfo/ofiwg




More information about the ofiwg mailing list