3 # Determine number of cores to compile code
4 NBCORES=$(cat /proc/cpuinfo | grep processor | wc -l)
6 if (($NBCORES > $NB_MAX)); then
11 echo Nb. of cores $NBCORES and nb. of cores used to compilation $NB
16 # Make build directory
17 mkdir -p $MOFEM_BUILD_DIR
20 # Configure mofem core lib
21 /opt/local/bin/cmake \
22 -DCMAKE_BUILD_TYPE=Release \
23 -DCMAKE_CXX_FLAGS="-Wall -Wno-sign-compare" \
24 -DMPI_RUN_FLAGS="--allow-run-as-root" \
25 -DPETSC_DIR=$PETSC_DIR \
26 -DPETSC_ARCH=$PETSC_ARCH \
27 -DMOAB_DIR=$PETSC_DIR/$PETSC_ARCH \
29 -DADOL-C_DIR=$PETSC_DIR/$PETSC_ARCH \
30 -DTETGEN_DIR=/opt/tetgen1.5.0 \
31 -DBUILD_SHARED_LIBS=yes \
32 -DCMAKE_INSTALL_PREFIX=$MOFEM_INSTALL_DIR $MOFEM_SRC_DIR
34 # Install and build core library
36 make -k -j $NB install
38 # Run tests and send results to CDash
39 ctest --output-on-failure -D Experimental
42 #-DCGM_DIR=$PETSC_DIR/$PETSC_ARCH \
43 #-DMESHKIT_DIR=$PETSC_DIR/$PETSC_ARCH \