Skip to content

Commit

Permalink
build: add --enable-pmix-bootstrap support
Browse files Browse the repository at this point in the history
Problem: on some platforms PMIx is the preferred mechanism
to use for bootstrapping Flux.

Prepare to add PMIx support to the Flux broker by adding
an "opt in" configure option: --enable-pmix-bootstrap.
If specified, pkg-config is used to locate a suitable pmix
package.  Configure fails if pmix is requested but not found.

Add PMIX_LIBS and PMIX_CFLAGS to the broker Makefile.am.

Co-authored-by: Jim Garlick <[email protected]>
  • Loading branch information
ggouaillardet and garlick committed Mar 16, 2021
1 parent 428762d commit 9a2bc3e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
10 changes: 10 additions & 0 deletions config/x_ac_pmix.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# It is fatal if --enable-pmix-bootstrap and pmix package not found.
# (PKG_CHECK_MODULES default behavior is to fail if package not found)
AC_DEFUN([X_AC_PMIX], [
AC_ARG_ENABLE([pmix-bootstrap],
AS_HELP_STRING([--enable-pmix-bootstrap], [Enable PMIx bootstrap]))
AS_IF([test "x$enable_pmix_bootstrap" = "xyes"], [
PKG_CHECK_MODULES([PMIX], [pmix])
AC_DEFINE([HAVE_LIBPMIX], [1], [Enable PMIx bootstrap])
])
])
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ AS_IF([test "x$enable_content_s3" = "xyes"], [

AM_CONDITIONAL([ENABLE_CONTENT_S3], [test "x$enable_content_s3" = "xyes"])

X_AC_PMIX

##
# Check for systemd
##
Expand Down
7 changes: 5 additions & 2 deletions src/broker/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/src/include \
-I$(top_builddir)/src/common/libflux \
$(PMIX_CFLAGS) \
$(ZMQ_CFLAGS) \
$(LIBUUID_CFLAGS) \
$(VALGRIND_CFLAGS)
Expand Down Expand Up @@ -64,7 +65,8 @@ flux_broker_LDADD = \
$(builddir)/libbroker.la \
$(top_builddir)/src/common/libflux-core.la \
$(top_builddir)/src/common/libpmi/libpmi_client.la \
$(top_builddir)/src/common/libflux-internal.la
$(top_builddir)/src/common/libflux-internal.la \
$(PMIX_LIBS)

flux_broker_LDFLAGS =

Expand All @@ -82,7 +84,8 @@ test_ldadd = \
$(top_builddir)/src/common/libflux-core.la \
$(top_builddir)/src/common/libpmi/libpmi_client.la \
$(top_builddir)/src/common/libflux-internal.la \
$(top_builddir)/src/common/libtap/libtap.la
$(top_builddir)/src/common/libtap/libtap.la \
$(PMIX_LIBS)

test_ldflags = \
-no-install
Expand Down

0 comments on commit 9a2bc3e

Please sign in to comment.