[libfabric-users] Determining available providers

Jeff Squyres (jsquyres) jsquyres at cisco.com
Tue Sep 25 12:19:09 PDT 2018

On Sep 25, 2018, at 3:10 PM, Hefty, Sean <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

More information about the Libfabric-users mailing list