From: Martin Quinson Date: Thu, 2 Jan 2020 16:16:01 +0000 (+0100) Subject: automatically determine the core amount X-Git-Tag: v3.25~173 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ff3801e182d909d2f6f6a5d5faba0fe341022939 automatically determine the core amount --- diff --git a/BuildSimGrid.sh b/BuildSimGrid.sh index 8198a448bd..1ac4534150 100755 --- a/BuildSimGrid.sh +++ b/BuildSimGrid.sh @@ -16,6 +16,7 @@ if [ ! -e Makefile ] ; then fi target=tests +ncores=$(grep -c processor /proc/cpuinfo) install_path=$(sed -n 's/^CMAKE_INSTALL_PREFIX:PATH=//p' CMakeCache.txt) if [ -e ${install_path} ] && [ -d ${install_path} ] && [ -x ${install_path} ] && [ -w ${install_path} ] ; then @@ -25,6 +26,7 @@ fi ( echo "install_path: ${install_path}" echo "Target: ${target}" - (nice make -j4 ${target} tests || make ${target} tests) && nice ctest -j4 --output-on-failure ; date + echo "Cores: ${ncores}" + (nice make -j${ncores} ${target} tests || make ${target} tests) && nice ctest -j${ncores} --output-on-failure ; date ) 2>&1 | tee BuildSimGrid.sh.log