Useful shell environment settings

From Metograds Wiki
Jump to: navigation, search


Below are some useful shell environment settings in our department computing platform.

In BASH, edit .bashrc file in your home directory and add the following lines:

#PGI compiler 12.9
export PGI=/usr/local/pgi-12.9
export PGI_SUBDIR=12.9
export LM_LICENSE_FILE=${PGI}/license.dat
export PATH=${PGI}/linux86-64/${PGI_SUBDIR}/bin:$PATH
export MANPATH=${PGI}/linux86-64/${PGI_SUBDIR}/man:$MANPATH
export LD_LIBRARY_PATH=${PGI}/linux86-64/${PGI_SUBDIR}/lib:${PGI}/linux86-64/${PGI_SUBDIR}/libso:${LD_LIBRARY_PATH}

#MPICH for PGI compiler 12.9
export PATH=/usr/local/mpich-3.0.4-pgi-12.9/bin:$PATH
export MANPATH=/usr/local/mpich-3.0.4-pgi-12.9/man:$MANPATH

#INTEL compiler 13.1
export PATH=/usr/local/intel13.1/bin:$PATH
export MANPATH=/usr/local/intel13.1/man:$MANPATH
export LD_LIBRARY_PATH=/usr/local/intel13.1/lib/intel64:/usr/local/intel13.1/mkl/lib/intel64:${LD_LIBRARY_PATH}

#MPICH for INTEL compiler 13.1 (not well tested yet)
#export PATH=/usr/local/mpich-3.0.4-intel-13.1/bin:$PATH
#export MANPATH=/usr/local/mpich-3.0.4-intel-13.1/man:$MANPATH

#NCL
export NCARG_ROOT=/usr/local/ncl_6.0.0
export NCARG_LIB=$NCARG_ROOT/lib
export PATH=$NCARG_ROOT/bin:$PATH

#Increase the stack size (needed to run some large programs)
ulimit -s unlimited

In CSH, edit .cshrc file in your home directory and add the following lines:

#PGI compiler 12.9
setenv PGI /usr/local/pgi-12.9
setenv PGI_SUBDIR 12.9
setenv LM_LICENSE_FILE ${PGI}/license.dat
setenv PATH ${PGI}/linux86-64/${PGI_SUBDIR}/bin:$PATH
setenv MANPATH ${PGI}/linux86-64/${PGI_SUBDIR}/man:$MANPATH
setenv LD_LIBRARY_PATH ${PGI}/linux86-64/${PGI_SUBDIR}/lib:${PGI}/linux86-64/${PGI_SUBDIR}/libso:${LD_LIBRARY_PATH}

#MPICH for PGI compiler 12.9
setenv PATH /usr/local/mpich-3.0.4-pgi-12.9/bin:$PATH
setenv MANPATH /usr/local/mpich-3.0.4-pgi-12.9/man:$MANPATH

#INTEL compiler 13.1
setenv PATH /usr/local/intel13.1/bin:$PATH
setenv MANPATH /usr/local/intel13.1/man:$MANPATH
setenv LD_LIBRARY_PATH /usr/local/intel13.1/lib/intel64:/usr/local/intel13.1/mkl/lib/intel64:${LD_LIBRARY_PATH}

#MPICH for INTEL compiler 13.1 (not well tested yet)
#setenv PATH /usr/local/mpich-3.0.4-intel-13.1/bin:$PATH
#setenv MANPATH /usr/local/mpich-3.0.4-intel-13.1/man:$MANPATH

#NCL
setenv NCARG_ROOT /usr/local/ncl_6.0.0
setenv NCARG_LIB $NCARG_ROOT/lib
setenv PATH $NCARG_ROOT/bin:$PATH

#Increase the stack size (needed to run some large programs)
limit stacksize unlimited