-
Notifications
You must be signed in to change notification settings - Fork 0
/
sixdeskenv.bnl
310 lines (271 loc) · 8.25 KB
/
sixdeskenv.bnl
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
#!/bin/sh
# Januray, 2012
# NOTA BENE: there is a new option for a more precise proton mass
# and also a new flag to ignore tunes (tune=0)
# and a new bunch_charge option for both collision and injection
export pmass=938.271998
# or you can use the new more precise value
# by uncommenting the next line
#export pmass=938.272013
# New bunch_charge variable for fort.3.mother1_[col/inj]
export bunch_charge=1.1000e+11
# The name of the "study" .le. 16 characters ([a-z A-Z 0-9 + - _ . ,]
# It must NOT contain a "%" (replacing "#") nor "_""_"
# It now includes the Version info e.g. v64lhc
# (If running mad6t you must have a $LHCDescrip.mask file in the subdirectory mask)
export LHCDescrip=lhc
# The workspace for the scripts, sixdesk.log and links to sixtrack_input, track and work,
# It must NOT contain a "%" (replacing "#") nor "__" (two consecutive underscores)
export workspace=w1
# The directory for the workspace (normally backed up) e.g. $HOME
initial=`echo $LOGNAME | cut -c 1`
export basedir=/afs/cern.ch/user/$initial/$LOGNAME
# The scratch directory for temporary input files, jobs, sixdesk databases etc (not normally backed up)
export scratchdir=/afs/cern.ch/user/$initial/$LOGNAME/scratch0
# The root track directory for all the tracking input and output
# This directory can be used by multiple workspaces for scalability
# but the default now includes the workspace name (track is added
# by sysenv to make $sixdesktrackdir and the LHCDescrip is added
# as necessary by run_six etc etc).
export trackdir=$scratchdir/$workspace
# The backed up or scratch directory for the mad6t input
# It may be set to an existing sixtrack_input if you do not need to run mad6t.
export sixtrack_input=$scratchdir/sixtrack_input/$workspace/$LHCDescrip
# Flag for run_six for re-running cases
# 0 => Jobs will not be re-submitted,
# 1 => Jobs will not be re-submitted if fort.10.gz exists
# 2 => Jobs will be re-submitted anyway using existing input files
# (3 => Input files will be deleted, re-generated and jobs re-submitted anyway)
export sixdeskforce=0
# One and one only of the following options must be selected
# BOINC for LHC@home, LSF for LSF batch, CPSS for Windows desktops at CERN, or GRID
export platform=LSF
# The message logging level: 0 => Start/Stop summary only, 1 => + error messages,
# 2 => + informatory messages, 4 => + debug information (additive)
export sixdesklevel=3
# sixdeskecho = "" => only minimum information is echoed to stdout
export sixdeskecho="yes please"
# Options for run_mad6t (but sixtrack_inputdir defined above)
# If CORR_TEST = 1, check_mad6t will copy all the corrector strengths
# for each seed into one file in sixtrack_inputdir
export CORR_TEST=0
#If fort_34 is null, the fort.34 files will not be copied to sixtrack_inputdir
export fort_34=""
# Start and end seed for mad6t
export istamad=1
export iendmad=60
# Note that all mad6t runs are with the local LSF batch system,
# even if tracking is being performed on BOINC, CPSS or the GRID,
# BUT they can now be done interactively with run_mad6t -i !!!
# LSF batch queue for mad6t jobs. Normally 8nm is enough, but for
# lhc.D1-D2-MQonly-inj-no-skew study 1nh was necessary.
export madlsfq=1nh
export shortlsfq=8nh
export longlsfq=1nd
export dalsfq=1nd
# Format: "col" or "inj" ( also for run_six)
export runtype=inj
# and the beam can be set to "" or b1 or B1 for beam1, or to b2 or B2 for beam2
export beam=""
# Options for run_six
# idfor = 0 => closed orbit added, = 1 => initial co-ordinates unchanged
export idfor=0
#The algorithm for beam-beam interactions
# 0 is the "old" way, "1" is the new Erskine/McIntosh algorithm
export ibtype=0
#general parameters
# No of particle pairs, normally 30 (other values ARE NOW SUPPORTED
# in the range 1 to 32
export sixdeskpairs=30
# seeds for everything except mad6t
export ista=$istamad
export iend=$iendmad
# angle step
export kstep=1
#normalized emittance
export emit=3.75
# e0 gamma
if test $runtype = "inj"
then
export e0=450000.
export gamma=479.6
elif test $runtype = "col"
then
export e0=7000000.
export gamma=7460.5
fi
#phase space dimension
export dimen=6
#switch for chromaticity correction
# If chrom=0 no correction is applied but two one turn runs are made
# using chrom_eps to generate sensible values (for info only).
# If chrom=1 then chromx and chromy are used
export chrom=0
export chromx=2.
export chromy=2.
export chrom_eps=0.0000001
#initial relative momentum deviation
if test $runtype = "inj"
then
export dpini=0.00075
elif test $runtype = "col"
then
export dpini=0.00027
fi
export dpmax=0.002
#tunes
# If tune=0, the tunes are ignored.
export tune=1
# Multiple tunescans can be specified
# tunescans will be computed on a straight line from
# (tunex,tuney) with gradient deltay/deltax until and including (tunex1,tuney1)
# The tunes must be 10 <= tune < 100 in format dd.dd[d][d]
if test $runtype = "inj"
then
#tunes (injection)
export tunex=64.28
export tuney=59.31
export deltax=0.001
export deltay=0.001
export tunex1=64.28
export tuney1=59.31
elif test $runtype = "col"
then
#tunes (collision)
export tunex=64.31
export tuney=59.32
export deltax=0.001
export deltay=0.001
export tunex1=64.31
export tuney1=59.32
fi
#switch for Guignard resonance calculation
export reson=0
#switch for precise tune determination
export sussix=0
# Note if sussix = 1, short must be 1 (long/da 0)
# and kini = 1 FRS??????
# Now we have short or long term parameters
# only one of short and long may be 1
#short term parameters
export short=0
if test $short -eq 1
then
export ns1s=1
export ns2s=10
export nss=10
#
export turnss=1000
export turnsse=3
export writebins=1
# kini=0 is the momemtum detuning and then set to 1
export kini=0
export kend=5
export kmax=5
# and set up the LSF job type and queue
export lsfq=$shortlsfq
export lsfjobtype=sixmedium
fi
#long term parameters
export long=1
if test $long -eq 1
then
# amplitudes which must be 0 <= amplitude < 100 in format [d][d][.][d][d][d]
export ns1l=4
export ns2l=12
export nsincl=2
#
export turnsl=100000
export turnsle=5
export writebinl=1000
export kinil=1
export kendl=5
export kmaxl=5
# and set up the LSF job type and queue
export lsfq=$longlsfq
export lsfjobtype=sixtracking
fi
#da parameters
export da=0
if test $da -eq 1
then
export sixdeskM="-M 1000000"
export lsfq=$dalsfq
export lsfjobtype=sixda
# some physics needed here
# dimda = 4 or 6 but MUST be set to NOT null for short/long
export dimda=4
export NO=4
((NO1=NO+1))
export NO1
export NV=5
export turnss=1
else
export dimda=0
fi
# Parameters for run_join10
# Range of tracked turns
if test $short = 1
then
export turnsemax=$turnsse
fi
if test $long = 1
then
export turnsemax=$turnsle
fi
# For run_post
if test $long = 1
then
export turnse=$turnsle
fi
if test $short = 1
then
export turnse=$turnsse
fi
# flag for short and long plotting
# iplot=1 produces plots for each seed
# iplot=2 prints as well using $PRINT_CMD
export iplot=0
# kvar=0 => kend=$kendl, kvar=1 => kend=$kinil
# kvar should be set to 1 to obtain the DA
# as a function of the angles (when long=1)
# The DA over ALL seeds and angles is plotted for each angle
# even if iplot=0
if test "$long" -eq 1
then
export kvar=1
else
export kvar=0
fi
# BNL variables for bnlelens
# Later I could separate out elens and bnl dependencies in sixtrack.s
# as we may wish to run LHC elens studies
export BNL=""
if test "$BNL" != ""
then
# We expect to find beambeamdist.dat, fort.2, fort.3.mother and fort.8 and fort.16
# in sixtrack_input and run_bnl will check this
#
# The "seed" 1000 for example as used by Yun Luo
export bnlseeds=1000
export bnlseede=1000
# First and Last sample number in beambeamdist.dat
export bnlsamples=1
export bnlsamplee=1
# Number of pairs descriped in a sample in beambeamdist.dat
export bnlpairs=32
# Number of pairs for each job
# This used to generate bnlpair names like 1-2, 2-3, and so on....63,64
export bnlperjob=2
# Now the turns, a bit tricky, since we use nwri for both deciding how often
# to checkpoint, and how often to write beambeam-output.dat!
# I am assuming we run 2 pairs per job and then the values below
# are reasonable
export bnlturns=10000000
export bnlturnse=e7
export bnlwrite=100000
# for my testing I used
export bnlturns=50000
# end BNL variables
fi
#