Skip to content

Commit 6e04f3d

Browse files
committed
mtl/psm2: provide option to disable psm2 REFCNT check
There are cases where customers may have systems where they don't want to upgrade lower level system software like PSM2 and now can't install OMPI 4.1 and newer and still have PSM2 MTL support. This PR provides a way for knowledgable admins to disable the PSM2 version checking. related to issue #8381 Signed-off-by: Howard Pritchard <hppritcha@gmail.com>
1 parent 8f8e9b8 commit 6e04f3d

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

config/ompi_check_psm2.m4

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ AC_DEFUN([OMPI_CHECK_PSM2],[
4040
[Search for PSM (Intel PSM2) libraries in DIR])])
4141
OPAL_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*])
4242

43+
AC_ARG_ENABLE([psm2-version-check],
44+
[AC_HELP_STRING([--disable-psm2-version-check],
45+
[Disable PSM2 version checking. Not recommended to disable. (default: enabled)])])
46+
4347
ompi_check_psm2_$1_save_CPPFLAGS="$CPPFLAGS"
4448
ompi_check_psm2_$1_save_LDFLAGS="$LDFLAGS"
4549
ompi_check_psm2_$1_save_LIBS="$LIBS"
@@ -78,10 +82,13 @@ AC_DEFUN([OMPI_CHECK_PSM2],[
7882

7983
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
8084
[AC_CHECK_DECL([PSM2_LIB_REFCOUNT_CAP],
81-
[],
82-
[AC_MSG_WARN([PSM2 needs to be version 11.2.173 or later. Disabling MTL.])
83-
ompi_check_psm2_happy="no"],
84-
[#include <psm2.h>])
85+
[AC_DEFINE([HAVE_PSM2_LIB_REFCOUNT_CAP], [1],
86+
[have PSM2_LIB_REFCOUNT_CAP in psm2.h])],
87+
[AS_IF([test "x$enable_psm2_version_check" != "xno"],
88+
[ompi_check_psm2_happy="no"
89+
AC_MSG_WARN([PSM2 needs to be version 11.2.173 or later. Disabling MTL.])]
90+
)],
91+
[#include <psm2.h>])
8592
])
8693

8794
OPAL_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy])

ompi/mca/mtl/psm2/mtl_psm2_component.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* Copyright (c) 2018 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
1919
* Copyright (c) 2018-2020 Amazon.com, Inc. or its affiliates. All Rights reserved.
20+
* Copyright (c) 2021 Triad National Security, LLC. All rights
21+
* reserved.
2022
* $COPYRIGHT$
2123
*
2224
* Additional copyrights may follow
@@ -324,16 +326,21 @@ static int
324326
ompi_mtl_psm2_component_query(mca_base_module_t **module, int *priority)
325327
{
326328

329+
#if HAVE_PSM2_LIB_REFCOUNT_CAP
327330
/*
328331
* Mixing the PSM2 MTL with the OFI BTL (using PSM2)
329332
* can cause an issue when they both call psm2_finalize
330333
* in older versions of libpsm2.
334+
*
335+
* An installer may know what they are doing and disabled
336+
* checking psm2 version, hence making this code conditional.
331337
*/
332338
if (!psm2_get_capability_mask(PSM2_LIB_REFCOUNT_CAP)) {
333339
opal_output_verbose(2, ompi_mtl_base_framework.framework_output,
334340
"This version of the PSM2 MTL needs version 11.2.173 or later of the libpsm2 library for correct operation.\n");
335341
return OMPI_ERR_FATAL;
336342
}
343+
#endif
337344

338345
/*
339346
* if we get here it means that PSM2 is available so give high priority

0 commit comments

Comments
 (0)