Skip to content

Commit

Permalink
Merge pull request flux-framework#1580 from garlick/pmix_remap
Browse files Browse the repository at this point in the history
libpmi: add ability to bootstrap Flux using pmix
  • Loading branch information
grondo authored Jul 17, 2018
2 parents 711a8e5 + 45c04f7 commit 03a1ac9
Show file tree
Hide file tree
Showing 22 changed files with 1,303 additions and 712 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ compiler:
matrix:
include:
- compiler: gcc
env: COVERAGE=t ARGS="--enable-caliper --enable-pylint"
env: COVERAGE=t ARGS="--with-pmix --enable-caliper --enable-pylint"
- compiler: gcc
env: T_INSTALL=t
- compiler: clang
env: CPPCHECK=t ARGS=--enable-sanitizer CC=clang-3.8 CXX=clang++-3.8
env: CPPCHECK=t ARGS="--with-pmix --enable-sanitizer" CC=clang-3.8 CXX=clang++-3.8
- compiler: gcc
env: CC=gcc-4.9 chain_lint=t
env: CC=gcc-4.9 ARGS="--with-pmix" chain_lint=t
- compiler: clang
env: ARGS=--enable-caliper CC=clang-3.8 CXX=clang++-3.8
env: ARGS="--with-pmix --enable-caliper" CC=clang-3.8 CXX=clang++-3.8

cache:
directories:
Expand Down Expand Up @@ -51,6 +51,7 @@ addons:
- valgrind
- libyaml-cpp-dev
- libboost-dev # for yaml-cpp 0.5.1. >=0.5.2 no longer need boost
- libevent-dev # pmix needs this

coverity_scan:
project:
Expand Down
16 changes: 16 additions & 0 deletions config/x_ac_pmix.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# If configured "--with-pmix" locate libpmix.so.
# It is a hard failure if pmix is requested but cannot be found.
# The default is to build Flux without libpmix support.
#
AC_DEFUN([X_AC_PMIX], [
AC_ARG_WITH([pmix],
AS_HELP_STRING([--with-pmix], [Enable Flux bootstrap with PMIx]))
AS_IF([test "x$with_pmix" = "xyes"], [
X_AC_CHECK_COND_LIB(pmix, PMIx_Init)
AS_VAR_IF([ac_cv_lib_pmix_PMIx_Init],[yes],,[
AC_MSG_ERROR([no suitable PMIX library found])
])
])
AM_CONDITIONAL([HAVE_LIBPMIX], [test "x$with_pmix" = "xyes"])
]
)
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ X_AC_JANSSON
X_AC_YAMLCPP
PKG_CHECK_MODULES([HWLOC], [hwloc >= 1.11.1], [], [])
PKG_CHECK_MODULES([SQLITE], [sqlite3], [], [])
X_AC_PMIX
LX_FIND_MPI
AM_CONDITIONAL([HAVE_MPI], [test "$have_C_mpi" = yes])
AX_VALGRIND_H
Expand Down
4 changes: 3 additions & 1 deletion src/broker/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ flux_broker_SOURCES = \

flux_broker_LDADD = \
$(top_builddir)/src/common/libflux-core.la \
$(top_builddir)/src/common/libflux-internal.la
$(top_builddir)/src/common/libflux-internal.la \
$(top_builddir)/src/common/libpmi/libpmi.la \
$(LIBPMIX)

broker_ldflags =

Expand Down
1 change: 1 addition & 0 deletions src/cmd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ endif

flux_start_LDADD = \
$(fluxcmd_ldadd) \
$(top_builddir)/src/common/libpmi/libpmi.la \
$(LIBUTIL)

#
Expand Down
5 changes: 2 additions & 3 deletions src/common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ libflux_internal_la_LIBADD = \
$(builddir)/libutil/libutil.la \
$(builddir)/libev/libev.la \
$(builddir)/libminilzo/libminilzo.la \
$(builddir)/libpmi/libpmi.la \
$(builddir)/libkz/libkz.la \
$(builddir)/libsubprocess/libsubprocess.la \
$(builddir)/libcompat/libcompat.la \
Expand Down Expand Up @@ -84,7 +83,7 @@ endif
libpmi_la_SOURCES =
libpmi_la_LIBADD = \
$(builddir)/libpmi/libpmi.la \
$(ZMQ_LIBS) $(LIBPTHREAD) $(LIBDL)
$(ZMQ_LIBS) $(LIBPTHREAD) $(LIBDL) $(LIBPMIX)
libpmi_la_LDFLAGS = \
-Wl,--version-script=$(srcdir)/libpmi.map \
-Wl,--defsym=flux_pmi_library=1 \
Expand All @@ -94,7 +93,7 @@ libpmi_la_LDFLAGS = \
libpmi2_la_SOURCES =
libpmi2_la_LIBADD = \
$(builddir)/libpmi/libpmi.la \
$(ZMQ_LIBS) $(LIBPTHREAD) $(LIBDL)
$(ZMQ_LIBS) $(LIBPTHREAD) $(LIBDL) $(LIBPMIX)
libpmi2_la_LDFLAGS = \
-Wl,--version-script=$(srcdir)/libpmi2.map \
-shared -export-dynamic --disable-static \
Expand Down
18 changes: 16 additions & 2 deletions src/common/libpmi/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ libpmi_la_SOURCES = \
dgetline.c \
dgetline.h \
clique.c \
clique.h
clique.h \
pmi_operations.h

if HAVE_LIBPMIX
libpmi_la_SOURCES += \
pmix_client.c \
pmix_client.h
endif

fluxinclude_HEADERS = \
pmi.h \
Expand All @@ -38,6 +45,7 @@ fluxinclude_HEADERS = \
TESTS = test_keyval.t \
test_simple.t \
test_single.t \
test_wrap.t \
test_clique.t

test_ldadd = \
Expand All @@ -47,7 +55,8 @@ test_ldadd = \
$(top_builddir)/src/common/libtap/libtap.la \
$(top_builddir)/src/common/liblsd/liblsd.la \
$(top_builddir)/src/common/libev/libev.la \
$(ZMQ_LIBS) $(JANSSON_LIBS) $(LIBPTHREAD) $(LIBRT) $(LIBDL) $(LIBMUNGE)
$(ZMQ_LIBS) $(JANSSON_LIBS) $(LIBPTHREAD) \
$(LIBRT) $(LIBDL) $(LIBMUNGE) $(LIBPMIX)

test_cppflags = \
-I$(top_srcdir)/src/common/libtap \
Expand All @@ -74,6 +83,11 @@ test_single_t_SOURCES = test/single.c
test_single_t_CPPFLAGS = $(test_cppflags)
test_single_t_LDADD = $(test_ldadd)

test_wrap_t_SOURCES = test/wrap.c
test_wrap_t_CPPFLAGS = $(test_cppflags) \
-DINTREE_PMI_LIBRARY_PATH=\"$(abs_top_builddir)/src/common/.libs/libpmi.so\"
test_wrap_t_LDADD = $(test_ldadd)

test_clique_t_SOURCES = test/clique.c
test_clique_t_CPPFLAGS = $(test_cppflags)
test_clique_t_LDADD = $(test_ldadd)
Expand Down
Loading

0 comments on commit 03a1ac9

Please sign in to comment.