USC Center for High Performance Computing and Communications

:: Systems & Resources
 > Linux Computing Resource
 > HPCC Policies

:: Getting Access
 > Account Applications
 > Account Resource Limits

:: Learning to Use
 > Linux Computing Resource
    - HPCC Linux Queues
    - Standard Environment
    - Setting Up the Compiler
    - Temporary Disk Space
    - USCLinux
    - Portable Batch System
    - MPI Tutorials
    - MPI Compilers
    - MPI Execution
    - Gaussian03
    - Parallel Matlab
    - Useful Commands
    - Compiler Help Pages
    - 64 Bit Nodes
    - Standard Environment
    - Setting Up the Compiler
    - Temporary Disk Space
    - Portable Batch System
    - MPI Tutorials
    - MPI Execution
    - Applications on Almaak(Solaris)

Standard User Environment

Systems & Access :: Learning to Use :: Linux Computing Resource

The master.cshrc and master.login files set up a standard user environment. You should have the following in your .login:

if (-r /usr/lsd/conf/master.login) then
    source /usr/lsd/conf/master.login
else if (-r /usr/local/lib/master.login) then
    source /usr/local/lib/master.login
endif

You should have the following in your .cshrc:

if (-r /usr/lsd/conf/master.cshrc) then
    source /usr/lsd/conf/master.cshrc
else if (-r /usr/local/lib/master.cshrc) then
    source /usr/local/lib/master.cshrc
endif

Note: Users should use the shells available in /bin/ and not the ones available in /usr/usc/bin/

PATH, LD_RUN_PATH and LD_LIBRARY_PATH Environment Variables

Placing directory listings in incorrect order in the environment variables PATH, LD_RUN_PATH and LD_LIBRARY_PATH causes a serious load problem on our NFS servers and degrades the overall performance of almaak and the cluster. This is only an issue for users who have added their own home directories as paths. Users who stick with the system defaults and /usr/usc setup files are fine. Users who wish to manually add to their PATH variable should append the additional directories at the end.

References to the user's own home directory should use the variable $HOME instead of hard-coding the path. References to the current directory should use the variable $PWD rather than the output from the command pwd. References to directories should avoid the /auto paths.

Correct:
   setenv PATH "${PATH}:${HOME}/foo/bin:/usr/usc/something"
   PATH="${PATH}:${HOME}/foo/bin:/usr/usc/something"

Wrong:
   setenv PATH "/auto/rcf-00/username:/auto/usc/something:${PATH}"

Users should add their home library directories to LD_RUN_PATH (again, referencing $HOME, /home, and /usr/usc) before compiling. This will add the correct directories to the run-time path of programs without slowing down system commands.

Users should avoid setting LD_LIBRARY_PATH. The only case where LD_LIBRARY_PATH is necessary is when binary-distributed software that contains library directories is installed in users' home directories. In that case, "/lib:/usr/lib" should be first with 32-bit code, and "/lib64:/usr/lib64" with 64-bit code. If the user needs to run both, then use "/lib64:/usr/lib64:/lib:/usr/lib".

All of the above changes, including sourcing setup files, should be done either in .login or .bash_profile and not in .cshrc or .bashrc.

It does not matter if the manual changes are done before or after the setup files. Users should setup the variables LD_RUN_PATH and LD_LIBRARY_PATH as follows:

set myldpath="$HOME/foo/lib"

if ($?LD_RUN_PATH) then
   setenv LD_RUN_PATH "$myldpath:${LD_RUN_PATH}"
else
   setenv LD_RUN_PATH "$myldpath"
endif

switch (`uname -m`) 
   case i686:  set newldpath="/lib:/usr/lib:${myldpath}"
   case x86_64: set newldpath="/lib64:/usr/lib64:/lib:/usr/lib:${myldpath}"
endsw

if ($?LD_LIBRARY_PATH) then
   setenv LD_LIBRARY_PATH "${newldpath}:${LD_LIBRARY_PATH}"
else
   setenv LD_LIBRARY_PATH "${newldpath}"
endif


  ITS Policies       Contact HPCC