Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit bba78d0

Browse files
ggouaillardetRalph Castain
authored andcommitted
pmix/external: revamp external pmix package detection
(cherry picked from commit open-mpi/ompi@08d91b9) opal_check_pmi.m4: remove stale code and comments Signed-off-by: Jeff Squyres <[email protected]> (cherry picked from commit open-mpi/ompi@f3e3b80) Bring this to fully replicate what is on master - avoids future confusion over use of "external" in PMIx configure
1 parent 82dc358 commit bba78d0

File tree

2 files changed

+16
-25
lines changed

2 files changed

+16
-25
lines changed

config/opal_check_pmi.m4

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
1515
# reserved.
1616
# Copyright (c) 2014 Intel, Inc. All rights reserved.
17-
# Copyright (c) 2014 Research Organization for Information Science
17+
# Copyright (c) 2014-2016 Research Organization for Information Science
1818
# and Technology (RIST). All rights reserved.
1919
# $COPYRIGHT$
2020
#
@@ -232,35 +232,26 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
232232
233233
OPAL_VAR_SCOPE_PUSH([pmix_ext_install_dir])
234234
235-
AC_ARG_WITH([external-pmix],
236-
[AC_HELP_STRING([--with-external-pmix(=DIR)],
237-
[Use external PMIx support, optionally adding DIR to the search path (default: no)])],
238-
[], with_external_pmix=no)
235+
AC_ARG_WITH([pmix],
236+
[AC_HELP_STRING([--with-pmix(=DIR)],
237+
[Build PMIx support. DIR can take one of three values: "internal", "external", or a valid directory name. "internal" (or no DIR value) forces Open MPI to use its internal copy of PMIx. "external" forces Open MPI to use an external installation of PMIx. Supplying a valid directory name also forces Open MPI to use an external installation of PMIx, and adds DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries. Note that Open MPI does not support --without-pmix.])])
239238
240-
AC_MSG_CHECKING([if user requested PMIx support])
241-
AS_IF([test "$with_external_pmix" = "no"],
239+
AS_IF([test "$with_pmix" = "no"],
240+
[AC_MSG_WARN([Open MPI requires PMIx support. It can be built])
241+
AC_MSG_WARN([with either its own internal copy of PMIx, or with])
242+
AC_MSG_WARN([an external copy that you supply.])
243+
AC_MSG_ERROR([Cannot continue])])
244+
245+
AC_MSG_CHECKING([if user requested PMIx support($with_pmix)])
246+
AS_IF([test -z "$with_pmix" || test "$with_pmix" = "yes" || test "$with_pmix" = "internal"],
242247
[AC_MSG_RESULT([no])
243248
opal_external_pmix_happy="no"],
244249
[AC_MSG_RESULT([yes])
245250
# check for external pmix lib */
246-
AS_IF([test "$with_external_pmix" == "yes" || test -z "$with_external_pmix"],
251+
AS_IF([test "$with_pmix" = "external"],
247252
[pmix_ext_install_dir=/usr],
248-
[pmix_ext_install_dir=$with_external_pmix])
249-
250-
# cannot use check_package because there are
251-
# external dependencies to make the headers
252-
# build, so just check for presence of header
253-
# and library files - these checks will error
254-
# out if the files aren't found, which is okay
255-
# as we are only executing here if the user
256-
# specified external pmix
257-
OPAL_CHECK_WITHDIR([external-pmix], [$pmix_ext_install_dir/include], [pmix.h])
258-
OPAL_CHECK_WITHDIR([external-libpmix], [$pmix_ext_install_dir/lib], [libpmix.*])
259-
260-
opal_pmix_ext_CPPFLAGS="-I$pmix_ext_install_dir -I$pmix_ext_install_dir/include -I$pmix_ext_install_dir/include/pmix -I$pmix_ext_install_dir/include/pmix/include"
261-
opal_pmix_ext_LDFLAGS="-L$pmix_ext_install_dir/lib"
262-
opal_pmix_ext_LIBS="-lpmix"
263-
opal_external_pmix_happy="yes"
253+
[pmix_ext_install_dir=$with_pmix])
254+
OPAL_CHECK_PACKAGE([opal_pmix_ext], [pmix.h], [pmix], [PMIx_Init], [], [$pmix_ext_install_dir], [], [opal_external_pmix_happy=yes], [])
264255
])
265256
AC_SUBST(opal_pmix_ext_CPPFLAGS)
266257
AC_SUBST(opal_pmix_ext_LDFLAGS)

opal/mca/pmix/external/pmix_ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include "pmix_ext.h"
3838
#include "opal/mca/pmix/base/base.h"
3939

40-
#include "pmix_common.h"
40+
#include <pmix/pmix_common.h>
4141

4242
/**** C.O.M.M.O.N I.N.T.E.R.F.A.C.E.S ****/
4343

0 commit comments

Comments
 (0)