From b597919acd42cbf6577672ce4bafd5f5922e52eb Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 18 Jun 2017 03:33:30 +0200 Subject: [PATCH 01/11] script to gahter support information --- DAMASK_prerequisits.sh | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 DAMASK_prerequisits.sh diff --git a/DAMASK_prerequisits.sh b/DAMASK_prerequisits.sh new file mode 100755 index 000000000..8ed094cc3 --- /dev/null +++ b/DAMASK_prerequisits.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +OUTFILE="bla.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 +echo DAMASK_ROOT: $DAMASK_ROOT +echo +echo Settings in CONFIG: +cat CONFIG +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 + $DEFAULT_PYTHON -c "import $module; print('Version: {}'.format($module.__version__));print('Location: {}'.format($module.__file__))" +done +echo ---------------------------------------------------------------------------------------------- +echo vtk +$DEFAULT_PYTHON -c "import vtk; print('Location: {}'.format(vtk.__file__))" From 6547ab8c69dc24288ebac1541a9526dfe6c27b39 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 5 Jul 2017 04:43:20 +0200 Subject: [PATCH 02/11] not needed, ASCII table ensures shape (Npoints,Nvalues) --- processing/post/vtk_pointcloud.py | 1 - processing/post/vtk_rectilinearGrid.py | 1 - 2 files changed, 2 deletions(-) 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], From 42a3cbd4a4c36050b2cc3ce6f9b8b9b52a772c11 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 5 Jul 2017 10:24:47 +0200 Subject: [PATCH 03/11] obtaining information on compilers as well --- DAMASK_prerequisits.sh | 52 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/DAMASK_prerequisits.sh b/DAMASK_prerequisits.sh index 8ed094cc3..56a2f7e40 100755 --- a/DAMASK_prerequisits.sh +++ b/DAMASK_prerequisits.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -OUTFILE="bla.txt" +OUTFILE="system_report.txt" echo date +"%m-%d-%y" >OUTFILE # redirect STDOUT and STDERR to logfile @@ -14,7 +14,6 @@ DAMASK_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo ============================================================================================== echo DAMASK settings echo ============================================================================================== -echo echo DAMASK_ROOT: $DAMASK_ROOT echo echo Settings in CONFIG: @@ -37,8 +36,53 @@ echo for module in numpy scipy;do echo ---------------------------------------------------------------------------------------------- echo $module - $DEFAULT_PYTHON -c "import $module; print('Version: {}'.format($module.__version__));print('Location: {}'.format($module.__file__))" + echo ---------------------------------------------------------------------------------------------- + $DEFAULT_PYTHON -c "import $module; \ + print('Version: {}'.format($module.__version__)); \ + print('Location: {}'.format($module.__file__))" done echo ---------------------------------------------------------------------------------------------- echo vtk -$DEFAULT_PYTHON -c "import vtk; print('Location: {}'.format(vtk.__file__))" +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 From bc15313677175fc3fc25efc89e992496ed5f959e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 10 Jul 2017 03:29:05 +0200 Subject: [PATCH 04/11] also reporting DAMASK version and os information --- DAMASK_prerequisits.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/DAMASK_prerequisits.sh b/DAMASK_prerequisits.sh index 56a2f7e40..fccd63ead 100755 --- a/DAMASK_prerequisits.sh +++ b/DAMASK_prerequisits.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash OUTFILE="system_report.txt" -echo date +"%m-%d-%y" >OUTFILE +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^ @@ -14,12 +14,21 @@ DAMASK_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo ============================================================================================== echo DAMASK settings echo ============================================================================================== -echo DAMASK_ROOT: $DAMASK_ROOT +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 ============================================================================================== From da8cadea9a0de8541272606c346cfe350f2dcded Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 12 Jul 2017 12:50:59 +0200 Subject: [PATCH 05/11] limiting stack/heap causes ocansionally problems. apparently, unlimited will not cause any problems. --- env/DAMASK.csh | 14 +++++--------- env/DAMASK.sh | 20 +++++++------------- env/DAMASK.zsh | 21 +++++++++++---------- 3 files changed, 23 insertions(+), 32 deletions(-) diff --git a/env/DAMASK.csh b/env/DAMASK.csh index 819b263ef..bf728c2db 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 3e9889fec..c0dbe64ef 100644 --- a/env/DAMASK.sh +++ b/env/DAMASK.sh @@ -36,19 +36,13 @@ PROCESSING=$(which 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..5f510dabb 100644 --- a/env/DAMASK.zsh +++ b/env/DAMASK.zsh @@ -22,20 +22,21 @@ unset -f set [ "x$DAMASK_BIN" != "x" ] && PATH=$DAMASK_BIN:$PATH SOLVER=`which DAMASK_spectral || True 2>/dev/null` +[ "x$SOLVER" == "x" ] && SOLVER='Not found!' + PROCESSING=`which postResults || True 2>/dev/null` +[ "x$PROCESSING" == "x" ] && PROCESSING='Not found!' + [ "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 -if [ "`which free 2>/dev/null`" != "free not found" ]; then - freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'` - - # 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 +# 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 From 439b3569d3d7a3757fbe53f10ae1baea3cc6a776 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 13 Jul 2017 15:48:54 +0200 Subject: [PATCH 06/11] installation usually does not succeed, instead of wasting time just drop it completely --- .../mods_Abaqus/abaqus_v6_windows.env | 177 ------------------ 1 file changed, 177 deletions(-) delete mode 100644 installation/mods_Abaqus/abaqus_v6_windows.env 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 From 1973cf8d14d1161fad87554c643073cf1a3a409b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 18 Jul 2017 11:17:22 +0200 Subject: [PATCH 07/11] python 3 compatible (waste of memory / increase in runtime should not be a showstoper for typical use cases ) --- lib/damask/config/material.py | 2 -- 1 file changed, 2 deletions(-) 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 = [ From 5d4f272f0398f4dd1d68fd8f8368648991ac6cfd Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 1 Aug 2017 02:43:23 +0200 Subject: [PATCH 08/11] __slots__ cause problems with python3 --- lib/damask/asciitable.py | 6 ------ 1 file changed, 6 deletions(-) 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 # ------------------------------------------------------------------ From deb69e4be8cf2abead98b0e6dcafb4eb64d64ff5 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 1 Aug 2017 02:57:42 +0200 Subject: [PATCH 09/11] adapting philips improvements for zsh --- env/DAMASK.sh | 1 - env/DAMASK.zsh | 17 ++++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/env/DAMASK.sh b/env/DAMASK.sh index 599226033..8a987c4dc 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 diff --git a/env/DAMASK.zsh b/env/DAMASK.zsh index 5f510dabb..e00ea8bdc 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,15 +25,14 @@ unset -f set # add DAMASK_BIN if present [ "x$DAMASK_BIN" != "x" ] && PATH=$DAMASK_BIN:$PATH -SOLVER=`which DAMASK_spectral || True 2>/dev/null` +SOLVER=$(type -p DAMASK_spectral || true 2>/dev/null) [ "x$SOLVER" == "x" ] && SOLVER='Not found!' -PROCESSING=`which postResults || True 2>/dev/null` +PROCESSING=$(type -p postResults || true 2>/dev/null) [ "x$PROCESSING" == "x" ] && PROCESSING='Not found!' -[ "x$DAMASK_NUM_THREADS" = "x" ] && DAMASK_NUM_THREADS=1 +[ "x$DAMASK_NUM_THREADS" == "x" ] && DAMASK_NUM_THREADS=1 -# according to http://software.intel.com/en-us/forums/topic/501500 # 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 @@ -52,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" @@ -80,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 From 734bc69071fb24a5222d37924d8b09e872d15492 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 1 Aug 2017 09:13:25 +0200 Subject: [PATCH 10/11] whitespace at line end not needed --- DAMASK_prerequisits.sh | 2 +- env/DAMASK.csh | 2 +- env/DAMASK.sh | 2 +- env/DAMASK.zsh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DAMASK_prerequisits.sh b/DAMASK_prerequisits.sh index fccd63ead..38c73fe7b 100755 --- a/DAMASK_prerequisits.sh +++ b/DAMASK_prerequisits.sh @@ -14,7 +14,7 @@ DAMASK_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo ============================================================================================== echo DAMASK settings echo ============================================================================================== -echo DAMASK_ROOT: +echo DAMASK_ROOT: echo $DAMASK_ROOT echo echo Version: diff --git a/env/DAMASK.csh b/env/DAMASK.csh index bf728c2db..d5bfb4437 100644 --- a/env/DAMASK.csh +++ b/env/DAMASK.csh @@ -28,7 +28,7 @@ endif # 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 +# http://superuser.com/questions/220059/what-parameters-has-ulimit limit datasize unlimited # maximum heap size (kB) limit stacksize unlimited # maximum stack size (kB) endif diff --git a/env/DAMASK.sh b/env/DAMASK.sh index 8a987c4dc..1c5ffcf4b 100644 --- a/env/DAMASK.sh +++ b/env/DAMASK.sh @@ -43,7 +43,7 @@ PROCESSING=$(type -p postResults || true 2>/dev/null) # 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 +# 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 diff --git a/env/DAMASK.zsh b/env/DAMASK.zsh index e00ea8bdc..deea2b072 100644 --- a/env/DAMASK.zsh +++ b/env/DAMASK.zsh @@ -35,7 +35,7 @@ PROCESSING=$(type -p postResults || true 2>/dev/null) # 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 +# 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 From 347c1e301abddafc3f6d3ede74d45151b35c6cad Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 1 Aug 2017 23:27:47 +0200 Subject: [PATCH 11/11] [skip ci] updated version information after successful test of v2.0.1-825-g734bc69 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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