setup_g4lbne_cvmfs.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_3_2
35 #g4 v4_10_3_p03b clhep depend same as root version setup by dk2nu
36  setup geant4 v4_10_3_p03b -q e15:prof
37  setup fftw v3_3_6_pl2 -q prof
38  setup python v2_7_14
39  setup dk2nu v01_05_01b -q e15:prof
40  unset G4BIN
41 
42 ##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
43 ##
44 ## Set G4WORKDIR to g4lbne directory, if not already set
45 ##
46 ##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
47 
48 # SETUPDIR=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`
49  SETUPDIR=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
50  echo "SETUPDIR is $SETUPDIR"
51  #if [ -z "$G4WORKDIR" ]; then
52 # export G4WORKDIR=`dirname $SETUPDIR`
53 # echo "G4WORKDIR is not set... Setting it to "$G4WORKDIR
54 # fi
55 #
56  export G4WORKDIR=`dirname ${SETUPDIR}`
57  export G4LBNEWORKDIR=`dirname ${SETUPDIR}`
58  export G4LBNE_DIR=`dirname $SETUPDIR`
59 
60  echo "G4WORKDIR: $G4WORKDIR"
61  echo "G4LBNEWORKDIR: $G4LBNEWORKDIR"
62  echo "G4LBNE_DIR: $G4LBNE_DIR"
63 
64  export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$G4LIB/Linux-g++"
65 
66 # echo "*********************"
67 # echo Locating ROOT...
68 # env | grep root
69 # echo "*********************"
70 # echo Locating Geant4...
71 # env | grep geant4
72 # echo "*********************"
73 # echo Locating CLHEP...
74 # env | grep clhep
75 # echo "*********************"
76 
77  export G4WORKDIR=`pwd`
78 
79  echo G4WORKDIR is ${G4WORKDIR}
80  export LD_LIBRARY_PATH=${G4LBNE_DIR}:${LD_LIBRARY_PATH}
81  export LD_LIBRARY_PATH=${G4LBNE_DIR}/shared_libraries:${LD_LIBRARY_PATH}
82  export LD_LIBRARY_PATH=${G4LBNE_DIR}/build:${LD_LIBRARY_PATH}
83 
84  echo LD_LIBRARY_PATH is ${LD_LIBRARY_PATH}
85 
86 
87 
88  #
89  # Set a flag to suppress unnecessary re-executions of this script.
90  #
91  #export G4LBNE_IS_SETUP=1
92 
93 # Setup grid submit tools if not on a grid node
94 if [ -z "${_CONDOR_SCRATCH_DIR}" ]; then
95  echo "_CONDOR_SCRATCH_DIR is not set... so I'm assuming we're not running on a grid node.... Setting up jobsub tools."
96 # setup jobsub_tools
97  setup jobsub_client
98 fi
99 
100 fi