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