Skip to content

Commit 854c13f

Browse files
authored
Merge pull request #8667 from hppritcha/topic/fix_issue_8651
MTL/PSM2: fix check for PSM2_LIB_REFCOUNT_CAP
2 parents ef5bd1b + c010cb2 commit 854c13f

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

config/ompi_check_psm2.m4

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
# and Technology (RIST). All rights reserved.
1818
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
1919
# reserved.
20+
# Copyright (c) 2021 Triad National Security, LLC. All rights
21+
# reserved.
22+
#
2023
# $COPYRIGHT$
2124
#
2225
# Additional copyrights may follow
@@ -65,10 +68,6 @@ AC_DEFUN([OMPI_CHECK_PSM2],[
6568
[ompi_check_psm2_happy="no"])],
6669
[ompi_check_psm2_happy="no"])
6770

68-
CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS"
69-
LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS"
70-
LIBS="$ompi_check_psm2_$1_save_LIBS"
71-
7271
AS_IF([test "$ompi_check_psm2_happy" = "yes" && test "$enable_progress_threads" = "yes"],
7372
[AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.])
7473
ompi_check_psm2_happy="no"])
@@ -81,15 +80,21 @@ AC_DEFUN([OMPI_CHECK_PSM2],[
8180
ompi_check_psm2_happy="no"])])
8281

8382
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
84-
[AC_CHECK_DECL([PSM2_LIB_REFCOUNT_CAP],
83+
[AS_IF([ test ! -z "$ompi_check_psm2_dir"],
84+
[CPPFLAGS="-I $ompi_check_psm2_dir/include $CPPFLAGS"])
85+
AC_CHECK_DECL([PSM2_LIB_REFCOUNT_CAP],
8586
[AC_DEFINE([HAVE_PSM2_LIB_REFCOUNT_CAP], [1],
8687
[have PSM2_LIB_REFCOUNT_CAP in psm2.h])],
8788
[AS_IF([test "x$enable_psm2_version_check" != "xno"],
8889
[ompi_check_psm2_happy="no"
8990
AC_MSG_WARN([PSM2 needs to be version 11.2.173 or later. Disabling MTL.])]
9091
)],
91-
[#include <psm2.h>])
92-
])
92+
[#include <psm2.h>])]
93+
)
94+
95+
CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS"
96+
LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS"
97+
LIBS="$ompi_check_psm2_$1_save_LIBS"
9398

9499
OPAL_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy])
95100
fi

0 commit comments

Comments
 (0)