forked from mit-mc-clas12/clas12simulations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runscript.sh
executable file
·109 lines (78 loc) · 2.32 KB
/
runscript.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/csh
set script_start = `date`
# source /cvmfs/cms.cern.ch/cmsset_default.csh
echo "XXXXXXXXXXXX"
#cat $PWD/.job.ad
echo "XXXXXXXXXXXX"
echo "Submitted by mungaro, rgaDIS"
uname -a
echo " ==== PWD"
pwd
echo " ==== ./"
ls -lhrt ./
echo " ==== /etc/profile.d/"
ls -lhrt /etc/profile.d/
echo " ==== ENV"
env
source /etc/profile.d/environmentB.csh
cd /tmp
#set ClusterId = `sed -n '0,/ClusterId = "\([^"]*\)"/\1/p' $PWD/.job.ad`
set ClusterId = ` awk -F '=' '/^ClusterId/ {print $2}' $PWD/.job.ad`
echo ClusterId $ClusterId
set ProcId = ` awk -F '=' '/^ProcId/ {print $2}' $PWD/.job.ad`
echo ProcId $ProcId
printf "Start time: "; /bin/date
printf "Job is running on node: "; /bin/hostname
printf "Job running as user: "; /usr/bin/id
printf "Job is running in directory: "; /bin/pwd
echo
echo JLAB_ROOT: $JLAB_ROOT
echo
echo starting files
ls -l
set generator_start = `date`
clasdis --trig 100 --docker --t 15 20
#dvcsgen --trig 71 --docker
echo after generator
echo test finish
ls -l
set gemc_start = `date`
gemc -USE_GUI=0 -N=100 -INPUT_GEN_FILE="lund, sidis.dat"LUMIOPTION_scard /jlab/work/clas12.gcard
echo after gemc
ls -l
set evio2hipo_start = `date`
evio2hipo -r 11 -t -100 -s -100 -i out.ev -o gemc.hipo
echo after decoder
ls -l
set notsouseful_start = `date`
notsouseful-util -i gemc.hipo -o out_gemc.hipo -c 2
echo after cooking
ls -l
echo Moving file
echo $ClusterId
mv out.ev out.$ProcId.ev
mv gemc.hipo gemc.$ProcId.hipo
mv sidis.dat sidis.dat.$ProcId
echo File moved
echo `basename sidis.dat.$ProcId`
echo `basename out.$ProcId.ev`
echo `basename gemc.$ProcId.hipo`
echo `basename out_gemc.$ProcId.hipo`
echo creating directory
mkdir out_`basename $ClusterId`_n100
echo moving file
mv sidis.dat.$ProcId out_`basename $ClusterId`_n100
mv out.$ProcId.ev out_`basename $ClusterId`_n100
mv gemc.$ProcId.hipo out_`basename $ClusterId`_n100
mv out_gemc.hipo out_gemc.$ProcId.hipo
mv out_gemc.$ProcId.hipo out_`basename $ClusterId`_n100
echo copying gcard and scard
cp /jlab/work/clas12.gcard out_`basename $ClusterId`_n100
cp scard_name out_`basename $ClusterId`_n100
#final job log
printf "Job finished time: "; /bin/date
echo "script started at" $script_start
echo "generator started at" $generator_start
echo "gemc started at" $gemc_start
echo "evio2hipo started at" $evio2hipo_start
echo "notsouseful started at" $notsouseful_start