diff --git a/ci-scripts/install-deps.sh b/ci-scripts/install-deps.sh index 6faf97b..e08c42a 100755 --- a/ci-scripts/install-deps.sh +++ b/ci-scripts/install-deps.sh @@ -1,15 +1,16 @@ #!/usr/bin/env bash -if (( $# != 1 )); then - echo "usage: `basename $0` " 1>&2 +if (( $# != 2 )); then + echo "usage: `basename $0` " 1>&2 exit 1 fi PREFIX=$1 +NTASKS=$2 set -ex mkdir -p local/build for d in gsl nlopt minuit hdf5; do if [ ! -e local/.built.${d} ]; then - ./install-${d}.sh ${PREFIX} + ./install-${d}.sh ${PREFIX} ${NTASKS} fi done diff --git a/ci-scripts/install-gsl.sh b/ci-scripts/install-gsl.sh index fe39df2..41ed0c2 100755 --- a/ci-scripts/install-gsl.sh +++ b/ci-scripts/install-gsl.sh @@ -2,11 +2,12 @@ NAME='gsl-2.6' -if (( $# != 1 )); then - echo "usage: `basename $0` " 1>&2 +if (( $# != 2 )); then + echo "usage: `basename $0` " 1>&2 exit 1 fi PREFIX=$1 +NTASKS=$2 set -ex INITDIR=$(pwd -P) @@ -19,7 +20,7 @@ tar -xzvf ${NAME}.tar.gz mkdir -p ${NAME}/build cd ${NAME}/build ../configure --prefix=${PREFIX} -make -j4 +make -j${NTASKS} make install cd ${INITDIR}/local touch .built.gsl diff --git a/ci-scripts/install-hdf5.sh b/ci-scripts/install-hdf5.sh index 1788268..c0617e3 100755 --- a/ci-scripts/install-hdf5.sh +++ b/ci-scripts/install-hdf5.sh @@ -2,11 +2,12 @@ NAME='hdf5-1.10.5' -if (( $# != 1 )); then - echo "usage: `basename $0` " 1>&2 +if (( $# != 2 )); then + echo "usage: `basename $0` " 1>&2 exit 1 fi PREFIX=$1 +NTASKS=$2 set -ex INITDIR=$(pwd -P) @@ -19,7 +20,7 @@ tar -xzvf ${NAME}.tar.gz mkdir ${NAME}/build cd ${NAME}/build ../configure --prefix=${PREFIX} --enable-cxx -make -j4 +make -j${NTASKS} make install cd ${INITDIR}/local touch .built.hdf5 diff --git a/ci-scripts/install-latan.sh b/ci-scripts/install-latan.sh index 797b07f..3e8a377 100755 --- a/ci-scripts/install-latan.sh +++ b/ci-scripts/install-latan.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash -if (( $# != 1 )); then - echo "usage: `basename $0` " 1>&2 +if (( $# != 2 )); then + echo "usage: `basename $0` " 1>&2 exit 1 fi PREFIX=$1 +NTASKS=$2 set -ex INITDIR=$(pwd -P) @@ -12,11 +13,11 @@ mkdir -p ${PREFIX} cd ${PREFIX} PREFIX=$(pwd -P) cd ${INITDIR} -./install-deps.sh ${PREFIX} +./install-deps.sh ${PREFIX} ${NTASKS} cd .. ./bootstrap.sh mkdir -p build cd build -../configure --prefix=${PREFIX} --with-minuit=${PREFIX} --with-nlopt=${PREFIX} --with-hdf5=${PREFIX} --with-gsl=${PREFIX} CXXFLAGS="${CXXFLAGS} -O3 -march=haswell -mtune=haswell" -make -j4 +../configure --prefix=${PREFIX} --with-minuit=${PREFIX} --with-nlopt=${PREFIX} --with-hdf5=${PREFIX} --with-gsl=${PREFIX} CXXFLAGS="${CXXFLAGS} -O3 -march=native -mtune=native" +make -j${NTASKS} make install diff --git a/ci-scripts/install-minuit.sh b/ci-scripts/install-minuit.sh index 0f6c716..02e96bb 100755 --- a/ci-scripts/install-minuit.sh +++ b/ci-scripts/install-minuit.sh @@ -1,11 +1,12 @@ #!/usr/bin/env bash -if (( $# != 1 )); then - echo "usage: `basename $0` " 1>&2 +if (( $# != 2 )); then + echo "usage: `basename $0` " 1>&2 exit 1 fi PREFIX=$1 +NTASKS=$2 set -ex INITDIR=$(pwd -P) @@ -18,7 +19,7 @@ git clone https://github.com/root-project/root.git cd root/math/minuit2/ mkdir build; cd build cmake .. -Dminuit2_standalone=ON -DCMAKE_INSTALL_PREFIX=${PREFIX} -make -j4 +make -j${NTASKS} make install cd ${INITDIR}/local touch .built.minuit diff --git a/ci-scripts/install-nlopt.sh b/ci-scripts/install-nlopt.sh index 3851888..23b1572 100755 --- a/ci-scripts/install-nlopt.sh +++ b/ci-scripts/install-nlopt.sh @@ -2,11 +2,12 @@ NAME='2.6.1' -if (( $# != 1 )); then - echo "usage: `basename $0` " 1>&2 +if (( $# != 2 )); then + echo "usage: `basename $0` " 1>&2 exit 1 fi PREFIX=$1 +NTASKS=$2 set -ex INITDIR=$(pwd -P) @@ -20,7 +21,7 @@ NAME=nlopt-${NAME} mkdir -p ${NAME}/build cd ${NAME}/build cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=TRUE -DCMAKE_INSTALL_NAME_DIR="${PREFIX}/lib" .. -make -j4 +make -j${NTASKS} make install cd ${INITDIR}/local touch .built.nlopt