diff --git a/DAMASK_env.sh b/DAMASK_env.sh index ffff7e7d8..19d2c627d 100644 --- a/DAMASK_env.sh +++ b/DAMASK_env.sh @@ -73,16 +73,16 @@ if [ ! -z "$PS1" ]; then || echo $(python -c \ "import math; \ size=$(( 1024*$(ulimit -d) )); \ - print '{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ - ['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0])") + print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ + ['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))") echo -n "stack size " [[ "$(ulimit -s)" == "unlimited" ]] \ && echo "unlimited" \ || echo $(python -c \ "import math; \ size=$(( 1024*$(ulimit -s) )); \ - print '{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ - ['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0])") + print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ + ['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))") fi export DAMASK_NUM_THREADS diff --git a/DAMASK_env.zsh b/DAMASK_env.zsh index d0ac0e8f1..2ce2351cd 100644 --- a/DAMASK_env.zsh +++ b/DAMASK_env.zsh @@ -61,16 +61,16 @@ if [ ! -z "$PS1" ]; then || echo $(python -c \ "import math; \ size=$(( 1024*$(ulimit -d) )); \ - print '{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ - ['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0])") + print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ + ['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))") echo -n "stack size " [[ "$(ulimit -s)" == "unlimited" ]] \ && echo "unlimited" \ || echo $(python -c \ "import math; \ size=$(( 1024*$(ulimit -s) )); \ - print '{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ - ['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0])") + print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ + ['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))") fi export DAMASK_NUM_THREADS