HOWTO set up the GlueX environment
Getting the scripts
The scripts mentioned in this HOWTO are available from our Subversion repository:
This is a generic script for defining all of the environment variables necessary to run GlueX software. It provides sensible defaults and respects existing definitions of certain key variables.
To invoke the script, you must be running the C shell (or a C-shell-like variant) and either
- define the variable BUILD_SCRIPTS to point to the directory where you checked the scripts out or
- have a structure so that the default definition of BUILD_SCRIPTS (see table above) is the right one.
Then the command is
This will set-up a complete GlueX environment using the defaults listed above. It will also modify the PATH and LD_LIBRARY_PATH variables so that building and running the code will succeed. If any or all of the choices used as default are not what you want, the script will honor any pre-existing values of those environment variables and proceed with the set-up accordingly.
Note that these defaults assume a directory structure where the code is built. For example, JANA_HOME is assumed to be $GLUEX_TOP/jana/prod = /usr/local/gluex/jana/prod. If that is not the version you want to use (or not the directory structure you have), you can override the defaults as follows:
setenv JANA_HOME <path-to-my-preferred-jana-home> source $BUILD_SCRIPTS/gluex_env.csh
Commands like these can be put into a script themselves for convenience.
Another thing to note is that since gluex_env.csh respects pre-existing definitions, you have to be careful about any pre-existing definitions that may pre-exist. Practically, that means you want to use it from a clean environment (at least GlueX-wise).
This is a wrapper around gluex_env.csh that provides defaults specific to the current production versions on the various platforms in common use at JLab. On the JLab CUE, the directory structure of the GlueX-specific code is nothing like the default structure mentioned above. Some variables are still left override-able by the user, others are hard-wired. The override-able ones are:
Of course, defaults are still provided. Sourcing gluex_env_jlab.csh with give a complete production level environment on the CUE. Adding pre-existing definitions will allow you to customize the environment from there.