fixed excessive line length

This commit is contained in:
Philip Eisenlohr 2016-07-29 20:40:40 -04:00
parent af83864d2b
commit 1503cc19fd
2 changed files with 20 additions and 4 deletions

View File

@ -71,11 +71,19 @@ if [ ! -z "$PS1" ]; then
echo -n "heap size "
[[ "$(ulimit -d)" == "unlimited" ]] \
&& echo "unlimited" \
|| 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])")
|| 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])")
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])")
|| 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])")
fi
export DAMASK_NUM_THREADS

View File

@ -59,11 +59,19 @@ if [ ! -z "$PS1" ]; then
echo -n "heap size "
[[ "$(ulimit -d)" == "unlimited" ]] \
&& echo "unlimited" \
|| 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])")
|| 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])")
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])")
|| 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])")
fi
export DAMASK_NUM_THREADS