structured

This commit is contained in:
Martin Diehl 2018-07-12 07:12:10 +02:00
parent 5295b49ab3
commit f592881f67
1 changed files with 43 additions and 58 deletions

View File

@ -12,21 +12,38 @@ echo + Send to damask@mpie.de for support
echo + view with \'cat $OUTFILE\' echo + view with \'cat $OUTFILE\'
echo =========================================== echo ===========================================
function firstLevel {
echo -e '\n\n=============================================================================================='
echo $1
echo ==============================================================================================
}
function secondLevel {
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo $1
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}
function thirdLevel {
echo ----------------------------------------------------------------------------------------------
echo $1
echo ----------------------------------------------------------------------------------------------
}
function getDetails { function getDetails {
if which $1 &> /dev/null; then if which $1 &> /dev/null; then
echo ---------------------------------------------------------------------------------------------- secondLevel $1:
echo $1:
echo ----------------------------------------------------------------------------------------------
echo + location: echo + location:
which $1 which $1
echo + $1 $2: echo + $1 $2:
$1 $2 $1 $2
echo -e '\n'
else else
echo $1 not found echo $1 not found
fi fi
echo
} }
# redirect STDOUT and STDERR to logfile # redirect STDOUT and STDERR to logfile
# https://stackoverflow.com/questions/11229385/redirect-all-output-in-a-bash-script-when-using-set-x^ # https://stackoverflow.com/questions/11229385/redirect-all-output-in-a-bash-script-when-using-set-x^
exec > $OUTFILE 2>&1 exec > $OUTFILE 2>&1
@ -38,28 +55,18 @@ DAMASK_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
echo System report for \'$(hostname)\' created on $(date '+%Y-%m-%d %H:%M:%S') by \'$(whoami)\' echo System report for \'$(hostname)\' created on $(date '+%Y-%m-%d %H:%M:%S') by \'$(whoami)\'
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
echo
echo ============================================================================================== firstLevel "DAMASK settings"
echo DAMASK settings secondLevel "DAMASK_ROOT"
echo ==============================================================================================
echo ----------------------------------------------------------------------------------------------
echo DAMASK_ROOT:
echo ----------------------------------------------------------------------------------------------
echo $DAMASK_ROOT echo $DAMASK_ROOT
echo echo
echo ---------------------------------------------------------------------------------------------- secondLevel "Version"
echo Version:
echo ----------------------------------------------------------------------------------------------
cat VERSION cat VERSION
echo echo
echo ---------------------------------------------------------------------------------------------- secondLevel "Settings in CONFIG"
echo Settings in CONFIG:
echo ----------------------------------------------------------------------------------------------
cat CONFIG cat CONFIG
echo
echo ============================================================================================== firstLevel "System"
echo System
echo ==============================================================================================
uname -a uname -a
echo echo
echo PATH: $PATH echo PATH: $PATH
@ -69,74 +76,52 @@ echo SHELL: $SHELL
echo PETSC_ARCH: $PETSC_ARCH echo PETSC_ARCH: $PETSC_ARCH
echo PETSC_DIR: $PETSC_DIR echo PETSC_DIR: $PETSC_DIR
ls $PETSC_DIR/lib ls $PETSC_DIR/lib
echo
echo ==============================================================================================
echo Python
echo ==============================================================================================
firstLevel "Python"
DEFAULT_PYTHON=python2.7 DEFAULT_PYTHON=python2.7
for executable in python python2 python3 python2.7; do for executable in python python2 python3 python2.7; do
getDetails $executable '--version' getDetails $executable '--version'
done done
echo ---------------------------------------------------------------------------------------------- secondLevel "Details on $DEFAULT_PYTHON:"
echo Details on $DEFAULT_PYTHON:
echo ----------------------------------------------------------------------------------------------
echo $(ls -la $(which $DEFAULT_PYTHON)) echo $(ls -la $(which $DEFAULT_PYTHON))
for module in numpy scipy;do for module in numpy scipy;do
echo -e '\n----------------------------------------------------------------------------------------------' thirdLevel $module
echo $module
echo ----------------------------------------------------------------------------------------------
$DEFAULT_PYTHON -c "import $module; \ $DEFAULT_PYTHON -c "import $module; \
print('Version: {}'.format($module.__version__)); \ print('Version: {}'.format($module.__version__)); \
print('Location: {}'.format($module.__file__))" print('Location: {}'.format($module.__file__))"
done done
echo ---------------------------------------------------------------------------------------------- thirdLevel vtk
echo vtk
echo ----------------------------------------------------------------------------------------------
$DEFAULT_PYTHON -c "import vtk; \ $DEFAULT_PYTHON -c "import vtk; \
print('Version: {}'.format(vtk.vtkVersion.GetVTKVersion())); \ print('Version: {}'.format(vtk.vtkVersion.GetVTKVersion())); \
print('Location: {}'.format(vtk.__file__))" print('Location: {}'.format(vtk.__file__))"
echo ---------------------------------------------------------------------------------------------- thirdLevel h5py
echo h5py
echo ----------------------------------------------------------------------------------------------
$DEFAULT_PYTHON -c "import h5py; \ $DEFAULT_PYTHON -c "import h5py; \
print('Version: {}'.format(h5py.version.version)); \ print('Version: {}'.format(h5py.version.version)); \
print('Location: {}'.format(h5py.__file__))" print('Location: {}'.format(h5py.__file__))"
echo
echo ============================================================================================== firstLevel "GNU Compiler Collection"
echo GCC
echo ==============================================================================================
for executable in gcc g++ gfortran ;do for executable in gcc g++ gfortran ;do
getDetails $executable '--version' getDetails $executable '--version'
done done
echo
echo ============================================================================================== firstLevel "Intel Compiler Suite"
echo Intel Compiler Suite
echo ==============================================================================================
for executable in icc icpc ifort ;do for executable in icc icpc ifort ;do
getDetails $executable '--version' getDetails $executable '--version'
done done
echo
echo ============================================================================================== firstLevel "MPI Wrappers"
echo MPI Wrappers
echo ==============================================================================================
for executable in mpicc mpiCC mpic++ mpicpc mpicxx mpifort mpif90 mpif77; do for executable in mpicc mpiCC mpic++ mpicpc mpicxx mpifort mpif90 mpif77; do
getDetails $executable '-show' getDetails $executable '-show'
done done
echo
echo ============================================================================================== firstLevel "MPI Launchers"
echo MPI Launchers
echo ==============================================================================================
for executable in mpirun mpiexec; do for executable in mpirun mpiexec; do
getDetails $executable '--version' getDetails $executable '--version'
done done
echo
echo ============================================================================================== firstLevel "Abaqus"
echo Abaqus
echo ==============================================================================================
cd installation/mods_Abaqus # to have the right environment file cd installation/mods_Abaqus # to have the right environment file
for executable in abaqus abq2016 abq2017; do for executable in abaqus abq2016 abq2017; do
getDetails $executable 'information=all' getDetails $executable 'information=all'
done done
cd ../.. cd ../..