DAMASK_EICMD/DAMASK_prerequisites.sh

124 lines
3.8 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
2021-07-04 14:00:36 +05:30
firstLevel "DAMASK"
2018-07-12 10:42:10 +05:30
secondLevel "DAMASK_ROOT"
echo $DAMASK_ROOT
echo
2018-07-12 10:42:10 +05:30
secondLevel "Version"
cat VERSION
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
2021-07-04 14:01:19 +05:30
echo
echo $PETSC_DIR/$PETSC_ARCH/lib:
2021-08-19 01:48:08 +05:30
ls $PETSC_DIR/$PETSC_ARCH/lib
2021-07-04 14:01:19 +05:30
echo
echo $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables:
cat $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables
2017-06-18 07:03:30 +05:30
2018-07-12 10:42:10 +05:30
firstLevel "Python"
DEFAULT_PYTHON=python3
2021-07-04 14:03:48 +05:30
for EXECUTABLE in python python3; do
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))
2021-07-04 14:03:48 +05:30
for MODULE in numpy scipy pandas matplotlib yaml h5py;do
2018-07-12 10:42:10 +05:30
thirdLevel $module
2021-07-04 14:03:48 +05:30
$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
firstLevel "GNU Compiler Collection"
2021-07-04 14:03:48 +05:30
for EXECUTABLE in gcc g++ gfortran ;do
getDetails $EXECUTABLE '--version'
done
2018-07-12 10:42:10 +05:30
firstLevel "Intel Compiler Suite"
2021-07-04 14:03:48 +05:30
for EXECUTABLE in icc icpc ifort ;do
getDetails $EXECUTABLE '--version'
done
2018-07-12 10:42:10 +05:30
firstLevel "MPI Wrappers"
2021-07-04 14:03:48 +05:30
for EXECUTABLE in mpicc mpiCC mpiicc mpic++ mpiicpc mpicxx mpifort mpiifort mpif90 mpif77; do
getDetails $EXECUTABLE '-show'
2018-02-01 12:26:55 +05:30
done
2018-07-12 10:42:10 +05:30
firstLevel "MPI Launchers"
2021-07-04 14:03:48 +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