[libfabric-users] Determining available providers

Philip Davis philip.e.davis at rutgers.edu
Wed Sep 26 07:04:28 PDT 2018

Hi Sean and Jeff,

I appreciate the quick reply. A fair part of my interest is in setting sensible defaults at compile time, but perhaps that logic should be pushed out to runtime.


On Sep 25, 2018, at 3:19 PM, Jeff Squyres (jsquyres) <jsquyres at cisco.com<mailto:jsquyres at cisco.com>> wrote:

On Sep 25, 2018, at 3:10 PM, Hefty, Sean <sean.hefty at intel.com<mailto:sean.hefty at intel.com>> wrote:

I am looking for a way to reliably find the available providers on a
system where the libfabric library (and fi_info utility) is being
cross-compiled. For example, on Theta the compute nodes have gni,
while the login nodes do not. I can build the gni provider and use it
at run-time, but I cannot use the fi_info utility on the login nodes
to identify that my libfabric installation has GNI support (I get a
failure with -FI_ENODATA.) I am developing for a library that uses
libfabric, and I’d like to do some conditional compilation based on
available providers (e.g. include the gni extended header if GNI is
available, among other things.) Is there some robust/well-known way to
do this in a build system if fi_info cannot be relied-upon?

The fi_info application just calls fi_getinfo().  I recommend looking at the fi_info source, but in general calling fi_getinfo() with NULL parameters will return the available provides.  You can also use the FI_PROV_ATTR_ONLY flag to see what providers are built into libfabric and would be available if the required hardware and software was installed on the system.

I think he's asking a slightly different question: he wants to know what providers are *available* -- not necessarily which ones will be *selected* at run time.

That being said, I don't think that's the right question to ask.

If you want to conditionally compile support for the GNI extended header functionality, for example, you should AC_CHECK_HEADER for the GNI extended header in your configure script (or moral equivalent).  That will tell you if the header file is there or not, and therefore whether you can build against it.

Then you'll have a 2nd level selection at run time to see if the GNI provider is available or not (i.e., if you're on a machine that has the GNU hardware available).

That's what I would do.

Jeff Squyres
jsquyres at cisco.com<mailto:jsquyres at cisco.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/libfabric-users/attachments/20180926/0975c39c/attachment-0001.html>

More information about the Libfabric-users mailing list