@@ -66,11 +66,13 @@ if [[ $MPI != 'none' ]]; then export CC=${DEPS_DIR}/mvapich2-2.3b/bin/mpicc ;
6666# if [[ $TRAVIS_OS_NAME == 'linux' && $MPI != 'none' ]]; then sudo $apt_get_install libboost-mpi1.55-dev; fi
6767# if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew reinstall boost --c++11; fi # ...what takes too long :(
6868
69- # no MPI get boost from the repository
70- if [[ $TRAVIS_OS_NAME == ' linux' && $MPI == ' none' ]]; then sudo $apt_get_install boost1.61; fi
71-
72- # for MPI we need boost>=1.59 with mpi support, boost installation based on https://github.com/boostorg/compute/blob/master/.travis.yml
73- if [[ $TRAVIS_OS_NAME == ' linux' && $MPI != ' none' ]]; then
69+ # no MPI
70+ if [[ $TRAVIS_OS_NAME == ' linux' && $MPI == ' none' ]]; then
71+ # not UWLCM test - get boost from the repository
72+ if [[ $TEST_SUITE != ' UWLCM_MT' && $TEST_SUITE != ' UWLCM_unit_iles' && $TEST_SUITE != ' UWLCM_unit_smg' ]]; then
73+ sudo $apt_get_install boost1.61
74+ # UWLCM test without MPI - we need boost.python3 >=1.63(?) for libcloud bindings
75+ else
7476 ls -A ${DEPS_DIR} /boost
7577 if [[ -z " $( ls -A ${DEPS_DIR} /boost) " ]]; then
7678 wget http://sourceforge.net/projects/boost/files/boost/1.65.1/boost_1_65_1.tar.gz
@@ -79,15 +81,15 @@ if [[ $TRAVIS_OS_NAME == 'linux' && $MPI == 'none' ]]; then sudo $apt_get_instal
7981 # configure and install
8082 if [[ $COMPILER == ' g++' ]]; then echo " using gcc : 6.2 : g++-6 ;" > $HOME /user-config.jam; fi
8183 if [[ $COMPILER == ' clang++' ]]; then echo " using clang : 5.0 : clang++-5.0 ;" > $HOME /user-config.jam; fi
82- echo " using mpi : $CC ;" >> $HOME /user-config.jam
84+ echo " using python : 3.5 : /opt/pyenv/shims/python3 ;" >> $HOME /user-config.jam
8385 cat $HOME /user-config.jam
8486 if [[ $COMPILER == ' g++' ]]; then
85- ./bootstrap.sh --prefix=${DEPS_DIR} /boost/ --with-libraries=serialization,mpi, thread,date_time,system,iostreams,timer,filesystem
87+ ./bootstrap.sh --prefix=${DEPS_DIR} /boost/ --with-libraries=thread,date_time,system,iostreams,timer,filesystem,program_options,python
8688 ./b2 -d0 install
8789 fi
8890 if [[ $COMPILER == ' clang++' ]]; then
8991 # clang installation taken from https://gist.github.com/jimporter/10442880
90- ./bootstrap.sh --prefix=${DEPS_DIR} /boost/ --with-libraries=serialization,mpi, thread,date_time,system,iostreams,timer,filesystem --with-toolset=clang
92+ ./bootstrap.sh --prefix=${DEPS_DIR} /boost/ --with-libraries=thread,date_time,system,iostreams,timer,filesystem,program_options,python --with-toolset=clang
9193 ./b2 clean
9294 ./b2 toolset=clang cxxflags=" -std=c++14 -stdlib=libc++" linkflags=" -stdlib=libc++" --prefix=${DEPS_DIR} /boost/ -j 4 stage release
9395 ./b2 install toolset=clang cxxflags=" -std=c++14 -stdlib=libc++" linkflags=" -stdlib=libc++" --prefix=${DEPS_DIR} /boost/
@@ -102,6 +104,41 @@ if [[ $TRAVIS_OS_NAME == 'linux' && $MPI == 'none' ]]; then sudo $apt_get_instal
102104 export LIBRARY_PATH=${DEPS_DIR} /boost/lib:${LIBRARY_PATH}
103105 export CPATH=${DEPS_DIR} /boost/include:${CPATH}
104106 fi
107+ fi
108+
109+ # for MPI we need boost>=1.59 with mpi support, boost installation based on https://github.com/boostorg/compute/blob/master/.travis.yml
110+ if [[ $TRAVIS_OS_NAME == ' linux' && $MPI != ' none' ]]; then
111+ ls -A ${DEPS_DIR} /boost
112+ if [[ -z " $( ls -A ${DEPS_DIR} /boost) " ]]; then
113+ wget http://sourceforge.net/projects/boost/files/boost/1.65.1/boost_1_65_1.tar.gz
114+ tar xf boost_1_65_1.tar.gz
115+ cd boost_1_65_1
116+ # configure and install
117+ if [[ $COMPILER == ' g++' ]]; then echo " using gcc : 6.2 : g++-6 ;" > $HOME /user-config.jam; fi
118+ if [[ $COMPILER == ' clang++' ]]; then echo " using clang : 5.0 : clang++-5.0 ;" > $HOME /user-config.jam; fi
119+ echo " using mpi : $CC ;" >> $HOME /user-config.jam
120+ cat $HOME /user-config.jam
121+ if [[ $COMPILER == ' g++' ]]; then
122+ ./bootstrap.sh --prefix=${DEPS_DIR} /boost/ --with-libraries=serialization,mpi,thread,date_time,system,iostreams,timer,filesystem
123+ ./b2 -d0 install
124+ fi
125+ if [[ $COMPILER == ' clang++' ]]; then
126+ # clang installation taken from https://gist.github.com/jimporter/10442880
127+ ./bootstrap.sh --prefix=${DEPS_DIR} /boost/ --with-libraries=serialization,mpi,thread,date_time,system,iostreams,timer,filesystem --with-toolset=clang
128+ ./b2 clean
129+ ./b2 toolset=clang cxxflags=" -std=c++14 -stdlib=libc++" linkflags=" -stdlib=libc++" --prefix=${DEPS_DIR} /boost/ -j 4 stage release
130+ ./b2 install toolset=clang cxxflags=" -std=c++14 -stdlib=libc++" linkflags=" -stdlib=libc++" --prefix=${DEPS_DIR} /boost/
131+ fi
132+ cd ..
133+ else
134+ echo " Using cached boost."
135+ fi
136+ export BOOST_ROOT=${DEPS_DIR} /boost
137+ export LD_LIBRARY_PATH=${DEPS_DIR} /boost/lib:${LD_LIBRARY_PATH}
138+ export LD_RUN_PATH=${DEPS_DIR} /boost/lib:${LD_RUN_PATH}
139+ export LIBRARY_PATH=${DEPS_DIR} /boost/lib:${LIBRARY_PATH}
140+ export CPATH=${DEPS_DIR} /boost/include:${CPATH}
141+ fi
105142
106143# blitz
107144if [[ $TRAVIS_OS_NAME == ' osx' ]]; then brew install blitz; fi
0 commit comments