diff --git a/DAMASK_prerequisits.sh b/DAMASK_prerequisits.sh new file mode 100755 index 000000000..38c73fe7b --- /dev/null +++ b/DAMASK_prerequisits.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +OUTFILE="system_report.txt" +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^ +exec > $OUTFILE 2>&1 + +# 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 ============================================================================================== +echo DAMASK settings +echo ============================================================================================== +echo DAMASK_ROOT: +echo $DAMASK_ROOT +echo +echo Version: +cat VERSION +echo +echo Settings in CONFIG: +cat CONFIG +echo +echo ============================================================================================== +echo System +echo ============================================================================================== +uname -a +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) + else + echo $executable does not exist + fi +done +echo Location of $DEFAULT_PYTHON: $(ls -la $(which $DEFAULT_PYTHON)) +echo +for module in numpy scipy;do + echo ---------------------------------------------------------------------------------------------- + echo $module + echo ---------------------------------------------------------------------------------------------- + $DEFAULT_PYTHON -c "import $module; \ + print('Version: {}'.format($module.__version__)); \ + print('Location: {}'.format($module.__file__))" +done +echo ---------------------------------------------------------------------------------------------- +echo vtk +echo ---------------------------------------------------------------------------------------------- +$DEFAULT_PYTHON -c "import vtk; \ + print('Version: {}'.format(vtk.vtkVersion.GetVTKVersion())); \ + print('Location: {}'.format(vtk.__file__))" +echo ---------------------------------------------------------------------------------------------- +echo h5py +echo ---------------------------------------------------------------------------------------------- +$DEFAULT_PYTHON -c "import h5py; \ + print('Version: {}'.format(h5py.version.version)); \ + print('Location: {}'.format(h5py.__file__))" +echo +echo ============================================================================================== +echo GCC +echo ============================================================================================== +for executable in gcc g++ gfortran ;do + if [[ "$(which $executable)x" != "x" ]]; then + echo $(which $executable) version: $($executable --version 2>&1) + else + echo $executable does not exist + fi +done +echo +echo ============================================================================================== +echo Intel Compiler Suite +echo ============================================================================================== +for executable in icc icpc ifort ;do + if [[ "$(which $executable)x" != "x" ]]; then + echo $(which $executable) version: $($executable --version 2>&1) + else + echo $executable does not exist + fi +done +echo +echo ============================================================================================== +echo MPI Wrappers +echo ============================================================================================== +for executable in mpicc mpiCC mpicxx mpicxx mpifort mpif90 mpif77; do + if [[ "$(which $executable)x" != "x" ]]; then + echo $(which $executable) version: $($executable --show 2>&1) + else + echo $executable does not exist + fi +done diff --git a/VERSION b/VERSION index 74ae1f2f8..c91d51e5e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.1-810-g68493a0 +v2.0.1-825-g734bc69 diff --git a/env/DAMASK.csh b/env/DAMASK.csh index 819b263ef..d5bfb4437 100644 --- a/env/DAMASK.csh +++ b/env/DAMASK.csh @@ -26,15 +26,11 @@ if ( "x$DAMASK_NUM_THREADS" == "x" ) then set DAMASK_NUM_THREADS=1 endif -# according to http://software.intel.com/en-us/forums/topic/501500 -# this seems to make sense for the stack size -if ( `which free` != "free: Command not found." ) then - set freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'` - set heap=` expr $freeMem / 2` - set stack=`expr $freeMem / $DAMASK_NUM_THREADS / 2` - # http://superuser.com/questions/220059/what-parameters-has-ulimit - limit datasize $heap # maximum heap size (kB) - limit stacksize $stack # maximum stack size (kB) +# currently, there is no information that unlimited causes problems +# still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it +# http://superuser.com/questions/220059/what-parameters-has-ulimit +limit datasize unlimited # maximum heap size (kB) +limit stacksize unlimited # maximum stack size (kB) endif if ( `limit | grep memoryuse` != "" ) then limit memoryuse unlimited # maximum physical memory size diff --git a/env/DAMASK.sh b/env/DAMASK.sh index 9baf2be04..1c5ffcf4b 100644 --- a/env/DAMASK.sh +++ b/env/DAMASK.sh @@ -5,7 +5,6 @@ function canonicalPath { python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $1 } - if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == 'linux' ]; then DAMASK_ROOT=$(dirname $BASH_SOURCE) else @@ -42,19 +41,13 @@ PROCESSING=$(type -p postResults || true 2>/dev/null) [ "x$DAMASK_NUM_THREADS" == "x" ] && DAMASK_NUM_THREADS=1 -# according to http://software.intel.com/en-us/forums/topic/501500 -# this seems to make sense for the stack size -FREE=$(type -p free 2>/dev/null) -if [ "x$FREE" != "x" ]; then - freeMem=$(free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}') - # http://superuser.com/questions/220059/what-parameters-has-ulimit - ulimit -d unlimited 2>/dev/null \ - || ulimit -d $(expr $freeMem / 2) 2>/dev/null # maximum heap size (kB) - ulimit -s unlimited 2>/dev/null \ - || ulimit -s $(expr $freeMem / $DAMASK_NUM_THREADS / 2) 2>/dev/null # maximum stack size (kB) -fi -ulimit -v unlimited 2>/dev/null # maximum virtual memory size -ulimit -m unlimited 2>/dev/null # maximum physical memory size +# currently, there is no information that unlimited causes problems +# still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it +# http://superuser.com/questions/220059/what-parameters-has-ulimit +ulimit -d unlimited 2>/dev/null # maximum heap size (kB) +ulimit -s unlimited 2>/dev/null # maximum stack size (kB) +ulimit -v unlimited 2>/dev/null # maximum virtual memory size +ulimit -m unlimited 2>/dev/null # maximum physical memory size # disable output in case of scp if [ ! -z "$PS1" ]; then diff --git a/env/DAMASK.zsh b/env/DAMASK.zsh index c662e6aee..deea2b072 100644 --- a/env/DAMASK.zsh +++ b/env/DAMASK.zsh @@ -1,6 +1,10 @@ # sets up an environment for DAMASK on zsh # usage: source DAMASK.zsh +function canonicalPath { + python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $1 +} + # transition compatibility (renamed $DAMASK_ROOT/DAMASK_env.zsh to $DAMASK_ROOT/env/DAMASK.zsh) if [ ${0:t:r} = 'DAMASK' ]; then DAMASK_ROOT=${0:a:h}'/..' @@ -21,21 +25,21 @@ unset -f set # add DAMASK_BIN if present [ "x$DAMASK_BIN" != "x" ] && PATH=$DAMASK_BIN:$PATH -SOLVER=`which DAMASK_spectral || True 2>/dev/null` -PROCESSING=`which postResults || True 2>/dev/null` -[ "x$DAMASK_NUM_THREADS" = "x" ] && DAMASK_NUM_THREADS=1 +SOLVER=$(type -p DAMASK_spectral || true 2>/dev/null) +[ "x$SOLVER" == "x" ] && SOLVER='Not found!' -# according to http://software.intel.com/en-us/forums/topic/501500 -# this seems to make sense for the stack size -if [ "`which free 2>/dev/null`" != "free not found" ]; then - freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'` +PROCESSING=$(type -p postResults || true 2>/dev/null) +[ "x$PROCESSING" == "x" ] && PROCESSING='Not found!' - # http://superuser.com/questions/220059/what-parameters-has-ulimit - #ulimit -d `expr $freeMem / 2` 2>/dev/null # maximum heap size (kB) - ulimit -s `expr $freeMem / $DAMASK_NUM_THREADS / 2` 2>/dev/null # maximum stack size (kB) -fi -ulimit -v unlimited 2>/dev/null # maximum virtual memory size -ulimit -m unlimited 2>/dev/null # maximum physical memory size +[ "x$DAMASK_NUM_THREADS" == "x" ] && DAMASK_NUM_THREADS=1 + +# currently, there is no information that unlimited causes problems +# still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it +# http://superuser.com/questions/220059/what-parameters-has-ulimit +ulimit -d unlimited 2>/dev/null # maximum heap size (kB) +ulimit -s unlimited 2>/dev/null # maximum stack size (kB) +ulimit -v unlimited 2>/dev/null # maximum virtual memory size +ulimit -m unlimited 2>/dev/null # maximum physical memory size # disable output in case of scp if [ ! -z "$PS1" ]; then @@ -51,8 +55,8 @@ if [ ! -z "$PS1" ]; then echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS" if [ "x$PETSC_DIR" != "x" ]; then echo "PETSc location $PETSC_DIR" - [[ $(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR") == $PETSC_DIR ]] \ - || echo " ~~> "$(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR") + [[ $(canonicalPath "$PETSC_DIR") == $PETSC_DIR ]] \ + || echo " ~~> "$(canonicalPath "$PETSC_DIR") fi [[ "x$PETSC_ARCH" == "x" ]] \ || echo "PETSc architecture $PETSC_ARCH" @@ -79,7 +83,7 @@ fi export DAMASK_NUM_THREADS export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH -for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN MATCH; do +for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN; do unset "${var}" done for var in DAMASK MSC; do diff --git a/installation/mods_Abaqus/abaqus_v6_windows.env b/installation/mods_Abaqus/abaqus_v6_windows.env deleted file mode 100644 index 3a3445c7b..000000000 --- a/installation/mods_Abaqus/abaqus_v6_windows.env +++ /dev/null @@ -1,177 +0,0 @@ -# -# System-Wide Abaqus Environment File -# ------------------------------------- -standard_parallel = ALL -mp_mode = MPI -mp_file_system = (DETECT,DETECT) -mp_num_parallel_ftps = (4, 4) -mp_environment_export = ('MPI_PROPAGATE_TSTP', - 'ABA_CM_BUFFERING', - 'ABA_CM_BUFFERING_LIMIT', - 'ABA_ITERATIVE_SOLVER_VERBOSE', - 'ABA_DMPSOLVER_BWDPARALLELOFF', - 'ABA_ELP_SURFACE_SPLIT', - 'ABA_ELP_SUSPEND', - 'ABA_HOME', - 'ABA_MEMORY_MODE', - 'ABA_MPI_MESSAGE_TRACKING', - 'ABA_MPI_VERBOSE_LEVEL', - 'ABA_PATH', - 'ABAQUS_CSE_RELTIMETOLERANCE', - 'ABA_RESOURCE_MONITOR', - 'ABA_RESOURCE_USEMALLINFO', - 'ABAQUS_LANG', - 'ABAQUS_CSE_CURRCONFIGMAPPING', - 'ABAQUS_MPF_DIAGNOSTIC_LEVEL', - 'ABAQUSLM_LICENSE_FILE', - 'ABQ_CRTMALLOC', - 'ABQ_DATACHECK', - 'ABQ_RECOVER', - 'ABQ_RESTART', - 'ABQ_SPLITFILE', - 'ABQ_XPL_WINDOWDUMP', - 'ABQ_XPL_PARTITIONSIZE', - 'ABQLMHANGLIMIT', - 'ABQLMQUEUE', - 'ABQLMUSER', - 'CCI_RENDEZVOUS', - 'DOMAIN', - 'DOMAIN_CPUS', - 'DOUBLE_PRECISION', - 'FLEXLM_DIAGNOSTICS', - 'FOR0006', - 'FOR0064', - 'FOR_IGNORE_EXCEPTIONS', - 'FOR_DISABLE_DIAGNOSTIC_DISPLAY', - 'LD_PRELOAD', - 'MP_NUMBER_OF_THREADS', - 'MPC_GANG', - 'MPI_FLAGS', - 'MPI_FLUSH_FCACHE', - 'MPI_RDMA_NENVELOPE', - 'MPI_SOCKBUFSIZE', - 'MPI_USE_MALLOPT_MMAP_MAX', - 'MPI_USE_MALLOPT_MMAP_THRESHOLD', - 'MPI_USE_MALLOPT_SBRK_PROTECTION', - 'MPI_WORKDIR', - 'MPCCI_DEBUG', - 'MPCCI_CODEID', - 'MPCCI_JOBID', - 'MPCCI_NETDEVICE', - 'MPCCI_TINFO', - 'MPCCI_SERVER', - 'ABAQUS_CCI_DEBUG', - 'NCPUS', - 'OMP_DYNAMIC', - 'OMP_NUM_THREADS', - 'OUTDIR', - 'PAIDUP', - 'PARALLEL_METHOD', - 'RAIDEV_NDREG_LAZYMEM', - 'ABA_SYMBOLIC_GENERALCOLLAPSE', - 'ABA_SYMBOLIC_GENERAL_MAXCLIQUERANK', - 'ABA_ADM_MINIMUMINCREASE', - 'ABA_ADM_MINIMUMDECREASE', - 'IPATH_NO_CPUAFFINITY', - 'MALLOC_MMAP_THRESHOLD_', - 'ABA_EXT_SIMOUTPUT', - 'SMA_WS', - 'SMA_PARENT', - 'SMA_PLATFORM', - 'ABA_PRE_DECOMPOSITION', - 'ACML_FAST_MALLOC', - 'ACML_FAST_MALLOC_CHUNK_SIZE', - 'ACML_FAST_MALLOC_MAX_CHUNKS', - 'ACML_FAST_MALLOC_DEBUG') - -import driverUtils, os -#-*- mode: python -*- - -# # -# Compile and Link command settings for the Windows 64 Platform # -# ( AMD Opteron / Intel EM64T ) # -# # - - -compile_fortran=['ifort', - '/c','/DABQ_WIN86_64', '/u', - '/iface:cref', '/recursive', '/Qauto-scalar', - '/QxSSE3', '/QaxAVX', - '/heap-arrays:1', - # '/Od', '/Ob0' # <-- Optimization - # '/Zi', # <-- Debugging - '/include:%I', '/free', '/O1', '/fpp', '/openmp', '/Qmkl'] - -link_sl=['LINK', - '/nologo', '/NOENTRY', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64', - '/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB', - '/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB', '/DEFAULTLIB:LIBIFPORTMD', '/DEFAULTLIB:LIBMMD.LIB', - '/DEFAULTLIB:kernel32.lib', '/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib', - '/FIXED:NO', '/dll', - '/def:%E', '/out:%U', '%F', '%A', '%L', '%B', - 'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib', 'advapi32.lib'] - -link_exe=['LINK', - '/nologo', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64', '/STACK:20000000', - '/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB', '/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB', - '/DEFAULTLIB:LIBIFPORTMD', '/DEFAULTLIB:LIBMMD.LIB', '/DEFAULTLIB:kernel32.lib', - '/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib', - '/FIXED:NO', '/LARGEADDRESSAWARE', - '/out:%J', '%F', '%M', '%L', '%B', '%O', - 'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib', 'advapi32.lib'] - -# Link command to be used for MAKE w/o fortran compiler. -# remove the pound signs in order to remove the comments and have the file take effect. -# -#link_exe=['LINK', '/nologo', 'INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64', '/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB', -# '/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:MSVCRT.LIB', '/DEFAULTLIB:kernel32.lib', 'DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib', -# '/FIXED:NO', '/LARGEADDRESSAWARE', '/DEBUG', '/out:%J', '%F', '%M', '%L', '%B', '%O', 'oldnames.lib', 'user32.lib', 'ws2_32.lib', -# 'netapi32.lib', 'advapi32.lib] - -# MPI Configuration -mp_mode = THREADS - -mp_mpi_implementation = NATIVE -mp_rsh_command = 'dummy %H -l %U -n %C' -mp_mpirun_path = {} -mpirun = '' -progDir = os.environ.get('ProgramFiles','C:\\Program Files') - -for mpiDir in ('Microsoft HPC Pack', 'Microsoft HPC Pack 2008 R2', 'Microsoft HPC Pack 2008', 'Microsoft HPC Pack 2008 SDK'): - mpirun = progDir + os.sep + mpiDir + os.sep + 'bin' + os.sep + 'mpiexec.exe' - if os.path.exists(mpirun): - mp_mpirun_path[NATIVE] = mpirun - mp_mpirun_path[MSSDK] = os.path.join(progDir, mpiDir) - break - -if os.environ.has_key('CCP_HOME'): - from queueCCS import QueueCCS - queues['default'] = QueueCCS(queueName='share') - queues['share'] = QueueCCS(queueName='share') - queues['local'] = QueueCCS(queueName='local') - queues['genxmlshare'] = QueueCCS(queueName='genxmlshare') - queues['genxmllocal'] = QueueCCS(queueName='genxmllocal') - del QueueCCS - mpirun = os.path.join(os.environ['CCP_HOME'], 'bin', 'mpiexec.exe') - if os.path.exists(mpirun): - mp_mpirun_path[NATIVE] = mpirun - run_mode=BATCH - -if mp_mpirun_path: - mp_mode=MPI - -del progDir, mpiDir, mpirun - -graphicsEnv = driverUtils.locateFile(os.environ['ABA_PATH'],'site','graphicsConfig','env') -if graphicsEnv: - execfile(graphicsEnv) -else: - raise 'Cannot find the graphics configuration environment file (graphicsConfig.env)' - -del driverUtils, os, graphicsEnv -license_server_type=FLEXNET - -abaquslm_license_file="" -doc_root=" -doc_root_type="html" -academic=RESEARCH diff --git a/lib/damask/asciitable.py b/lib/damask/asciitable.py index 446770313..fe53ecafd 100644 --- a/lib/damask/asciitable.py +++ b/lib/damask/asciitable.py @@ -14,12 +14,6 @@ except(NameError): class ASCIItable(): """Read and write to ASCII tables""" - __slots__ = ['__IO__', - 'info', - 'labeled', - 'data', - ] - tmpext = '_tmp' # filename extension for in-place access # ------------------------------------------------------------------ diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py index d59aaa6a9..a56c5d976 100644 --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -101,8 +101,6 @@ class Texture(Section): class Material(): """Reads, manipulates and writes material.config files""" - __slots__ = ['data'] - def __init__(self,verbose=True): """Generates ordered list of parts""" self.parts = [ diff --git a/processing/post/vtk_pointcloud.py b/processing/post/vtk_pointcloud.py index 5779b7540..54f02d300 100755 --- a/processing/post/vtk_pointcloud.py +++ b/processing/post/vtk_pointcloud.py @@ -61,7 +61,6 @@ for name in filenames: # ------------------------------------------ process data --------------------------------------- table.data_readArray(options.pos) - if len(table.data.shape) < 2: table.data.shape += (1,) # expand to 2D shape if table.data.shape[1] < 3: table.data = np.hstack((table.data, np.zeros((table.data.shape[0], diff --git a/processing/post/vtk_rectilinearGrid.py b/processing/post/vtk_rectilinearGrid.py index cc6c01711..326f26046 100755 --- a/processing/post/vtk_rectilinearGrid.py +++ b/processing/post/vtk_rectilinearGrid.py @@ -70,7 +70,6 @@ for name in filenames: # --------------- figure out size and grid --------------------------------------------------------- table.data_readArray(options.pos) - if len(table.data.shape) < 2: table.data.shape += (1,) # expand to 2D shape if table.data.shape[1] < 3: table.data = np.hstack((table.data, np.zeros((table.data.shape[0],