2016-03-04 22:09:52 +05:30
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cat README
|
|
|
|
echo
|
|
|
|
echo "Building FEM solver with ${FC}"
|
|
|
|
DAMASKVERSION=$(cat VERSION)
|
|
|
|
|
|
|
|
# prepare building directory
|
|
|
|
# structure:
|
|
|
|
# BUILD_DIR
|
|
|
|
# |-BUILD_SPECTRAL
|
|
|
|
# |-BUILD_FEM
|
|
|
|
# |-BUILD_MARC
|
|
|
|
if [ ! -d build ]; then
|
|
|
|
mkdir build
|
|
|
|
fi
|
|
|
|
cd build
|
2016-03-06 03:01:33 +05:30
|
|
|
if [ -d FEM ] ; then
|
2016-03-06 02:47:59 +05:30
|
|
|
rm -rf FEM
|
2016-03-04 22:09:52 +05:30
|
|
|
fi
|
2016-03-06 02:47:59 +05:30
|
|
|
mkdir FEM
|
|
|
|
cd FEM
|
2016-03-04 22:09:52 +05:30
|
|
|
|
|
|
|
##
|
|
|
|
# CMake call
|
|
|
|
# PETSC_DIR | PETSC directory
|
|
|
|
# DAMASK_V | DAMASK current revision
|
|
|
|
# CMAKE_BUILD_TYPE | Default set to release (no debugging output)
|
|
|
|
# OPENMP | [ON/OFF]
|
|
|
|
# OPTIMIZATION | [OFF,DEFENSIVE,AGGRESSIVE,ULTRA]
|
|
|
|
# DAMASK_DRIVER | [SPECTRAL, FEM]
|
|
|
|
# DAMASK_INSTALL | Directory to install binary output
|
|
|
|
cmake -D PETSC_DIR=${PETSC_DIR} \
|
|
|
|
-D DAMASK_V=${DAMASKVERSION} \
|
|
|
|
-D CMAKE_BUILD_TYPE=RELEASE \
|
|
|
|
-D OPENMP=ON \
|
|
|
|
-D OPTIMIZATION=DEFENSIVE \
|
|
|
|
-D DAMASK_DRIVER=FEM \
|
|
|
|
-D DAMASK_INSTALL=${HOME}/bin \
|
|
|
|
../..
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Please move to the build directory using"
|
2016-03-06 03:01:33 +05:30
|
|
|
echo " cd build/FEM"
|
2016-03-04 22:09:52 +05:30
|
|
|
echo "Using the following command to build DAMASK spectral solver"
|
2016-03-06 02:47:59 +05:30
|
|
|
echo " make clean all install"
|