2013-12-19 04:08:44 +05:30
|
|
|
# sets up an environment for DAMASK on bash
|
2013-12-20 18:00:17 +05:30
|
|
|
# usage: source DAMASK_env.sh
|
2014-01-12 00:43:02 +05:30
|
|
|
|
2014-01-29 22:40:19 +05:30
|
|
|
if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == 'linux' ]; then
|
|
|
|
DAMASK_ROOT=$(readlink -f "`dirname $BASH_SOURCE`")
|
2014-01-11 18:16:30 +05:30
|
|
|
else
|
|
|
|
STAT=$(stat "`dirname $BASH_SOURCE`")
|
2014-01-24 18:00:27 +05:30
|
|
|
DAMASK_ROOT=${STAT##* }
|
2014-01-27 15:42:29 +05:30
|
|
|
unset STAT
|
2014-01-11 18:16:30 +05:30
|
|
|
fi
|
2014-01-24 18:00:27 +05:30
|
|
|
|
2014-01-29 22:40:19 +05:30
|
|
|
[[ -f $HOME/.damask/damask.conf ]] && source $HOME/.damask/damask.conf || source /etc/damask.conf
|
|
|
|
|
2014-01-24 18:47:54 +05:30
|
|
|
|
2013-12-21 17:27:02 +05:30
|
|
|
# disable output in case of scp
|
|
|
|
if [ ! -z "$PS1" ]; then
|
|
|
|
echo
|
|
|
|
echo Düsseldorf Advanced Materials Simulation Kit - DAMASK
|
|
|
|
echo Max-Planck-Institut für Eisenforschung, Düsseldorf
|
|
|
|
echo http://damask.mpie.de
|
|
|
|
echo
|
2014-01-27 15:42:29 +05:30
|
|
|
echo Using environment with ...
|
2014-01-29 22:40:19 +05:30
|
|
|
echo "DAMASK $DAMASK_ROOT"
|
|
|
|
echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
|
|
|
|
echo "Compiler F90=$F90"
|
|
|
|
([[ "x$IMKL_ROOT" != "x" ]] && echo "IMKL $IMKL_ROOT") || \
|
|
|
|
([[ "x$ACML_ROOT" != "x" ]] && echo "ACML $ACML_ROOT") || \
|
|
|
|
([[ "x$LAPACK_ROOT" != "x" ]] && echo "LAPACK $LAPACK_ROOT")
|
|
|
|
echo "MSC.Marc/Mentat $MSC_ROOT"
|
|
|
|
echo "FFTW $FFTW_ROOT"
|
|
|
|
echo "HDF5 $HDF5_ROOT (for future use)"
|
|
|
|
echo
|
2013-12-21 17:27:02 +05:30
|
|
|
fi
|
2014-01-29 22:40:19 +05:30
|
|
|
|
2014-02-15 01:38:23 +05:30
|
|
|
# http://superuser.com/questions/220059/what-parameters-has-ulimit
|
|
|
|
ulimit -s unlimited 2>/dev/null # maximum stack size (kB)
|
|
|
|
ulimit -h unlimited 2>/dev/null # maximum heap size (kB)
|
|
|
|
ulimit -c 0 2>/dev/null # core file size (512-byte blocks)
|
|
|
|
ulimit -v unlimited 2>/dev/null # maximum virtual memory size
|
|
|
|
ulimit -m unlimited 2>/dev/null # maximum physical memory size
|
2014-01-29 22:40:19 +05:30
|
|
|
|
2014-02-03 15:34:45 +05:30
|
|
|
export DAMASK_NUM_THREADS
|
2014-01-29 20:55:27 +05:30
|
|
|
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
|
2014-01-27 19:40:49 +05:30
|
|
|
|
2014-01-29 22:40:19 +05:30
|
|
|
for var in DAMASK IMKL ACML LAPACK MSC FFTW HDF5; do
|
|
|
|
unset "${var}_ROOT"
|
|
|
|
done
|
2014-01-27 15:42:29 +05:30
|
|
|
|