v0.14.0
docker_build_users_modules_script.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 # Determine number of cores to compile code
4 NBCORES=$(cat /proc/cpuinfo | grep processor | wc -l)
5 NB_MAX=12
6 if (($NBCORES > $NB_MAX)); then
7  NB=$NB_MAX
8 else
9  NB=$NBCORES
10 fi
11 echo Nb. of cores $NBCORES and nb. of cores used to compilation $NB
12 
13 set -e
14 
15 echo "Configure users modules"
16 cd $MOFEM_INSTALL_DIR
17 
18 if [ -e $MOFEM_SRC_DIR/users_modules/*bone_remodelling* ]
19 then
20 /opt/local/bin/cmake \
21 -DCMAKE_BUILD_TYPE=Release \
22 -DBUILD_SHARED_LIBS=yes \
23 -DCMAKE_CXX_FLAGS="-Wall -Wno-sign-compare" \
24 -DMPI_RUN_FLAGS="--allow-run-as-root" \
25 -DWITH_METAIO=1 \
26 users_modules;
27 else
28 /opt/local/bin/cmake \
29 -DCMAKE_BUILD_TYPE=Release \
30 -DBUILD_SHARED_LIBS=yes \
31 -DCMAKE_CXX_FLAGS="-Wall -Wno-sign-compare" \
32 -DMPI_RUN_FLAGS="--allow-run-as-root" \
33 users_modules
34 fi
35 
36 echo "Run basic tests"
37 cd $MOFEM_INSTALL_DIR
38 make -k -j $NB; /bin/true
39 ctest --output-on-failure -D Experimental
40 make clean
41 echo "All done"