From 785d7e54d36a8cee2cbcbe9ba1d86e31f29477b3 Mon Sep 17 00:00:00 2001 From: Chen Qin Date: Fri, 15 Mar 2019 07:58:47 -0700 Subject: [PATCH] [mpi] add engine_mpi travis build (#83) --- .travis.yml | 6 ++++++ scripts/travis_script.sh | 5 +++++ test/Makefile | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 85bf8f090..933513718 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: - TASK=lint LINT_LANG=python - TASK=doc - TASK=build + - TASK=mpi-build - TASK=test # dependent apt packages @@ -24,6 +25,11 @@ addons: - python-numpy - gcc-4.8 - g++-4.8 + - openmpi-bin + - openmpi-common + - openssh-client + - openssh-server + - libopenmpi-dev before_install: - git clone https://github.com/dmlc/dmlc-core diff --git a/scripts/travis_script.sh b/scripts/travis_script.sh index 664582906..1321b19f1 100755 --- a/scripts/travis_script.sh +++ b/scripts/travis_script.sh @@ -14,6 +14,11 @@ if [ ${TASK} == "build" ]; then make all || exit -1 fi +if [ ${TASK} == "mpi-build" ]; then + cd test + make mpi && make speed_test.mpi || exit -1 +fi + if [ ${TASK} == "test" ]; then cd test make all || exit -1 diff --git a/test/Makefile b/test/Makefile index 4386c2e5e..28cf29bdf 100644 --- a/test/Makefile +++ b/test/Makefile @@ -52,7 +52,7 @@ $(OBJ) : $(CXX) -c $(CFLAGS) -o $@ $(firstword $(filter %.cpp %.c %.cc, $^) ) $(MPIBIN) : - $(MPICXX) $(CFLAGS) -o $@ $(filter %.cpp %.o %.c %.cc, $^) $(LDFLAGS) -lrabit_mpi + $(MPICXX) $(CFLAGS) -o $@ $(filter %.cpp %.o %.c %.cc, $^) ../lib/librabit_mpi.so $(LDFLAGS) clean: $(RM) $(OBJ) $(BIN) $(MPIBIN) $(MPIOBJ) *~ ../src/*~