DAMASK_EICMD/DAMASK_env.sh

50 lines
1.4 KiB
Bash
Raw Normal View History

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
if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == 'linux' ]
2014-01-24 18:00:27 +05:30
then DAMASK_ROOT=$(readlink -f "`dirname $BASH_SOURCE`")
else
STAT=$(stat "`dirname $BASH_SOURCE`")
2014-01-24 18:00:27 +05:30
DAMASK_ROOT=${STAT##* }
unset STAT
fi
2014-01-24 18:00:27 +05:30
2014-01-24 18:47:54 +05:30
if [ -f $HOME/.damask/damask.conf ]; then
source $HOME/.damask/damask.conf
else
source /etc/damask.conf
fi
# 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 Using environment with ...
2014-01-24 18:00:27 +05:30
echo "DAMASK installation in $DAMASK_ROOT"
echo "DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
echo "Compiler: F90=$F90"
if [ "x$LAPACK_ROOT" != "x" ]; then
echo "LAPACK libaries located in $LAPACK_ROOT"
fi
if [ "x$ACML_ROOT" != "x" ]; then
echo "ACML libaries located in $ACML_ROOT"
fi
if [ "x$IMKL_ROOT" != "x" ]; then
echo "IMKL libaries located in $IMKL_ROOT"
fi
echo "MSC.Marc root $MARC_ROOT"
echo "FFTW libaries located in $FFTW_ROOT"
echo "HDF5 libaries located in $HDF5_ROOT (future use)"
fi
2013-12-19 04:08:44 +05:30
ulimit -s unlimited
ulimit -c 0
ulimit -v unlimited
ulimit -m unlimited
export PYTHONPATH=$PYTHONPATH:$DAMASK_ROOT/lib
unset DAMASK_ROOT LAPACK_ROOT ACML_ROOT IMKL_ROOT MARC_ROOT FFTW_ROOT HDF5_ROOT