A properly set-up environment is crucial for working in the Legion system. The start-up process uses certain Legion-specific environment variables, which must be correctly set before starting applications and running command-line utility programs. Users must set these variables each time they enter Legion. Without a properly set environment, programs cannot communicate with other objects in the system, and the program may terminate with an error, never return a value, or fail in a more spectacular fashion. If this occurs, try setting your environment properly and starting over.
To prepare the environment in a newly started or restarted system, set the $LEGION and $LEGION_OPR variables and source the script that is appropriate for your shell.1
export LEGION=<Legion root dir path> export LEGION_OPR=<Legion OPR root dir path>
setenv LEGION <Legion root dir path> setenv LEGION_OPR <Legion OPR root dir path>
The environment must be properly set in each shell in which you plan to run Legion commands. Check to be sure that environment variables are properly set (we suggest $LEGION/../OPR for the OPR root directory path). If necessary, run the following.
. $LEGION/bin/legion_env.sh . $LEGION_OPR/legion_context_env.sh
source $LEGION/bin/legion_env.csh source $LEGION_OPR/legion_context_env.csh
We suggest that Legion system administrators prepare a set-up script for users to source when starting work in Legion. You can run the legion_make_setup_script command to automatically generate a set-up script for your system. The usage is:
legion_make_setup_script [-help]
[-o <script basename>]
[-OPR <OPR dir name>]
[-L <$LEGION dir name>]
This script sets the environment variables for Legion users.
The following options are supported:
1. Bourne Shell is not directly supported by our implementation of Legion, due to the use of alias to implement some Legion commands (notably legion_set_context). Bash, however, is supported. back
