setup_g4lbne_fnal.sh
Go to the documentation of this file.
1 
2 source /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setups
3 setup ifdhc
4 
5 # For lcg-cp, which is not installed on all osg machines
6 #source /cvmfs/oasis.opensciencegrid.org/mis/osg-wn-client/3.2/current/el6-x86_64/setup.sh
7 
8 
9 if [ -z "${G4LBNE_IS_SETUP}" ]; then
10 
11  case ${HOSTNAME} in
12  argoneut*)
13  export GROUP=argoneut
14  export EXPERIMENT=argoneut
15  ;;
16  uboone*)
17  export GROUP=microboone
18  export EXPERIMENT=uboone
19  ;;
20  lbne*)
21  export GROUP=dune
22  export EXPERIMENT=dune
23  ;;
24  dune*)
25  export GROUP=dune
26  export EXPERIMENT=dune
27  ;;
28  esac
29  echo experiment is $GROUP
30 
31 
32  export LBNE_PRODUCT_DIR=/cvmfs/fermilab.opensciencegrid.org/products/larsoft/
33  source /cvmfs/fermilab.opensciencegrid.org/products/larsoft/setup
34  setup cmake v3_2_1
35  setup geant4 v4_10_2_p02b -q e10:prof
36  setup fftw v3_3_4 -q prof
37  setup python v2_7_6
38  setup dk2nu v01_04_01d -q e10:prof:r6
39  unset G4BIN
40 
41 ##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
42 ##
43 ## Set G4WORKDIR to g4lbne directory, if not already set
44 ##
45 ##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
46 
47 # SETUPDIR=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`
48  SETUPDIR=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
49  echo "SETUPDIR is $SETUPDIR"
50  #if [ -z "$G4WORKDIR" ]; then
51 # export G4WORKDIR=`dirname $SETUPDIR`
52 # echo "G4WORKDIR is not set... Setting it to "$G4WORKDIR
53 # fi
54 #
55  export G4WORKDIR=`dirname ${SETUPDIR}`
56  export G4LBNEWORKDIR=`dirname ${SETUPDIR}`
57  export G4LBNE_DIR=`dirname $SETUPDIR`
58 
59  echo "G4WORKDIR: $G4WORKDIR"
60  echo "G4LBNEWORKDIR: $G4LBNEWORKDIR"
61  echo "G4LBNE_DIR: $G4LBNE_DIR"
62 
63  export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$G4LIB/Linux-g++"
64 
65 # echo "*********************"
66 # echo Locating ROOT...
67 # env | grep root
68 # echo "*********************"
69 # echo Locating Geant4...
70 # env | grep geant4
71 # echo "*********************"
72 # echo Locating CLHEP...
73 # env | grep clhep
74 # echo "*********************"
75 
76  export G4WORKDIR=`pwd`
77 
78  echo G4WORKDIR is ${G4WORKDIR}
79  export LD_LIBRARY_PATH=${G4LBNE_DIR}:${LD_LIBRARY_PATH}
80  export LD_LIBRARY_PATH=${G4LBNE_DIR}/shared_libraries:${LD_LIBRARY_PATH}
81  export LD_LIBRARY_PATH=${G4LBNE_DIR}/build:${LD_LIBRARY_PATH}
82 
83  echo LD_LIBRARY_PATH is ${LD_LIBRARY_PATH}
84 
85 
86 
87  #
88  # Set a flag to suppress unnecessary re-executions of this script.
89  #
90  #export G4LBNE_IS_SETUP=1
91 
92 # Setup grid submit tools if not on a grid node
93 if [ -z "${_CONDOR_SCRATCH_DIR}" ]; then
94  echo "_CONDOR_SCRATCH_DIR is not set... so I'm assuming we're not running on a grid node.... Setting up jobsub tools."
95 # setup jobsub_tools
96  setup jobsub_client
97 fi
98 
99 fi