# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). # Add /usr/bin, the avx2/avx512 bin paths and 3rd-party bin path to PATH as needed # Then cleanup symlink paths case ":${PATH:-}:" in *:/usr/bin:*) ;; *) PATH="/usr/bin${PATH:+:$PATH}" ;; esac if grep -q "flags.*:.* avx512bw" /proc/cpuinfo; then case ":${PATH:-}:" in *:/usr/bin/haswell/avx512_1:*) ;; *) PATH="/usr/bin/haswell/avx512_1:/usr/bin/haswell:$PATH" ;; esac elif grep -q "flags.*:.* fma .* avx2" /proc/cpuinfo; then case ":${PATH:-}:" in *:/usr/bin/haswell:*) ;; *) PATH="/usr/bin/haswell:$PATH" ;; esac fi case ":${PATH:-}:" in *:/usr/local/bin:*) ;; *) PATH="/usr/local/bin:$PATH" ;; esac case ":${PATH:-}:" in *:/opt/3rd-party/bin:*) ;; *) PATH="$PATH:/opt/3rd-party/bin" ;; esac # Remove from beginning/end/middle of PATH PATH="${PATH/#\/bin:}" PATH="${PATH/%:\/bin}" PATH="${PATH/:\/bin:/:}" PATH="${PATH/#\/sbin:}" PATH="${PATH/%:\/sbin}" PATH="${PATH/:\/sbin:/:}" PATH="${PATH/#\/usr\/sbin:}" PATH="${PATH/%:\/usr\/sbin}" PATH="${PATH/:\/usr\/sbin:/:}" if [[ -x "/bin/vi" ]]; then EDITOR="/usr/bin/vi" # needed for packages like cron else EDITOR="/usr/bin/nano" # needed for packages like cron fi test -z "$TERM" && TERM="xterm" # Basic terminal capab. For screen etc. # Ensure the interactive terminal has rows and columns if [ -n "$PS1" ] && tty > /dev/null; then # Only for interactive shells tty_rows=$(stty size | cut -d' ' -f1) tty_columns=$(stty size | cut -d' ' -f2) if [ $((${tty_rows} + 0)) -le 0 -o $((${tty_columns} + 0)) -le 0 ]; then [ -x /usr/bin/setterm ] && setterm --resize # fail safe if size still not set tty_rows=$(stty size | cut -d' ' -f1) tty_columns=$(stty size | cut -d' ' -f2) if [ $((${tty_rows} + 0)) -le 0 -o $((${tty_columns} + 0)) -le 0 ]; then stty rows 24 columns 80 fi fi unset tty_rows tty_columns fi if [ ! -e /etc/localtime ]; then TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html # for an explanation of how to set this to your local timezone. export TZ fi if [ -z "$PS1" ]; then # works for bash and ash (no other shells known to be in use here) PS1='\u@\h:\w\$ ' fi CFLAGS="-g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake " FFLAGS="-g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -malign-data=abi -fno-semantic-interposition -ftree-vectorize -ftree-loop-vectorize -Wl,--enable-new-dtags " FCFLAGS="-g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -malign-data=abi -fno-semantic-interposition -ftree-vectorize -ftree-loop-vectorize -Wl,-sort-common -Wl,--enable-new-dtags " CXXFLAGS="$CFLAGS -fvisibility-inlines-hidden -Wl,--enable-new-dtags " export AR=gcc-ar export RANLIB=gcc-ranlib export NM=gcc-nm export LA_VERSION="OpenBLAS" export LA_LIBS=/usr/lib64/libopenblas.so.0 export LA_INCLUDE=/usr/include export LA_PATH=/usr/lib64/ export MPI_CC=/usr/bin/mpicc export MPI_LIBS=/usr/lib64/libmpi.so export MPI_INCLUDE=/usr/include/ export MPI_PATH=/usr/lib64/ export MPI_VERSION=3.2 export THEANO_FLAGS='floatX=float32,openmp=true,gcc.cxxflags="-ftree-vectorize -mavx"' export CC=gcc export CXX=g++ export PYTHONIOENCODING=utf-8:surrogateescape export MESA_GLSL_CACHE_DISABLE=0 export GTK_IM_MODULE="ibus" if [ -d /usr/share/defaults/etc/profile.d ]; then for i in /usr/share/defaults/etc/profile.d/* ; do . $i done unset i fi if [ -d /etc/profile.d ]; then for i in /etc/profile.d/* ; do . $i done unset i fi if [ -e /etc/profile ]; then . /etc/profile fi for langfile in /usr/share/defaults/etc/locale.conf /etc/locale.conf "$HOME/.i18n" ; do [ -f $langfile ] && . $langfile done export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION XDG_CONFIG_DIRS=/usr/share/xdg:/etc/xdg export PATH PS1 EDITOR TERM CFLAGS CXXFLAGS FCFLAGS FFLAGS XDG_CONFIG_DIRS umask 022