From 136df3618d89e836e14fddd0d47d7078675fcb1a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 22 Jan 2018 22:55:56 +0100 Subject: [PATCH] improving prerequisites report for next release --- .gitignore | 2 +- DAMASK_prerequisites.sh | 35 ++++++++++++++++++++++++----------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 3fe721b7a..22c568409 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.noH5py *.pyc *.mod *.o @@ -8,3 +7,4 @@ bin PRIVATE build +system_report.txt diff --git a/DAMASK_prerequisites.sh b/DAMASK_prerequisites.sh index 82cb759ff..d8f6824b9 100755 --- a/DAMASK_prerequisites.sh +++ b/DAMASK_prerequisites.sh @@ -1,13 +1,17 @@ #!/usr/bin/env bash #================================================================================================== -# Execute this script and send system_report.txt to damask@mpie.de for support +# Execute this script (type './DAMASK_prerequisites.sh') +# and send system_report.txt to damask@mpie.de for support #================================================================================================== OUTFILE="system_report.txt" -echo generating $OUTFILE +echo =========================================== +echo + Generating $OUTFILE +echo + Send to damask@mpie.de for support +echo =========================================== + -echo date +"%m-%d-%y" >$OUTFILE # redirect STDOUT and STDERR to logfile # https://stackoverflow.com/questions/11229385/redirect-all-output-in-a-bash-script-when-using-set-x^ @@ -17,6 +21,10 @@ exec > $OUTFILE 2>&1 # https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within DAMASK_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +echo System report for \'$(hostname)\' created on $(date '+%Y-%m-%d %H:%M:%S') by \'$(whoami)\' +echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +echo echo ============================================================================================== echo DAMASK settings echo ============================================================================================== @@ -34,19 +42,24 @@ echo System echo ============================================================================================== uname -a echo +echo PATH: $PATH +echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH +echo PYTHONPATH: $PYTHONPATH +echo SHELL: $SHELL +echo echo ============================================================================================== echo Python echo ============================================================================================== DEFAULT_PYTHON=python2.7 for executable in python python2 python3 python2.7; do - if [[ "$(which $executable)x" != "x" ]]; then - echo $executable version: $($executable --version 2>&1) + if which $executable &> /dev/null; then + echo $executable version: $($executable --version 2>&1) else - echo $executable does not exist + echo $executable does not exist fi done -echo Location of $DEFAULT_PYTHON: $(ls -la $(which $DEFAULT_PYTHON)) +echo Details on $DEFAULT_PYTHON: $(ls -la $(which $DEFAULT_PYTHON)) echo for module in numpy scipy;do echo ---------------------------------------------------------------------------------------------- @@ -73,7 +86,7 @@ echo =========================================================================== echo GCC echo ============================================================================================== for executable in gcc g++ gfortran ;do - if [[ "$(which $executable)x" != "x" ]]; then + if which $executable &> /dev/null; then echo $(which $executable) version: $($executable --version 2>&1) else echo $executable does not exist @@ -84,10 +97,10 @@ echo =========================================================================== echo Intel Compiler Suite echo ============================================================================================== for executable in icc icpc ifort ;do - if [[ "$(which $executable)x" != "x" ]]; then + if which $executable &> /dev/null; then echo $(which $executable) version: $($executable --version 2>&1) else - echo $executable does not exist + echo $executable does not exist fi done echo @@ -95,7 +108,7 @@ echo =========================================================================== echo MPI Wrappers echo ============================================================================================== for executable in mpicc mpiCC mpicxx mpicxx mpifort mpif90 mpif77; do - if [[ "$(which $executable)x" != "x" ]]; then + if which $executable &> /dev/null; then echo $(which $executable) version: $($executable --show 2>&1) else echo $executable does not exist