try unlimited heap and stack first
This commit is contained in:
parent
ae3a5187c0
commit
6114541dba
|
@ -39,12 +39,15 @@ fi
|
||||||
|
|
||||||
# according to http://software.intel.com/en-us/forums/topic/501500
|
# according to http://software.intel.com/en-us/forums/topic/501500
|
||||||
# this seems to make sense for the stack size
|
# this seems to make sense for the stack size
|
||||||
FREE=$(which free 2>/dev/null)
|
FREE=$(type -p free 2>/dev/null)
|
||||||
if [ "x$FREE" != "x" ]; then
|
if [ "x$FREE" != "x" ]; then
|
||||||
freeMem=$(free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}')
|
freeMem=$(free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}')
|
||||||
# http://superuser.com/questions/220059/what-parameters-has-ulimit
|
# http://superuser.com/questions/220059/what-parameters-has-ulimit
|
||||||
ulimit -d $(expr $freeMem / 2) 2>/dev/null # maximum heap size (kB)
|
ulimit -d unlimited 2>/dev/null \
|
||||||
ulimit -s $(expr $freeMem / $DAMASK_NUM_THREADS / 2) 2>/dev/null # maximum stack size (kB)
|
|| ulimit -d $(expr $freeMem / 2) 2>/dev/null # maximum heap size (kB)
|
||||||
|
ulimit -s unlimited 2>/dev/null \
|
||||||
|
|| echo "cannot unlimit stack..." \
|
||||||
|
&& ulimit -s $(expr $freeMem / $DAMASK_NUM_THREADS / 2) 2>/dev/null # maximum stack size (kB)
|
||||||
fi
|
fi
|
||||||
ulimit -v unlimited 2>/dev/null # maximum virtual memory size
|
ulimit -v unlimited 2>/dev/null # maximum virtual memory size
|
||||||
ulimit -m unlimited 2>/dev/null # maximum physical memory size
|
ulimit -m unlimited 2>/dev/null # maximum physical memory size
|
||||||
|
|
Loading…
Reference in New Issue