Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce a bit the amount of cores used during tests, as my laptop is aging and MC...
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 25 Oct 2023 17:55:33 +0000 (19:55 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 25 Oct 2023 17:55:33 +0000 (19:55 +0200)
BuildSimGrid.sh

index 66b309e..410d1dd 100755 (executable)
@@ -17,6 +17,7 @@ fi
 
 target=examples
 ncores=$(grep -c processor /proc/cpuinfo)
+halfcores=$(expr $ncores / 2 + 1)
 
 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
@@ -32,7 +33,8 @@ fi
 (
   echo "install_path: ${install_path}"
   echo "Target: ${target}"
-  echo "Cores: ${ncores}"
-  (nice ${builder} -j${ncores} ${target} tests || make ${target} tests) && nice ctest -j${ncores} --output-on-failure ; date
+  echo "Cores to build: ${ncores}"
+  echo "Cores to test: ${halfcores}"
+  (nice ${builder} -j${ncores} ${target} tests || ${builder} ${target} tests) && nice ctest -j${halfcores} --output-on-failure ; date
 ) 2>&1 | tee BuildSimGrid.sh.log