-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen5_init.sh
81 lines (66 loc) · 2.3 KB
/
gen5_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
76
77
78
79
80
#!/bin/sh
# This file is called . createFiles_init.sh
JobName="createFiles_serial_job_test" # for slurm
output="/sps/cms/chiron/TEMP/gen5_%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//\"}
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//\"}
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"
module purge
module use /opt/exp_soft/vo.gridcl.fr/software/modules/
module use /opt/exp_soft/vo.llr.in2p3.fr/modulefiles_el7
#module use /opt/exp_soft/vo.llr.in2p3.fr/modulefiles
#module load python/3.7.0
module load python/3.12.4
source /opt/exp_soft/llr/root/v6.32.02-el7-gcc11xx-py3124/etc/init.sh
#source /opt/exp_soft/llr/root/v6.24.04-el7-gcc9xx-py370/etc/init.sh
cd $LOG_SOURCE
#/opt/exp_soft/cms/t3/t3submit -8c -long createFiles.sh $LOG_SOURCE $LOG_KS_SOURCE $COMMON_SOURCE $FileName
#/opt/exp_soft/cms/t3/t3submit -8c -short createFiles.sh $LOG_SOURCE $LOG_KS_SOURCE $COMMON_SOURCE $FileName
/opt/exp_soft/cms/t3/t3submit -8c -short gen5.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 2 --mem=8000 -t 0-0:5:0 -J $JobName -o $output gen5.sh $LOG_SOURCE $LOG_KS_SOURCE $COMMON_SOURCE $FileName
fi
echo "END"