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-13 21:34:38 +05:30
|
|
|
if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == 'linux' ]
|
2014-01-11 18:16:30 +05:30
|
|
|
then LOCATION=$(readlink -f "`dirname $BASH_SOURCE`")
|
|
|
|
else
|
|
|
|
STAT=$(stat "`dirname $BASH_SOURCE`")
|
|
|
|
LOCATION=${STAT##* }
|
|
|
|
fi
|
2013-12-21 17:27:02 +05:30
|
|
|
export DAMASK_ROOT=${LOCATION}
|
2014-01-12 00:43:02 +05:30
|
|
|
source $DAMASK_ROOT/installation/options
|
2014-01-13 16:26:54 +05:30
|
|
|
if [ "x$DAMASK_NUM_THREADS" != "x" ]
|
|
|
|
then export DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS
|
|
|
|
fi
|
2014-01-15 00:33:41 +05:30
|
|
|
export FFTW_ROOT=$FFTW_ROOT
|
|
|
|
LD_NEW=$FFTW_ROOT/lib
|
|
|
|
if [ "x$LAPACK_ROOT" != "x" ]
|
|
|
|
then LD_NEW=$LD_NEW:$LAPACK_ROOT/lib:$LAPACK_ROOT/lib64
|
2014-01-11 18:16:30 +05:30
|
|
|
fi
|
2014-01-15 00:33:41 +05:30
|
|
|
if [ "x$ACML_ROOT" != "x" ]
|
|
|
|
then LD_NEW=$LD_NEW:$ACML_ROOT/ifort64_mp/lib:$ACML_ROOT/ifort64/lib:$ACML_ROOT/gfortran64_mp/lib:$ACML_ROOT/gfortran64/lib
|
2014-01-11 18:16:30 +05:30
|
|
|
fi
|
2014-01-15 00:33:41 +05:30
|
|
|
if [ "x$IMKL_ROOT" != "x" ]
|
|
|
|
then LD_NEW=$LD_NEW:$IMKL_ROOT/lib/intel64
|
2014-01-11 18:16:30 +05:30
|
|
|
fi
|
|
|
|
|
2014-01-12 00:43:02 +05:30
|
|
|
if [ "x$F90" != "x" ]
|
|
|
|
then export F90=$F90
|
2014-01-11 19:58:07 +05:30
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
echo Preparing environment ...
|
|
|
|
echo "DAMASK_ROOT=$DAMASK_ROOT"
|
|
|
|
echo "DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
|
2014-01-11 19:58:07 +05:30
|
|
|
echo "F90=$F90"
|
2014-01-11 18:16:30 +05:30
|
|
|
echo "prepending to LD_LIBRARY_PATH: $LD_NEW"
|
2013-12-21 17:27:02 +05:30
|
|
|
fi
|
2013-12-19 04:08:44 +05:30
|
|
|
ulimit -s unlimited
|
|
|
|
ulimit -c 0
|
|
|
|
ulimit -v unlimited
|
|
|
|
ulimit -m unlimited
|
2014-01-11 18:16:30 +05:30
|
|
|
export DAMASK_BIN=$DAMASK_ROOT/bin
|
|
|
|
export PATH=$PATH:$DAMASK_BIN
|
|
|
|
export PYTHONPATH=$PYTHONPATH:$DAMASK_ROOT/lib
|
|
|
|
export LD_LIBRARY_PATH=$LD_NEW:$LD_LIBRARY_PATH
|