-
Notifications
You must be signed in to change notification settings - Fork 0
/
extractValues_init.sh
76 lines (65 loc) · 2.21 KB
/
extractValues_init.sh
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
#!/bin/sh
# This file is called . extractValues_init.sh
JobName="extractValues_serial_job_test" # for slurm
output="/sps/cms/chiron/TEMP/extractValues_%j.log" # for slurm
declare -a readarray
aa=$PWD
echo "actual path : $aa"
STR=$aa
Choice='Local'
for SUB in 'llr' 'pbs' 'cern'
do
if [[ "$STR" == *"$SUB"* ]]; then
echo "It's $SUB there.";
Choice=${SUB^^};
fi
done
echo "Choice is : $Choice"
FileName="paths$Choice.py"
echo $FileName
readarray toto -t array < CommonFiles/$FileName
N=${#toto[@]}
echo "N= $N"
LOG_SOURCE="$aa/${toto[15]}"
LOG_SOURCE=${LOG_SOURCE//LOG_SOURCE=}
LOG_SOURCE=${LOG_SOURCE//\"}
LOG_OUTPUT="$aa/${toto[16]}"
LOG_OUTPUT=${LOG_OUTPUT//LOG_OUTPUT=}
LOG_OUTPUT=${LOG_OUTPUT//\"}
RESULTFOLDER="${toto[17]}"
RESULTFOLDER=${RESULTFOLDER//RESULTFOLDER=}
RESULTFOLDER=${RESULTFOLDER//\"}
LOG_KS_SOURCE="$aa/${toto[18]}"
LOG_KS_SOURCE=${LOG_KS_SOURCE//LOG_KS_SOURCE=}
LOG_KS_SOURCE=${LOG_KS_SOURCE//\"}
LIB_SOURCE="$aa/${toto[19]}"
LIB_SOURCE=${LIB_SOURCE//LIB_SOURCE=}
LIB_SOURCE=${LIB_SOURCE//\"}
COMMON_SOURCE="$aa/${toto[20]}"
COMMON_SOURCE=${COMMON_SOURCE//COMMON_SOURCE=}
COMMON_SOURCE=${COMMON_SOURCE//\"}
echo "LOG_SOURCE : $LOG_SOURCE"
echo "LOG_OUTPUT : $LOG_OUTPUT"
echo "RESULTFOLDER : $RESULTFOLDER"
echo "LOG_KS_SOURCE : $LOG_KS_SOURCE"
echo "LIB_SOURCE : $LIB_SOURCE"
echo "COMMON_SOURCE : $COMMON_SOURCE"
if [[ "$Choice" == "LLR" ]]
then
echo "LLR"
source /opt/exp_soft/llr/root/v6.24.04-el7-gcc9xx-py370/etc/init.sh
cd $LOG_SOURCE
/opt/exp_soft/cms/t3/t3submit -16c -long extractValues.sh $LOG_SOURCE $LOG_KS_SOURCE $COMMON_SOURCE $FileName # -mail [email protected]
#/opt/exp_soft/cms/t3/t3submit -8c -short extractValues.sh $LOG_SOURCE $LOG_KS_SOURCE $COMMON_SOURCE $FileName
#/opt/exp_soft/cms/t3/t3submit -8c -reserv extractValues.sh $LOG_SOURCE $LOG_KS_SOURCE $COMMON_SOURCE $FileName
elif [[ "$Choice" == "PBS" ]]
then
echo "PBS"
cd $LOG_SOURCE
module load Programming_Languages/python/3.9.1
module load Compilers/gcc/9.3.1
module load DataManagement/xrootd/4.8.1
module load Analysis/root/6.24.06
sbatch -L sps -n 8 --mem=8000 -t 4-0:0:0 -J $JobName -o $output extractValues.sh $LOG_SOURCE $LOG_KS_SOURCE $COMMON_SOURCE $FileName
fi
echo "END"