HPCC

Center for High-Performance Computing and Communications

Standard User Environment

The master .login and master .cshrc files define a standard user environment for your HPCC account.  This page will explain what information should be contained in your .login and .cshrc files and the importance of having the correct directory order for your environment variables.

Setting Up Your .login and .cshrc Files

When you open an HPCC account, you will need to verify that your .login and .cshrc files contain the information below.

.login

Your .login file should contain the following information:

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

.cshrc

Your .cshrc file should contain the following information:

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 only use the shells available in /bin/.

The PATH, LD_RUN_PATH and LD_LIBRARY_PATH Environment Variables

Environment variables control how your jobs will run on HPCC. Incorrect directory order in the environment variables PATH, LD_RUN_PATH and LD_LIBRARY_PATH may cause serious load problems on our NFS servers. This may degrade the overall performance of the computing cluster. Users who have added these environment variables to their own home directories may experience and cause severe performance degradation

Modifying Your PATH Environment Variable

Users wishing to manually add to their PATH environment variable should append the additional directories to the end of the existing variable in their home directory.

References to the user’s own home directory should use the variable $HOME instead of hard-coding the full path. References to the current directory should use the variable $PWD rather than the output from the command pwd. References to directories should always 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}"

Modifying Your LD_RUN_PATH and LD_LIBRARY_PATH_Environment Variables

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. This variable is only necessary when binary-distributed software containing library directories is installed in users’ home directories. In this 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. The environment variable changes listed above, including sourcing setup files, should be done in either the .login or .bash_profile files and not in the .cshrc or .bashrc files. If you need to set your LD_RUN_PATH and/or LD_LIBRARY_PATHenvironment variables, you should add the following code to your .login or .bash_profile files:

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

Getting Help

If you need assistance with this or any HPCC function, please send an email to hpcc@usc.edu.