DAMASK_EICMD/DAMASK_prerequisites.sh

131 lines
4.1 KiB
Bash
Raw Normal View History

2017-06-18 07:03:30 +05:30
#!/usr/bin/env bash
2018-01-23 02:59:15 +05:30
#==================================================================================================
# Execute this script (type './DAMASK_prerequisites.sh')
# and send system_report.txt to damask@mpie.de for support
2018-01-23 02:59:15 +05:30
#==================================================================================================
OUTFILE="system_report.txt"
echo ===========================================
echo + Generating $OUTFILE
echo + Send to damask@mpie.de for support
2018-02-01 12:26:55 +05:30
echo + view with \'cat $OUTFILE\'
echo ===========================================
2018-07-12 10:42:10 +05:30
function firstLevel {
echo -e '\n\n=============================================================================================='
echo $1
echo ==============================================================================================
}
function secondLevel {
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo $1
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}
function thirdLevel {
2018-07-19 03:10:49 +05:30
echo -e '\n----------------------------------------------------------------------------------------------'
2018-07-12 10:42:10 +05:30
echo $1
echo ----------------------------------------------------------------------------------------------
}
2018-02-01 12:26:55 +05:30
function getDetails {
if which $1 &> /dev/null; then
2018-07-12 10:42:10 +05:30
secondLevel $1:
2018-02-01 12:26:55 +05:30
echo + location:
which $1
echo + $1 $2:
$1 $2
else
2018-02-15 15:56:41 +05:30
echo $1 not found
2018-02-01 12:26:55 +05:30
fi
2018-07-12 10:42:10 +05:30
echo
2018-02-01 12:26:55 +05:30
}
2017-06-18 07:03:30 +05:30
2018-07-12 10:42:10 +05:30
2017-06-18 07:03:30 +05:30
# redirect STDOUT and STDERR to logfile
# https://stackoverflow.com/questions/11229385/redirect-all-output-in-a-bash-script-when-using-set-x^
exec > $OUTFILE 2>&1
2018-02-01 12:26:55 +05:30
2017-06-18 07:03:30 +05:30
# directory, file is not a symlink by definition
# 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
2018-07-12 10:42:10 +05:30
firstLevel "DAMASK settings"
secondLevel "DAMASK_ROOT"
echo $DAMASK_ROOT
echo
2018-07-12 10:42:10 +05:30
secondLevel "Version"
cat VERSION
2017-06-18 07:03:30 +05:30
echo
2018-07-12 10:42:10 +05:30
secondLevel "Settings in CONFIG"
2017-06-18 07:03:30 +05:30
cat CONFIG
2018-07-12 10:42:10 +05:30
firstLevel "System"
uname -a
echo
echo PATH: $PATH
echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH
echo PYTHONPATH: $PYTHONPATH
echo SHELL: $SHELL
2018-02-01 12:26:55 +05:30
echo PETSC_ARCH: $PETSC_ARCH
echo PETSC_DIR: $PETSC_DIR
2018-04-24 01:01:57 +05:30
ls $PETSC_DIR/lib
2017-06-18 07:03:30 +05:30
2018-07-12 10:42:10 +05:30
firstLevel "Python"
DEFAULT_PYTHON=python3
2018-12-14 13:53:52 +05:30
for executable in python python3; do
2018-02-01 12:26:55 +05:30
getDetails $executable '--version'
2017-06-18 07:03:30 +05:30
done
2018-07-12 10:42:10 +05:30
secondLevel "Details on $DEFAULT_PYTHON:"
2018-02-01 12:26:55 +05:30
echo $(ls -la $(which $DEFAULT_PYTHON))
2017-06-18 07:03:30 +05:30
for module in numpy scipy;do
2018-07-12 10:42:10 +05:30
thirdLevel $module
$DEFAULT_PYTHON -c "import $module; \
print('Version: {}'.format($module.__version__)); \
print('Location: {}'.format($module.__file__))"
2017-06-18 07:03:30 +05:30
done
2018-07-12 10:42:10 +05:30
thirdLevel vtk
$DEFAULT_PYTHON -c "import vtk; \
print('Version: {}'.format(vtk.vtkVersion.GetVTKVersion())); \
print('Location: {}'.format(vtk.__file__))"
2018-07-12 10:42:10 +05:30
thirdLevel h5py
$DEFAULT_PYTHON -c "import h5py; \
print('Version: {}'.format(h5py.version.version)); \
print('Location: {}'.format(h5py.__file__))"
2018-07-12 10:42:10 +05:30
firstLevel "GNU Compiler Collection"
for executable in gcc g++ gfortran ;do
2018-02-01 12:26:55 +05:30
getDetails $executable '--version'
done
2018-07-12 10:42:10 +05:30
firstLevel "Intel Compiler Suite"
for executable in icc icpc ifort ;do
2018-02-01 12:26:55 +05:30
getDetails $executable '--version'
done
2018-07-12 10:42:10 +05:30
firstLevel "MPI Wrappers"
for executable in mpicc mpiCC mpiicc mpic++ mpicpc mpicxx mpifort mpif90 mpif77; do
2018-02-01 12:26:55 +05:30
getDetails $executable '-show'
done
2018-07-12 10:42:10 +05:30
firstLevel "MPI Launchers"
2018-02-01 12:26:55 +05:30
for executable in mpirun mpiexec; do
getDetails $executable '--version'
done
2018-07-12 10:42:10 +05:30
firstLevel "CMake"
getDetails cmake --version
2018-07-12 10:42:10 +05:30
firstLevel "Abaqus"
2018-02-01 12:26:55 +05:30
cd installation/mods_Abaqus # to have the right environment file
2018-07-19 03:10:49 +05:30
for executable in abaqus abq2017 abq2018; do
2018-02-01 12:26:55 +05:30
getDetails $executable 'information=all'
done
cd ../..