Repository navigation
Expand file tree
/
Copy pathwhereami
More file actions
executable file
·273 lines (273 loc) · 4.57 KB
/
Copy pathwhereami
File metadata and controls
executable file
·273 lines (273 loc) · 4.57 KB
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
#! /bin/csh -f
set machine_location=`hostname`
set fullhost=`nslookup $machine_location | grep -m 1 Name | awk '/Name:/{print $2}' | tr 'A-Z' 'a-z'`
if ("$fullhost" == "") then
set fullhost=`nslookup ${machine_location}i | grep -m 1 Name | awk '/Name:/{print $2}' | tr 'A-Z' 'a-z'`
endif
if ("$fullhost" == "") then
set fullhost=`hostname -f`
endif
# special handling of hostnames head*, node* that keeps mephi_check working
set mephi_check=`echo $machine_location | cut -c1-4`
if ("$mephi_check" == "head" || "$mephi_check" == "node") then
switch ($fullhost)
case "*.cm.cluster":
breaksw
default:
echo "mephi_check = $mephi_check - special mephi cluster treatment applies"
set machine_location="cluster21.mephi.ru"
set fullhost=$machine_location
endsw
endif
# special handling for ITER SDCC cluster nodes
set iter_check=`echo $machine_location | cut -d '.' -f 2-3`
if ("$iter_check" == "iter.org") then
set fullhost=$machine_location
endif
# Assign location
switch ($fullhost)
case "*.iter.org":
echo ITER
breaksw
case "*.iaea.org":
echo IAEA
breaksw
case "*.iferc-csc.org":
echo IFERC
breaksw
case "*.eufus.eu":
case "*.efgw.local":
case "*.efda-itm.eu":
case "*.marconi.cineca.it"
case "*.galileo.cineca.it"
[ -d /afs ] && echo ITM || echo MARCONI
breaksw
case "*.pitagora.local"
case "*.pitagora.cineca.it":
echo PITAGORA
breaksw
case "*.ipp-garching.mpg.de":
case "*.ipp.mpg.de":
case "*.rzg.mpg.de":
echo IPP
breaksw
case "*.mpcdf.mpg.de":
echo MPCDF
breaksw
case "*.ipp-hgw.mpg.de":
echo IPP-HGW
breaksw
case "*.fz-juelich.de":
case "*.ipp.kfa-juelich.de":
echo FZJ
breaksw
case "*.ccfe.ac.uk":
case "*.cumulus.hpc.l":
echo CCFE
breaksw
case "*.data.cluster":
echo "CCFE-csd3"
breaksw
case "*.jet.uk":
case "freia*.hpc.l":
echo JET
breaksw
case "*.mech.kuleuven.be":
case "*.icts.leuven.vsc":
case "*.hpc.kuleuven.be":
set genius=`echo $fullhost | grep -i genius`
if ("$genius" == "") then
echo LEUVEN-WICE
else
echo LEUVEN
endif
breaksw
case "*.snellius.surf.nl":
case "*.bullx":
echo SURFSARA
breaksw
case "*.pppl.gov":
echo PPPL
breaksw
case "*.gat.com":
case "iris*.cluster":
case "saturn*.cluster":
echo GA
breaksw
case "*.wm.edu":
echo WM
breaksw
case "*.nersc.gov":
case "cori*":
echo NERSC
breaksw
case "*.ornl.gov":
case "JLORE*":
case "jlore*":
case "eos*":
case "fusion3":
case "ultrabucky*":
case "*bucky*":
echo ORNL
breaksw
case "*.ipp.cas.cn":
echo ASIPP
breaksw
case "*.nscc-hf.cn":
echo NSCC
breaksw
case "sms.hlsm.local":
echo DLUT
breaksw
case "tylogin0?":
case "tyadmin0?":
echo SCNET
breaksw
case "*.swip.ac.cn":
case "mgmt":
echo SWIP
breaksw
case "*.ipr.res.in":
echo IPR
breaksw
case "iter-india.org":
case "*.iter-india.org":
echo IN-DA
breaksw
case "*.keio.ac.jp":
echo KEIO
breaksw
case "kraken01":
echo KSTAR
breaksw
case "*.spbstu.ru":
case "login1.cluster":
case "n01p*.cluster":
case "plasmatheory48":
echo SPBSTU
breaksw
case "*.mephi.ru":
echo MEPHI
breaksw
case "*.uni-lj.si":
echo UL
breaksw
case "*.tok.ipp.cas.cz":
echo "IPPCR"
breaksw
case "*.cn":
case "*.hk":
case "*.mo":
echo CN_UNKNOWN
breaksw
case "*.eu":
case "*.an":
case "*.at":
case "*.aw":
case "*.ax":
case "*.be":
case "*.bg":
case "*.bl":
case "*.bq":
case "*.cw":
case "*.cy":
case "*.cz":
case "*.de":
case "*.dk":
case "*.ee":
case "*.es":
case "*.fi":
case "*.fo":
case "*.fr":
case "*.gf":
case "*.gp":
case "*.gr":
case "*.hr":
case "*.hu":
case "*.ie":
case "*.it":
case "*.lt":
case "*.lu":
case "*.lv":
case "*.mc":
case "*.mf":
case "*.mq":
case "*.mt":
case "*.nc":
case "*.nl":
case "*.pf":
case "*.pl":
case "*.pm":
case "*.pt":
case "*.re":
case "*.ro":
case "*.se":
case "*.si":
case "*.sk":
case "*.sx":
case "*.tf":
case "*.ua":
case "*.wf":
case "*.yt":
echo EU_UNKNOWN
breaksw
case "*.in":
echo IN_UNKNOWN
breaksw
case "*.jp":
echo JP_UNKNOWN
breaksw
case "*.kr":
echo KR_UNKNOWN
breaksw
case "*.rf":
case "*.ru":
case "*.su:"
echo RF_UNKNOWN
breaksw
case "*.gov":
case "*.edu":
case "*.as":
case "*.gu":
case "*.mp":
case "*.pr":
case "*.um":
case "*.us":
case "*.vi":
echo USA_UNKNOWN
breaksw
case "*.au":
case "*.cc":
case "*.cx":
case "*.hm":
case "*.nf":
echo AU_UNKNOWN
breaksw
case "*.ca":
echo CA_UNKNOWN
breaksw
case "*.kz":
echo KZ_UNKNOWN
breaksw
case "*.ac":
case "*.ai":
case "*.fk":
case "*.gb":
case "*.gg":
case "*.gi":
case "*.gs":
case "*.im":
case "*.io":
case "*.je":
case "*.pn":
case "*.sh":
case "*.uk":
case "*.vg":
echo UK_UNKNOWN
breaksw
case "*.ch":
echo CH_UNKNOWN
breaksw
default:
echo UNKNOWN
endsw