Difference between revisions of "GlueX Software Setup"

From GlueXWiki
Jump to: navigation, search
(User-Specific Environment Setup)
(Release-Specific Environment Setup)
Line 66: Line 66:
  
 
if ( ! $?JANA_RESOURCE_DIR ) then
 
if ( ! $?JANA_RESOURCE_DIR ) then
        setenv JANA_RESOURCE_DIR /home/gluex/resources/datachallenge_2/
+
    setenv JANA_RESOURCE_DIR /home/gluex/resources/datachallenge_2/
 
endif
 
endif
  
 
if ( ! $?GLUEX_SCRIPTS ) then
 
if ( ! $?GLUEX_SCRIPTS ) then
        setenv GLUEX_SCRIPTS /home/gluex/scripts/scripts_r14152/
+
    setenv GLUEX_SCRIPTS /home/gluex/scripts/scripts_r14152/
 
endif
 
endif
  
Line 76: Line 76:
 
# Redirect for earlier builds
 
# Redirect for earlier builds
 
if ($BMS_OSNAME == Linux_RHEL5-x86_64-gcc4.1.2) then
 
if ($BMS_OSNAME == Linux_RHEL5-x86_64-gcc4.1.2) then
        setenv BMS_OSNAME Linux_RHEL5-x86_64-gcc4.2.3
+
    setenv BMS_OSNAME Linux_RHEL5-x86_64-gcc4.2.3
 
endif
 
endif
  
 
if ( ! $?CERN ) then
 
if ( ! $?CERN ) then
        setenv CERN /usr/local/cern_64
+
    setenv CERN /usr/local/cern_64
 
endif
 
endif
  
 
if ( ! $?CERN_LEVEL ) then
 
if ( ! $?CERN_LEVEL ) then
        setenv CERN_LEVEL 2005
+
    setenv CERN_LEVEL 2005
 
endif
 
endif
  
 
if ( ! $?XERCESCROOT ) then
 
if ( ! $?XERCESCROOT ) then
        setenv XERCESCROOT /home/gluex/xerces/xerces-c-3.1.1_v2/
+
    setenv XERCESCROOT /home/gluex/xerces/xerces-c-3.1.1_v2/
 
endif
 
endif
  
 
if ( ! $?CLHEP ) then
 
if ( ! $?CLHEP ) then
        setenv CLHEP /home/gluex/clhep/2.1.3.1/
+
    setenv CLHEP /home/gluex/clhep/2.1.3.1/
 
endif
 
endif
  
 
if ( ! $?GSL_HOME ) then
 
if ( ! $?GSL_HOME ) then
        setenv GSL_HOME /home/gluex/gsl/gsl-1.15/
+
    setenv GSL_HOME /home/gluex/gsl/gsl-1.15/
 
endif
 
endif
  
 
if ( ! $?ROOTSYS ) then
 
if ( ! $?ROOTSYS ) then
        setenv ROOTSYS /home/gluex/root/v5-34-14_rhel5/
+
    setenv ROOTSYS /home/gluex/root/v5-34-14_rhel5/
 
endif
 
endif
  
 
if ( ! $?CCDB_HOME ) then
 
if ( ! $?CCDB_HOME ) then
        setenv CCDB_HOME /home/gluex/ccdb/ccdb_1.02_rhel5/
+
    setenv CCDB_HOME /home/gluex/ccdb/ccdb_1.02_rhel5/
 
endif
 
endif
  
 
setenv USE_SQLITE 1
 
setenv USE_SQLITE 1
 
if ( ! $?SQLITE_PATH ) then
 
if ( ! $?SQLITE_PATH ) then
        setenv SQLITE_PATH /home/gluex/ccdb/sqlite/ccdb_2014-06-28.sqlite
+
    setenv SQLITE_PATH /home/gluex/ccdb/sqlite/ccdb_2014-06-28.sqlite
 
endif
 
endif
  
 
if ( ! $?JANA_HOME ) then
 
if ( ! $?JANA_HOME ) then
        setenv JANA_HOME /home/gluex/jana/jana_0.7.1p3_rhel5/${BMS_OSNAME}/
+
    setenv JANA_HOME /home/gluex/jana/jana_0.7.1p3_rhel5/${BMS_OSNAME}/
 
endif
 
endif
  
 
if ( ! $?HDDS_HOME ) then
 
if ( ! $?HDDS_HOME ) then
        setenv HDDS_HOME /home/gluex/hdds/hdds-2.1/
+
    setenv HDDS_HOME /home/gluex/hdds/hdds-2.1/
 
endif
 
endif
  
Line 125: Line 125:
  
 
if ( ! $?HALLD_HOME ) then
 
if ( ! $?HALLD_HOME ) then
        setenv HALLD_HOME /home/gluex/sim-recon/sim-recon-2014-06-30/
+
    setenv HALLD_HOME /home/gluex/sim-recon/sim-recon-2014-06-30/
 
endif
 
endif
  
 
### SET ENVIRONMENT
 
### SET ENVIRONMENT
 
source /home/gluex/env_cmu_gluex_base
 
source /home/gluex/env_cmu_gluex_base
</pre>
 
 
</pre>
 
</pre>
  

Revision as of 18:03, 17 July 2014

Offline Software Overview

Required Lab-External Software

Required Lab-Internal Software

Optional Software

  • AmpTools:

Build Dependencies

  • If you re-build one of the following, you must also rebuild (in order):
Xerces: HDDS, JANA, sim-recon
ROOT: JANA, sim-recon
CCDB: JANA, sim-recon
HDDS: sim-recon
JANA: sim-recon
EVIO: sim-recon

Environment

  • There should be three levels for the software environment: user-specific, release-specific, and base. For best-practice, environment variables should NEVER EVER (!!) be put in your .cshrc (or equivalent) file. This is because if you ever need to switch between environments (e.g. between a "data challenge" release and the latest trunk) it gets very messy and it's very easy to make a mistake. It's far safer (and cleaner) to keep everything separate. Ignore this at your own peril ...

User-Specific Environment Setup

  • This is so that users can link against a centrally-managed release. For example, they can define their $HALLD_MY variable here, which specifies where their plugins are installed. This should call the desired release-specific build. For example, env_gluex_user.csh:
# Set personal path (This usually corresponds to the home area of the trunk (e.g. https://halldsvn.jlab.org/repos/trunk/home/pmatt/))
setenv HALLD_MY /home/$USER/gluex/home/$USER/

# Source the release environment
source /home/gluex/env_gluex_2014_06_30_rhel6
  • Also, advanced users (e.g. developers) can use this to override the release-specific variables (e.g. A test build of sim-recon ($HALLD_HOME)). For example, env_gluex_development.csh:
# (FOR DEVELOPERS ONLY): Override release-specific HALLD_HOME (or other software paths) for custom (i.e. development) builds.
setenv HALLD_HOME /home/$USER/gluex/sim-recon/development/

# Source the release environment
source /home/gluex/env_gluex_2014_06_30_rhel6

Release-Specific Environment Setup

  • For each coherent release of the software, an environment file should be used to specify the versions/paths to all of the software used. For example, env_gluex_2014_06_30_rhel6:
#!/bin/csh -f

### DEFINE RELEASE-DEPENDENT VARIABLES (BASE_FOLDERS/VERSIONS/TAGS/BRANCHES/ETC.)

if ( ! $?JANA_RESOURCE_DIR ) then
     setenv JANA_RESOURCE_DIR /home/gluex/resources/datachallenge_2/
endif

if ( ! $?GLUEX_SCRIPTS ) then
     setenv GLUEX_SCRIPTS /home/gluex/scripts/scripts_r14152/
endif

setenv BMS_OSNAME `$GLUEX_SCRIPTS/osrelease.pl`
# Redirect for earlier builds
if ($BMS_OSNAME == Linux_RHEL5-x86_64-gcc4.1.2) then
     setenv BMS_OSNAME Linux_RHEL5-x86_64-gcc4.2.3
endif

if ( ! $?CERN ) then
     setenv CERN /usr/local/cern_64
endif

if ( ! $?CERN_LEVEL ) then
     setenv CERN_LEVEL 2005
endif

if ( ! $?XERCESCROOT ) then
     setenv XERCESCROOT /home/gluex/xerces/xerces-c-3.1.1_v2/
endif

if ( ! $?CLHEP ) then
     setenv CLHEP /home/gluex/clhep/2.1.3.1/
endif

if ( ! $?GSL_HOME ) then
     setenv GSL_HOME /home/gluex/gsl/gsl-1.15/
endif

if ( ! $?ROOTSYS ) then
     setenv ROOTSYS /home/gluex/root/v5-34-14_rhel5/
endif

if ( ! $?CCDB_HOME ) then
     setenv CCDB_HOME /home/gluex/ccdb/ccdb_1.02_rhel5/
endif

setenv USE_SQLITE 1
if ( ! $?SQLITE_PATH ) then
     setenv SQLITE_PATH /home/gluex/ccdb/sqlite/ccdb_2014-06-28.sqlite
endif

if ( ! $?JANA_HOME ) then
     setenv JANA_HOME /home/gluex/jana/jana_0.7.1p3_rhel5/${BMS_OSNAME}/
endif

if ( ! $?HDDS_HOME ) then
     setenv HDDS_HOME /home/gluex/hdds/hdds-2.1/
endif

#if ( ! $?AMPTOOLS_HOME ) then
#       setenv AMPTOOLS_HOME /home/gluex/AmpTools/AmpTools_0.6.2/
#endif

if ( ! $?HALLD_HOME ) then
     setenv HALLD_HOME /home/gluex/sim-recon/sim-recon-2014-06-30/
endif

### SET ENVIRONMENT
source /home/gluex/env_cmu_gluex_base

Base Environment

env_gluex_base