-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_2d_obs
137 lines (92 loc) · 3.63 KB
/
run_2d_obs
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/usr/bin/env bash
#Used to extract observables from output/eigen/measurement files generated using https://github.com/daschaich/susy/tree/master/2d_Q04
#Still to improve, to generalise it for arbitrary N and still to add couple of more observables like acceptance rate
echo ==== Deleting previous data in Results ====
cd Results
rm -f *.txt
rm -f *.png
cd ..
#I have arranged folders with different configuration which contain an 'Out' folder with all out/eig/meas files.
#Extarcted observables are then moved from 'Out' to 'Results' folder.
echo ==== Extracting observables ====
cd Out
#Extracting observables for 3500 MDTU's
#Extracted observables only depend on N(Number of colors) wherever you see divide by 12 that corresponds
#to divide by Number of Colors
for ((c=0 ;c<3500; c+=10))
do
#echo ==Extracting Delta==
grep "delta" out.$c-* | awk '{print $5}' >> del.txt #delta S
#echo ==Extracting Forces==
grep "FORCE_GAUGE" out.$c-* | awk '{print $2}' >>force_g.txt #FORCES
grep "FORCE_FERMI" out.$c-* | awk '{print $2}' >>force_f.txt
#echo ==Extracting exp[-delta S]==
grep "delta" out.$c-* | awk '{print exp(-$5)}' >> exp_del.txt #exp(-delta S)
#echo ==Extracting mod[delta S]==
grep "delta" out.$c-* | awk '{print $5<0?$5*-1:$5}' >> mod_del.txt # |delta S|
#echo ==Extracting nsteps==
#grep "nstep\|nstep_g" ./out.$c-* | awk '{print $2}' #nsteps
#echo ==Extracting Maximum CG Iterations==
grep "IT_PER_TRAJ" out.$c-* | awk '{print $2}' >> cg.txt #Max CG iterations
for ((d=1;d<=10;d++))
do
#echo ==Extracting Norder==
grep "RHMC Norder" out.$c-* | awk '{print $3}' >> norder.txt #Norder
#echo ==Extracting nstep==
grep "nstep " out.$c-* | awk '{print $2}' >> nstep.txt #nstep
#echo ==Extracting nstep_gauge==
grep "nstep_" out.$c-* | awk '{print $2}' >> nstep_g.txt #nstep_gauge
#echo ==Extracting Traj length==
grep "traj_l" out.$c-* | awk '{print $2}' >> traj.txt #Trajec Length
done
#echo ==Extracting Re and Im Polyakov Loop==
grep "GMES" out.$c-* | awk '{print $2/12,$3/12}' >> poly.txt #Maldacena loop
#echo ==Extracting Mod Polyakov Loop==
grep "GMES" out.$c-* | awk '{print sqrt($2*$2+$3*$3)/12}' >> poly_mod.txt #Mod Maldacena loop
#echo ==Extracting Plaquette==
grep "GMES" out.$c-* | awk '{print $5/12}' >> plaq.txt #Plaquette
#echo ==Extracting Bosonic Action==
grep "GMES" out.$c-* | awk '{print $6/(1.5*12*12)}' >> bos.txt #Bosonic Action
#echo ==Extracting Polyakov Loop==
grep "LINES_P" ./out.$c-* | awk '{print $4/12,$5/12,sqrt($4*$4+$5*$5)/12}' >> poly_polar.txt #Polyakov Loop
#echo ==Extracting Mod Wilson Lines==
grep "LINES " ./out.$c-* | awk '{print sqrt($2*$2+$3*$3)/12}' >> lines_mod.txt #Mod Wilson
#echo ==Extracting Mod Unitary Lines==
grep "LINES_P" ./out.$c-* | awk '{print sqrt($2*$2+$3*$3)/12}' >> lines_polar_mod.txt #Mod Unitary
#echo ==Extracting Tr_X^2==
grep "TR_XSQ" meas.$c | awk '{print $2}' >> meas.txt #
done
#Check if there is any CG divergence
grep "CONGRAD" ./out*
#If this prints something it means CG has not converged somewhere in the runs
#Check that eigen values are in the bound
#For that by checking Norder you get an allowed range [a,b]
#Then run
grep "EIG" ./eig.* | awk '{if($3<a||$3>b) print $3}'
#If this prints something it means that somewhere eigen values have gone out of given range
cd ..
cd Results
scp ../Out/*.txt ./
echo ==Plotting graphs==
#gnuplot poly.p
#gnuplot poly_mod.p
#gnuplot plaq.p
#gnuplot nstep.p
#gnuplot norder.p
#gnuplot forces.p
#gnuplot mod_del.p
#gnuplot exp_del.p
#gnuplot del.p
#gnuplot cg.p
#gnuplot bos.p
#gnuplot traj.p
#gnuplot poly_polar.p
#gnuplot poly_polar_mod.p
#gnuplot lines_mod.p
#gnuplot lines_polar_mod.p
cd ..
cd Out
rm *.txt
cd ..
wait
echo Done