2016-02-26 01:00:12 +05:30
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cat README
|
2016-02-26 21:38:25 +05:30
|
|
|
echo
|
2016-02-26 01:00:12 +05:30
|
|
|
echo "Building spectral solver with ${FC}"
|
2016-02-26 21:38:25 +05:30
|
|
|
DAMASKVERSION=$(cat VERSION)
|
2016-02-26 01:00:12 +05:30
|
|
|
|
|
|
|
# prepare building directory
|
2016-02-26 21:38:25 +05:30
|
|
|
# structure:
|
|
|
|
# BUILD_DIR
|
|
|
|
# |-BUILD_SPECTRAL
|
|
|
|
# |-BUILD_FEM
|
|
|
|
# |-BUILD_MARC
|
|
|
|
if [ ! -d build ]; then
|
|
|
|
mkdir build
|
|
|
|
fi
|
|
|
|
cd build
|
2016-02-26 02:10:10 +05:30
|
|
|
if [ -d build_spectral ] ; then
|
|
|
|
rm -rf build_spectral
|
2016-02-26 01:00:12 +05:30
|
|
|
fi
|
2016-02-26 02:10:10 +05:30
|
|
|
mkdir build_spectral
|
2016-02-26 01:00:12 +05:30
|
|
|
cd build_spectral
|
|
|
|
|
2016-02-26 02:10:10 +05:30
|
|
|
##
|
|
|
|
# CMake call
|
|
|
|
# PETSC_DIR | PETSC directory
|
|
|
|
# HDF5_DIR | HDF5 library (same compiler for DAMASK)
|
|
|
|
# DAMASK_V | DAMASK current revision
|
|
|
|
# CMAKE_BUILD_TYPE | Default set to release (no debugging output)
|
2016-02-26 21:38:25 +05:30
|
|
|
# OPENMP | [ON/OFF]
|
2016-02-26 02:10:10 +05:30
|
|
|
# OPTIMIZATION | [OFF,DEFENSIVE,AGGRESSIVE,ULTRA]
|
2016-02-26 21:38:25 +05:30
|
|
|
# DAMASK_DRIVER | [SPECTRAL, FEM, MARC]
|
2016-02-26 02:10:10 +05:30
|
|
|
cmake -D PETSC_DIR=${PETSC_DIR} \
|
|
|
|
-D HDF5_DIR=${HDF5_DIR} \
|
|
|
|
-D DAMASK_V=${DAMASKVERSION} \
|
|
|
|
-D CMAKE_BUILD_TYPE=RELEASE \
|
|
|
|
-D OPENMP=ON \
|
|
|
|
-D OPTIMIZATION=DEFENSIVE \
|
2016-02-26 21:38:25 +05:30
|
|
|
-D DAMASK_DRIVER=SPECTRAL \
|
|
|
|
../..
|
2016-02-26 01:00:12 +05:30
|
|
|
|
|
|
|
# instruction for compiling
|
2016-02-26 21:38:25 +05:30
|
|
|
echo "Please go into the directory above and use make to build DAMASK_spectal.exe"
|