Add check for PSM2 reference counting to PSM2 MTL #7721

As discussed, a feature is being added to libpsm2 to correctly handle
the case where the library is opened by multiple OMPI transports in the same
process. (For example, the OFI BTL and the PSM2 MTL).

* Improved error message to indicate required libpsm2 version.

* Adds a test at autogen/configure time for the existence of

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Signed-off-by: Michael Heinz <michael.william.heinz@intel.com>
(cherry picked from commit f10305a49f)
This commit is contained in:
Michael Heinz 2020-05-11 13:58:30 -04:00 committed by Howard Pritchard
parent f334a699b7
commit b680893917
2 changed files with 21 additions and 1 deletions

View File

@ -76,7 +76,15 @@ AC_DEFUN([OMPI_CHECK_PSM2],[
[AC_MSG_WARN([glob.h not found. Can not build component.])
OPAL_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy])
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
[AC_MSG_WARN([PSM2 needs to be version 11.2.173 or later. Disabling MTL.])
[#include <psm2.h>])
OPAL_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy])
AS_IF([test "$ompi_check_psm2_happy" = "yes"],

View File

@ -194,6 +194,18 @@ ompi_mtl_psm2_component_open(void)
static int
ompi_mtl_psm2_component_query(mca_base_module_t **module, int *priority)
* Mixing the PSM2 MTL with the OFI BTL (using PSM2)
* can cause an issue when they both call psm2_finalize
* in older versions of libpsm2.
if (!psm2_get_capability_mask(PSM2_LIB_REFCOUNT_CAP)) {
opal_output_verbose(2, ompi_mtl_base_framework.framework_output,
"This version of the PSM2 MTL needs version 11.2.173 or later of the libpsm2 library for correct operation.\n");
* if we get here it means that PSM2 is available so give high priority