forked from kordosky/ppfx
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·98 lines (86 loc) · 3.4 KB
/
setup.sh
File metadata and controls
executable file
·98 lines (86 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/bash
setup_for_nova(){
source /cvmfs/nova.opensciencegrid.org/externals/setup
setup fife_utils
# setting up for the grid
export IFDH_GRIDFTP_EXTRA="-st 10" #set ifdh cp stall timeout to 10 sec
export IFDH_CP_MAXRETRIES=2
setup ifdhc v2_7_2 -q e26:prof:p3915
setup dk2nudata v01_10_01h -q e26:prof
setup nufinder v1_02_01
setup boost v1_82_0 -q e26:prof
# bash magic pulled off of stack exchange
# gets the full path to the location of setup.sh
export PPFX_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo "setting PPFX_DIR=${PPFX_DIR}"
export LD_LIBRARY_PATH=$PPFX_DIR/lib:$LD_LIBRARY_PATH
}
setup_for_dune(){
echo "Sourcing DUNE setup script"
source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
setup ifdhc
setup dk2nudata v01_10_00d -q e20:prof
setup dk2nugenie v01_10_00d -q e20:prof
export M32=-m64
setup fftw v3_3_4 -q prof
setup boost v1_75_0 -q e20:prof
# setup for jobsub client
# according to the prescription in Mike Kirby's talk
# minerva doc-10551, Dec 2014
# Setup grid submit tools if not on a grid node
if [ -z "${_CONDOR_SCRATCH_DIR}" ]; then
setup jobsub_client
/cvmfs/dune.opensciencegrid.org/products/dune/duneutil/v09_42_00/bin/setup_fnal_security -f -b
fi
# bash magic pulled off of stack exchange
# gets the full path to the location of setup.sh
export PPFX_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo "setting PPFX_DIR=${PPFX_DIR}"
export LD_LIBRARY_PATH=$PPFX_DIR/lib:$LD_LIBRARY_PATH
}
setup_for_other(){
echo "Sourcing nusoft setup script"
. "/nusoft/app/externals/setup"
setup -q debug:e2 -f Linux64bit+2.6-2.5 root v5_34_05
setup -q debug:e5 -f Linux64bit+2.6-2.5 boost v1_55_0
export BOOSTROOT=${BOOST_DIR}/source/boost_1_55_0
setup -q debug:e5 -f Linux64bit+2.6-2.5 dk2nu v01_01_03
export DK2NU_INC=${DK2NU}/include/dk2nu/tree
export DK2NU_LIB=${DK2NU}/lib
# setup for jobsub client
# according to the prescription in Mike Kirby's talk
# minerva doc-10551, Dec 2014 (same doc can be found for other experiments)
source /grid/fermiapp/products/common/etc/setups.sh
setup jobsub_client
setup ifdhc
#This is for MINERvA. Change accordingly.
export IFDH_BASE_URI="http://samweb-minerva.fnal.gov:20004/sam/minerva/api"
# bash magic pulled off of stack exchange
# gets the full path to the location of setup.sh
export PPFX_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo "setting PPFX_DIR=${PPFX_DIR}"
export LD_LIBRARY_PATH=$PPFX_DIR/lib:$LD_LIBRARY_PATH
}
HOST=$(hostname -f)
echo $HOST
if echo "$HOST" | grep 'nova'; then
# the default mode is NuMI
export MODE="NUMI"
echo "Setting up for NOvA in MODE $MODE"
setup_for_nova
elif echo "$HOST" | grep 'dune'; then
export MODE=$1
if [ "$MODE" = "REF" ] || [ "$MODE" = "OPT" ];then
echo "Setting up for DUNE in MODE $MODE"
setup_for_dune
else
echo "This is a dune machine. You must add 1 argument. REF for reference and OPT for optimized"
fi
else
# the default mode is NuMI
export MODE="NUMI"
echo "WARNING: This setup script might be outdated if you are not on nova or dune machines."
echo "Setting up for $HOST in MODE $MODE"
#setup_for_other, BHUMIKA, so that I can setup nova always, Roberts scripts
setup_for_nova
fi