From d12842a4418c1c52c4dfb9f14a384171cb8df618 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 21 Dec 2019 07:13:13 +0100 Subject: [PATCH] only stack size matters Intel compiler requires large stack size, otherwise DAMASK crashes with segmentation fault. Other limits are not important (checked runtime) --- env/DAMASK.csh | 12 ++---------- env/DAMASK.sh | 6 +++--- env/DAMASK.zsh | 7 +++---- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/env/DAMASK.csh b/env/DAMASK.csh index d3b4474b2..b6ccca869 100644 --- a/env/DAMASK.csh +++ b/env/DAMASK.csh @@ -12,7 +12,6 @@ cd $DAMASK_ROOT >/dev/null set BRANCH = `git branch 2>/dev/null| grep -E '^\* ')` cd - >/dev/null -# if DAMASK_BIN is present set path = ($DAMASK_ROOT/bin $path) set SOLVER=`which DAMASK_spectral` @@ -21,19 +20,12 @@ if ( "x$DAMASK_NUM_THREADS" == "x" ) then set DAMASK_NUM_THREADS=1 endif -# currently, there is no information that unlimited causes problems +# currently, there is no information that unlimited stack size causes problems # still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it # more info https://jblevins.org/log/segfault # https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap # http://superuser.com/questions/220059/what-parameters-has-ulimit limit stacksize unlimited # maximum stack size (kB) -endif -if ( `limit | grep memoryuse` != "" ) then - limit memoryuse unlimited # maximum physical memory size -endif -if ( `limit | grep vmemoryuse` != "" ) then - limit vmemoryuse unlimited # maximum virtual memory size -endif # disable output in case of scp if ( $?prompt ) then @@ -44,7 +36,7 @@ if ( $?prompt ) then echo echo Using environment with ... echo "DAMASK $DAMASK_ROOT $BRANCH" - echo "Spectral Solver $SOLVER" + echo "Grid Solver $SOLVER" echo "Post Processing $PROCESSING" if ( $?PETSC_DIR) then echo "PETSc location $PETSC_DIR" diff --git a/env/DAMASK.sh b/env/DAMASK.sh index a6d7b2667..56696a0e8 100644 --- a/env/DAMASK.sh +++ b/env/DAMASK.sh @@ -43,7 +43,7 @@ PROCESSING=$(type -p postResults || true 2>/dev/null) [ "x$DAMASK_NUM_THREADS" == "x" ] && DAMASK_NUM_THREADS=1 -# currently, there is no information that unlimited causes problems +# currently, there is no information that unlimited stack size causes problems # still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it # more info https://jblevins.org/log/segfault # https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap @@ -59,7 +59,7 @@ if [ ! -z "$PS1" ]; then echo echo Using environment with ... echo "DAMASK $DAMASK_ROOT $BRANCH" - echo "Spectral Solver $SOLVER" + echo "Grid Solver $SOLVER" echo "Post Processing $PROCESSING" if [ "x$PETSC_DIR" != "x" ]; then echo -n "PETSc location " @@ -93,7 +93,7 @@ fi export DAMASK_NUM_THREADS export PYTHONPATH=$DAMASK_ROOT/python:$PYTHONPATH -for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN BRANCH; do +for var in BASE STAT SOLVER PROCESSING BRANCH; do unset "${var}" done for var in DAMASK MSC; do diff --git a/env/DAMASK.zsh b/env/DAMASK.zsh index 42021191f..8ac97fe18 100644 --- a/env/DAMASK.zsh +++ b/env/DAMASK.zsh @@ -24,7 +24,6 @@ unset -f set # add BRANCH if DAMASK_ROOT is a git repository cd $DAMASK_ROOT >/dev/null; BRANCH=$(git branch 2>/dev/null| grep -E '^\* '); cd - >/dev/null -# add DAMASK_BIN if present PATH=${DAMASK_ROOT}/bin:$PATH SOLVER=$(which DAMASK_spectral || true 2>/dev/null) @@ -35,7 +34,7 @@ PROCESSING=$(which postResults || true 2>/dev/null) [[ "x$DAMASK_NUM_THREADS" == "x" ]] && DAMASK_NUM_THREADS=1 -# currently, there is no information that unlimited causes problems +# currently, there is no information that unlimited stack size causes problems # still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it # more info https://jblevins.org/log/segfault # https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap @@ -51,7 +50,7 @@ if [ ! -z "$PS1" ]; then echo echo "Using environment with ..." echo "DAMASK $DAMASK_ROOT $BRANCH" - echo "Spectral Solver $SOLVER" + echo "Grid Solver $SOLVER" echo "Post Processing $PROCESSING" if [ "x$PETSC_DIR" != "x" ]; then echo -n "PETSc location " @@ -87,7 +86,7 @@ fi export DAMASK_NUM_THREADS export PYTHONPATH=$DAMASK_ROOT/python:$PYTHONPATH -for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN BRANCH; do +for var in SOLVER PROCESSING BRANCH; do unset "${var}" done for var in DAMASK MSC; do