@@ -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 ])
0 commit comments