B.4. Setting Up Your Login Environment

Once the CCA tools (and TAU, if needed) have been built, you will need to setup your login environment so that the appropriate commands are added to your execution path, and libraries are added to your LD_LIBRARY_PATH.

Wherever you installed the tools above, we will use the following notation in this section:

CCA_TOOLS_ROOT

The fully qualified path to where the CCA tools were installed (the --prefix directory, or the default ./local expanded to be complete paths, rather than relative)

TAU_ROOT

The fully qualified path to TAU's install directory (the -prefix directory)

TAU_CMPT_ROOT

The fully qualified path to the TAU performance component (the -ccatk directory).

Then the following commands should work, depending on which shell you use:

csh, tcsh and Related Shells. 

set path=(CCA_TOOLS_ROOT/bin TAU_ROOT \
          TAU_CMPT_ROOT $path) 
setenv LD_LIBRARY_PATH CCA_TOOLS_ROOT/lib:$LD_LIBRARY_PATH

bash, ksh, sh and Related Shells. 

export PATH=CCA_TOOLS_ROOT/bin:TAU_ROOT:TAU_CMPT_ROOT:$PATH
export LD_LIBRARY_PATH=CCA_TOOLS_ROOT/lib:$LD_LIBRARY_PATH

These commands could be added to your own login files ($HOME/.cshrc or $HOME/.profile), put in a file somewhere else and sourced in your login files (this is the approach we use in the organized tutorials), or, if appropriate, added to the system login setup by your system administrator.

[Tip] Tip

If you're a participant in an organized tutorial, we've already prepared a login file with these commands, and others needed for the tutorial, which you simply source in your login file. Specific instructions on how to set this up should have been provided to you along with your tutorial account information.

If you are using Python, you also need to set your PYTHONPATH environment variable to include the locations of Python modules associated with the CCA tools and the tutorial itself.

csh, tcsh and Related Shells. 

setenv PYTHONPATH CCA_TOOLS_ROOT/lib/python2.3/site-packages/:\
$TUTORIAL_SRC/ports/lib/python:\
$TUTORIAL_SRC/components/lib/python

bash, ksh, sh and Related Shells. 

export
PYTHONPATH=CCA_TOOLS_ROOT/lib/python2.3/site-packages/:\
$TUTORIAL_SRC/ports/lib/python:\
$TUTORIAL_SRC/components/lib/python

Unfortunately, because of the way Python works, you will have to modify the PYTHONPATH any time you add new Python components to your application.