polished reporting, picking first only of valid BLAS libs, condensed syntax

This commit is contained in:
Philip Eisenlohr 2014-01-29 17:10:19 +00:00
parent f0ee9a56eb
commit f407aff707
1 changed files with 23 additions and 27 deletions

View File

@ -1,19 +1,16 @@
# sets up an environment for DAMASK on bash
# usage: source DAMASK_env.sh
if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == 'linux' ]
then DAMASK_ROOT=$(readlink -f "`dirname $BASH_SOURCE`")
if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == 'linux' ]; then
DAMASK_ROOT=$(readlink -f "`dirname $BASH_SOURCE`")
else
STAT=$(stat "`dirname $BASH_SOURCE`")
DAMASK_ROOT=${STAT##* }
unset STAT
fi
if [ -f $HOME/.damask/damask.conf ]; then
source $HOME/.damask/damask.conf
else
source /etc/damask.conf
fi
[[ -f $HOME/.damask/damask.conf ]] && source $HOME/.damask/damask.conf || source /etc/damask.conf
# disable output in case of scp
if [ ! -z "$PS1" ]; then
@ -23,27 +20,26 @@ if [ ! -z "$PS1" ]; then
echo http://damask.mpie.de
echo
echo Using environment with ...
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/Mentat root $MSC_ROOT"
echo "FFTW libaries located in $FFTW_ROOT"
echo "HDF5 libaries located in $HDF5_ROOT (future use)"
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
fi
ulimit -s unlimited
ulimit -c 0
ulimit -v unlimited
ulimit -m unlimited
ulimit -s unlimited 2>/dev/null
ulimit -c 0 2>/dev/null
ulimit -v unlimited 2>/dev/null
ulimit -m unlimited 2>/dev/null
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
unset DAMASK_ROOT LAPACK_ROOT ACML_ROOT IMKL_ROOT MARC_ROOT FFTW_ROOT HDF5_ROOT
for var in DAMASK IMKL ACML LAPACK MSC FFTW HDF5; do
unset "${var}_ROOT"
done