2 # DUNE software environment setup script
5 # Look for obsolete lines in login scripts
7 for file in ~/.bash_profile ~/.bash_login ~/.profile ~/.shrc ~/.bashrc;
9 if [[ -f $file ]]; then
11 while IFS= read -r line; do
12 if [[ $line == *"setup login"* && $line != *"#"* ]]; then
16 if [[ $line == *"setup shrc"* && $line != *"#"* ]]; then
22 if [[ $found == 1 ]]; then
24 checkthesefiles="$file $checkthesefiles"
25 #echo checkthesefiles $checkthesefiles
29 if [[ -n $checkthesefiles ]]; then
30 echo -e "\033[0;31mIMPORTANT! We detect obsolete lines in your login scripts $checkthesefiles \033[0m"
31 echo "Please look for the following lines or something similar in $checkthesefiles and comment those lines out and relogin. Those lines may cause a conflict with cvmfs later."
32 echo "pa=/grid/fermiapp/products/common/etc"
33 echo "if [ -r \"$pa/setups.sh\" ]"
35 echo " . \"$pa/setups.sh\" "
36 echo " if ups exist login"
42 echo "pa=/grid/fermiapp/products/common/etc"
43 echo "if [ -r \"$pa/setups.sh\" ]"
45 echo " . \"$pa/setups.sh\" "
48 echo "if ups exist shrc"
53 echo "For more information, please check https://cdcvs.fnal.gov/redmine/issues/15028 or contact Tingjun (tjyang@fnal.gov) or Tom (trj@fnal.gov)."
56 # Source this file to set the basic configuration needed by LArSoft
57 # and for the DUNE-specific software that interfaces to LArSoft.
59 # location of the common UPS database
61 CVMFS_COMMON_DIR="/cvmfs/fermilab.opensciencegrid.org/products/common/db/"
63 # current location of larsoft in CVMFS
65 CVMFS_LARSOFT_DIR="/cvmfs/larsoft.opensciencegrid.org/products/"
67 # location of DUNE software. /grid/fermiapp is a fallback
69 CVMFS_DUNE_DIR="/cvmfs/dune.opensciencegrid.org/products/dune/"
70 FERMIAPP_DUNE_DIR="/grid/fermiapp/products/dune/"
72 # Set up ups for LArSoft
74 for dir in $CVMFS_LARSOFT_DIR;
76 if [[ -f $dir/setup ]]; then
77 echo "Setting up larsoft UPS area... ${dir}"
83 # need also the common db in $PRODUCTS
85 for dir in $CVMFS_COMMON_DIR
87 if [[ -d $CVMFS_COMMON_DIR ]]; then
88 export PRODUCTS=`dropit -p $PRODUCTS common/db`:${CVMFS_COMMON_DIR}
93 # Set up ups for DUNE. Try CVMFS first and fall back to /grid/fermiapp
94 # only if the CVMFS setup cannot be found
96 for dir in $CVMFS_DUNE_DIR $FERMIAPP_DUNE_DIR;
98 if [[ -f $dir/setup ]]; then
99 echo "Setting up DUNE UPS area... ${dir}"
105 # Add current working directory (".") to FW_SEARCH_PATH
107 if [[ -n "${FW_SEARCH_PATH}" ]]; then
108 export FW_SEARCH_PATH=.:`dropit -e -p $FW_SEARCH_PATH .`
110 export FW_SEARCH_PATH=.
113 # Set up the basic tools that will be needed
115 if [ `uname` != Darwin ]; then
117 # Work around git table file bugs.
119 export PATH=`dropit git`
120 export LD_LIBRARY_PATH=`dropit -p $LD_LIBRARY_PATH git`
127 # this is now setup by jobsub_client. setup pycurl
129 # Define the value of MRB_PROJECT. This can be used
130 # to drive other set-ups.
131 # We need to set this to 'larsoft' for now.
133 export MRB_PROJECT=larsoft
135 # Define environment variables that store the standard experiment name.
137 export JOBSUB_GROUP=dune
138 export EXPERIMENT=dune # Used by ifdhc
139 export SAM_EXPERIMENT=dune
143 export ART_WORKBOOK_OUTPUT_BASE=/dune/data/users
144 export ART_WORKBOOK_WORKING_BASE=/dune/app/users
145 export ART_WORKBOOK_QUAL="s2:e5:nu"
149 export DBIWSPWDFILE=/dune/experts/path/to/proddbpwd/for/writes
150 export DBIWSURL=http://dbdata0vm.fnal.gov:8116/LBNE35tCon/app/
151 export DBIWSURLINT=http://dbdata0vm.fnal.gov:8116/LBNE35tCon/app/
152 export DBIWSURLPUT=http://dbdata0vm.fnal.gov:8117/LBNE35tCon/app/
153 export DBIQEURL=http://dbdata0vm.fnal.gov:8122/QE/dune35t/prod/app/SQ/
154 export DBIHOST=ifdbprod.fnal.gov
155 export DBINAME=dune35t_prod
157 export DBIUSER=dune_reader
158 export DBIPWDFILE='~jpaley/dune/db/proddbpwd'
162 export SSL_CERT_FILE=""
164 # to ensure compatibility on OSG nodes missing OS libraries
166 setup dune_oslibs v1_0_0
168 # set up gdb and ninja out of ups