1 | #!/bin/ksh |
---|
2 | # subjob - Plot-Shellskript Version: @(#)SUBJOB 1.0 |
---|
3 | # $Id: subjob 748 2011-08-19 08:04:16Z raasch $ |
---|
4 | |
---|
5 | # Prozedur zum automatischen Generieren von Batch-Jobs, die unter NQS |
---|
6 | # laufen sollen und deren Ergebnis (Dayfile) zum Job-generierenden |
---|
7 | # Host zurueckgeschickt werden sollen |
---|
8 | |
---|
9 | |
---|
10 | # letzte Aenderung: |
---|
11 | # 29/06/94 - Siggi - Beginn mit Erstellung der Originalversion |
---|
12 | # 08/07/94 - Siggi - Originalversion abgeschlossen (Version 1.0) |
---|
13 | # 06/02/98 - Siggi - berte validiert |
---|
14 | # 27/01/01 - Siggi - ground.yonsei.ac.kr validiert, Jobs zur T3E in Korea |
---|
15 | # moeglich |
---|
16 | # 08/02/01 - Siggi - alle subjob-Meldungen ins englische uebersetzt |
---|
17 | # 25/05/02 - Siggi - Unterstuetzung des LoadLeveler |
---|
18 | # 30/05/02 - Siggi - Validierung fuer ibm-Rechner in Seoul (nobel) sowie |
---|
19 | # allgemeine Anpassungen fuer ibm-Rechner |
---|
20 | # 15/10/02 - Siggi - Neue Default-Jobklasse (p_normal) fuer IBM in Seoul |
---|
21 | # Ruecktransfer des Jobprotokolls fuer diese |
---|
22 | # Maschine abgeschaltet |
---|
23 | # 31/10/02 - Siggi - berni validiert |
---|
24 | # 06/11/02 - Siggi - Neue Jobklassen auf ibmb und ibmh |
---|
25 | # 08/11/02 - Siggi - quanero validiert |
---|
26 | # 11/12/02 - Siggi - Notification fuer Transfer-Jobs abgeschaltet |
---|
27 | # 23/01/03 - Siggi - hostname nobel changed to nobela |
---|
28 | # 06/02/03 - Siggi - gregale validated |
---|
29 | # 12/02/03 - Siggi - orkan and maestro validated |
---|
30 | # 21/02/03 - Siggi - all nobel nodes in Seoul validated |
---|
31 | # 12/03/03 - Siggi - nec at DKRZ validated |
---|
32 | # 13/03/03 - Siggi - new nqs resource variable Memory |
---|
33 | # 07/04/03 - Siggi - processor request option -c on nech needs tasks per |
---|
34 | # node |
---|
35 | # 11/04/03 - Siggi - network on ibms has attribute "shared" |
---|
36 | # 31/07/03 - Siggi - nqs2 on nech implemented (provisional: -h nech2) |
---|
37 | # cxxl added to ibmh |
---|
38 | # 29/08/03 - Siggi - changes in job queues and communication system on |
---|
39 | # ibms |
---|
40 | # 24/10/03 - Siggi - using alternate hanni address 130.75.4.2 |
---|
41 | # 30/10/03 - Siggi - nech is not supported any more |
---|
42 | # 10/11/03 - Siggi - nech2 renamed to nech |
---|
43 | # 20/11/03 - Siggi - submit command on nech changed from qsub.test to qsub |
---|
44 | # 29/03/04 - Siggi - ground not supported any more, gfdl3 validated |
---|
45 | # 31/03/04 - Siggi - new option -N for node usage |
---|
46 | # 12/04/04 - Siggi - scp2 instead of scp used for transfer from decalpha |
---|
47 | # due to error in ssh installation (otherwise a prompt |
---|
48 | # for the password appears) |
---|
49 | # 23/07/04 - Siggi - changes due to the new berni configuration |
---|
50 | # (federation switch) |
---|
51 | # 01/09/04 - Gerald new job-classes on hanni |
---|
52 | # 08/09/04 - Siggi - hanni IP address changed to 130.75.4.10 |
---|
53 | # 23/11/04 - Siggi - new job class cdata on hanni and berni |
---|
54 | # 03/12/04 - Siggi - notification on ibm switched of in case of |
---|
55 | # delete_dayfile = true, node usage in cdev set to |
---|
56 | # shared |
---|
57 | # 16/02/05 - Gerald hababai validated |
---|
58 | # 29/03/05 - Micha - new job class channi on hanni |
---|
59 | # 11/05/05 - Siggi - ConsumableMemory is now required as resource keyword |
---|
60 | # on ibms |
---|
61 | # 24/05/05 - Siggi - Default queue on ibms changed from p_normal_1.3 to |
---|
62 | # p_normal |
---|
63 | # 30/06/05 - Siggi - network changed for queue cdev from "us" to "ip" |
---|
64 | # 12/07/05 - Siggi - in network.mpi on ibmh/ibmb "csss" changed to |
---|
65 | # "sn_all", new job class cexp |
---|
66 | # 08/09/05 - Siggi - IP-address of gfdl3 changed |
---|
67 | # 31/10/05 - Siggi - new job class pp on hurricane, serial jobs on |
---|
68 | # hurricane (with -X0) |
---|
69 | # 01/11/05 - Siggi - missing queue for jobs submitted on nech (for nech) |
---|
70 | # added |
---|
71 | # 30/12/05 - Siggi - change of IP adresses in subnet 130.75.105 |
---|
72 | # 09/02/06 - Siggi - ibmy admitted |
---|
73 | # 10/02/06 - Siggi - scp2 changed to /bin/scp on decalpha |
---|
74 | # 13/04/06 - Siggi - ostria admitted |
---|
75 | # 18/04/06 - Siggi - new option -O for OpenMP usage |
---|
76 | # 24/05/06 - Siggi - lctit admitted, ftpjob renamed scpjob |
---|
77 | # 25/07/06 - Siggi - gfdl5 (ibmy) admitted for submitting jobs |
---|
78 | # 27/09/06 - Siggi - breg/hreg extended with berni/hanni |
---|
79 | # 25/10/06 - Siggi - data_limit set to 1.76 GByte on hanni and berni |
---|
80 | # 28/11/06 - Siggi - levanto admitted |
---|
81 | # 13/02/07 - Siggi - hpmuk releated code removed |
---|
82 | # 01/03/07 - Siggi - adjustments for RIAM machines gate and NEC-SX8 (n-sx) |
---|
83 | # 12/04/07 - Siggi - option -f (filetransfer protocol) removed, scp only |
---|
84 | # 27/07/07 - Siggi - autan admitted |
---|
85 | # 03/08/07 - Marcus- lcfimm admitted |
---|
86 | # 08/10/07 - Siggi - further job classes added for hanni (csoloh...) |
---|
87 | # 15/10/07 - Siggi - preliminary adjustments for lctit based on Jin's |
---|
88 | # suggestions |
---|
89 | # 19/10/07 - Marcus- add new optional argument -g group_number |
---|
90 | # 19/10/07 - Siggi - a ";" was missing in the last change done by Marcus |
---|
91 | # 30/10/07 - Marcus- further adjustments for queues on lctit |
---|
92 | # 15/05/08 - Siggi - adjustments for lcxt4 (Bergen Center for Computational |
---|
93 | # Science) |
---|
94 | # 14/07/08 - Siggi - adjustments for lcsgih |
---|
95 | # 23/09/08 - Gerald- paesano admitted |
---|
96 | # 02/10/08 - Siggi - PBS adjustments for lcxt4 |
---|
97 | # 02/03/09 - Siggi - Adjustments for new NEC-SX9 at RIAM |
---|
98 | # 16/04/09 - Marcus- Adjustments for lcsgib and lcsgih |
---|
99 | # 21/04/09 - Siggi - adjustments for new IBM at DKRZ, which is now ibmh |
---|
100 | # 18/05/09 - Siggi - Settings for serial jobs on lcsgi changed |
---|
101 | # 24/06/09 - BjornM- adjustments for lcxt4 (loading modules manually) |
---|
102 | # 08/07/09 - Siggi - option -e added (email notification on lcsgih/b) |
---|
103 | # 20/07/09 - Siggi - On lcsgi, jobs for returning the job protocol are |
---|
104 | # now run on the data nodes (feature=data) |
---|
105 | # 25/08/09 - BjornM- adapted for lck |
---|
106 | # 26/08/09 - Marcus- caurus admitted; optional qos feature hiprio on lcsgi |
---|
107 | # 03/09/09 - Siggi - PBS sgi feature directive only used if explicitly |
---|
108 | # set in the config file by the user |
---|
109 | # 16/10/09 - Carolin-adjustments for archiving on SGI-ICE of binary files; |
---|
110 | # adding special1q |
---|
111 | # 01/12/09 - BjornM- re-adjustments for lcxt4, added sno (130.75.105.113) |
---|
112 | # 16/10/09 - Carolin-adding permq |
---|
113 | # 01/02/10 - Siggi - adapted for lcxt5m and lckyoto (Fujitsu HX600) |
---|
114 | # 03/02/10 - Siggi - bug in serial jobs removed |
---|
115 | # 26/02/10 - BjornM- re-adjustments for lcxt4 (new modules, email |
---|
116 | # notification) |
---|
117 | # 01/03/10 - Siggi - loading of modules controlled by environment variable |
---|
118 | # module_calls |
---|
119 | # 17/08/10 - BjornM- re-adjustments for lcxt4 (location of qsub) |
---|
120 | # 25/08/10 - BjornM- account geofysisk replaced by guest for lcxt4 |
---|
121 | # 25/08/10 - Siggi - new variable project_account in pbs-statements for |
---|
122 | # lcxt4 |
---|
123 | # 08/12/10 - Siggi - initialization of the module command changed for |
---|
124 | # SGI-ICE/lcsgi |
---|
125 | # adjustments for Kyushu Univ. (lcrte, ibmku) |
---|
126 | # 14/12/10 - Siggi - adjustments for new Tsubame system at Tokyo |
---|
127 | # institute of technology (lctit) |
---|
128 | # 02/02/11 - Siggi - further asjustments for Tsubame concerning openMP |
---|
129 | # 06/03/11 - Siggi - adjustments for ibmkisti |
---|
130 | # 17/03/11 - Siggi - adjustments for openmp usage on ibmkisti |
---|
131 | # 03/04/11 - Micha - added lckordi |
---|
132 | # 17/08/11 - Siggi - hicegate0 added |
---|
133 | # 18/08/11 - Siggi - workaround on lcsgi in order to avoid appends to file |
---|
134 | # last_job_transfer_protocol |
---|
135 | |
---|
136 | |
---|
137 | |
---|
138 | # VARIABLENVEREINBARUNGEN + DEFAULTWERTE |
---|
139 | delete_dayfile=false |
---|
140 | email_notification=none |
---|
141 | group_number=none |
---|
142 | locat=normal |
---|
143 | no_default_queue=none |
---|
144 | no_submit=false |
---|
145 | job_catalog="~/job_queue" |
---|
146 | job_name=none |
---|
147 | local_user=$LOGNAME |
---|
148 | node_usage=shared |
---|
149 | numprocs=0 |
---|
150 | punkte="..........................................................." |
---|
151 | submcom=qsub |
---|
152 | queue=default |
---|
153 | remote_host=none |
---|
154 | remote_user="" |
---|
155 | verify=true |
---|
156 | |
---|
157 | typeset -i cputime=0 memory=0 Memory=0 minuten resttime sekunden stunden |
---|
158 | typeset -i inumprocs mpi_tasks=0 nodes=0 processes_per_node=0 tasks_per_node=0 threads_per_task=1 |
---|
159 | typeset -L20 spalte1 |
---|
160 | typeset -R40 spalte2 |
---|
161 | typeset -L60 spalte3 |
---|
162 | |
---|
163 | |
---|
164 | |
---|
165 | # FEHLERBEHANDLUNG |
---|
166 | # BEI EXIT: |
---|
167 | trap 'if [[ $locat != normal ]] |
---|
168 | then |
---|
169 | case $locat in |
---|
170 | (option) printf "\n --> available optios can be displayed" |
---|
171 | printf " by typing:" |
---|
172 | printf "\n \"subjob ?\" \n";; |
---|
173 | (ftpcopy|parameter|scp|verify) printf "\n";; |
---|
174 | (*) printf "\n +++ unknown error" |
---|
175 | printf "\n please inform S. Raasch!\n" |
---|
176 | esac |
---|
177 | [[ -f $job_to_send ]] && rm $job_to_send |
---|
178 | printf "\n\n+++ SUBJOB killed \n\n" |
---|
179 | fi' exit |
---|
180 | |
---|
181 | |
---|
182 | # BEI TERMINAL-BREAK: |
---|
183 | trap '[[ -f $job_to_send ]] && rm $job_to_send |
---|
184 | printf "\n\n+++ SUBJOB killed \n\n" |
---|
185 | exit |
---|
186 | ' 2 |
---|
187 | |
---|
188 | |
---|
189 | |
---|
190 | |
---|
191 | # LOKALEN HOSTNAMEN FESTSTELLEN |
---|
192 | local_host=$(hostname) |
---|
193 | |
---|
194 | |
---|
195 | |
---|
196 | # HOSTSPEZIFISCHE VARIABLEN VEREINBAREN BZW. PRUEFEN, OB LOKALER HOST |
---|
197 | # UEBERHAUPT ZULAESSIG IST |
---|
198 | # Note: One of the entries for "lck" or "lckordi" always has to be |
---|
199 | # comment out, because the hostname (node*) is same for both machines |
---|
200 | case $local_host in |
---|
201 | (atmos) local_addres=172.20.25.35; local_host=lcide;; |
---|
202 | (autan) local_addres=130.75.105.57; local_host=lcmuk;; |
---|
203 | (bora) local_addres=130.75.105.103; local_host=lcmuk;; |
---|
204 | (bd1) local_addres=130.73.232.64; local_host=lcsgib;; |
---|
205 | (bd2) local_addres=130.73.232.65; local_host=lcsgib;; |
---|
206 | (bd3) local_addres=130.73.232.66; local_host=lcsgib;; |
---|
207 | (bd4) local_addres=130.73.232.67; local_host=lcsgib;; |
---|
208 | (b01*|bicegate1) local_addres=130.73.232.102; local_host=lcsgib;; |
---|
209 | (bicegate2) local_addres=130.73.232.103; local_host=lcsgib;; |
---|
210 | (breva) local_addres=130.75.105.98; local_host=lcmuk;; |
---|
211 | (bicegate2) local_addres=130.73.232.103; local_host=lcsgib;; |
---|
212 | (caurus) local_addres=130.75.105.19; local_host=lcmuk;; |
---|
213 | (climate*) local_addres=165.132.26.68; local_host=lcyon;; |
---|
214 | (compute-*.local) local_addres=172.20.4.2; local_host=lcfimm;; |
---|
215 | (cs*) local_addres=136.172.44.131; local_host=nech;; |
---|
216 | (elephanta) local_addres=130.75.105.6; local_host=lcmuk;; |
---|
217 | (fimm.bccs.uib.no) local_addres=172.20.4.2; local_host=lcfimm;; |
---|
218 | (node*) local_addres=165.132.26.61 local_host=lck;; |
---|
219 | # (node*) local_addres=210.219.61.8 local_host=lckordi;; |
---|
220 | (gaia*) local_addres=150.183.146.24; local_host=ibmkisti;; |
---|
221 | (gallego) local_addres=130.75.105.10; local_host=lcmuk;; |
---|
222 | (gfdl5) local_addres=165.132.26.58; local_host=ibmy;; |
---|
223 | (gfdl3.yonsei.ac.kr) local_addres=165.132.26.56; local_host=decalpha;; |
---|
224 | (gregale) local_addres=130.75.105.109; local_host=lcmuk;; |
---|
225 | (hababai) local_addres=130.75.105.108; local_host=lcmuk;; |
---|
226 | (hexagon.bccs.uib.no) local_addres=129.177.20.113; local_host=lcxt4;; |
---|
227 | (hd1) local_addres=130.75.4.104; local_host=lcsgih;; |
---|
228 | (hd2) local_addres=130.75.4.105; local_host=lcsgih;; |
---|
229 | (hd3) local_addres=130.75.4.106; local_host=lcsgih;; |
---|
230 | (hd4) local_addres=130.75.4.107; local_host=lcsgih;; |
---|
231 | (hicegate0) local_addres=130.75.4.101; local_host=lcsgih;; |
---|
232 | (h01*|hicegate1) local_addres=130.75.4.102; local_host=lcsgih;; |
---|
233 | (hicegate2) local_addres=130.75.4.103; local_host=lcsgih;; |
---|
234 | (hx*) local_addres=133.3.51.11; local_host=lckyoto;; |
---|
235 | (blizzard1) local_addres=136.172.40.15; local_host=ibmh;; |
---|
236 | (irifi) local_addres=130.75.105.104; local_host=lcmuk;; |
---|
237 | (sno) local_addres=130.75.105.113; local_host=lcmuk;; |
---|
238 | (levanto) local_addres=130.75.105.45; local_host=lcmuk;; |
---|
239 | (maestro) local_addres=130.75.105.2; local_host=lcmuk;; |
---|
240 | (meteo-login*) local_addres=193.166.211.144;local_host=lcxt5m;; |
---|
241 | (nid*) local_addres=129.177.20.113; local_host=lcxt4;; |
---|
242 | (nobel*) local_addres=150.183.5.101; local_host=ibms;; |
---|
243 | (orkan) local_addres=130.75.105.3; local_host=lcmuk;; |
---|
244 | (ostria) local_addres=130.75.105.106; local_host=lcmuk;; |
---|
245 | (paesano) local_addres=130.75.105.46; local_host=lcmuk;; |
---|
246 | (quanero) local_addres=130.75.105.107; local_host=lcmuk;; |
---|
247 | (rte*) local_addres=133.5.185.60; local_host=lcrte;; |
---|
248 | (scirocco) local_addres=172.20.25.41; local_host=lcmuk;; |
---|
249 | (sun1|sun2) local_addres=130.75.6.1; local_host=unics;; |
---|
250 | (sx-*) local_addres=172.16.1.131; local_host=necriam;; |
---|
251 | (r1*) local_addres=130.75.4.102; local_host=lcsgih;; |
---|
252 | (r2*) local_addres=130.73.232.102; local_host=lcsgib;; |
---|
253 | (t2a*) local_addres=10.1.6.165; local_host=lctit;; |
---|
254 | (vorias) local_addres=172.20.25.43; local_host=lcmuk;; |
---|
255 | (*.cc.kyushu-u.ac.jp) local_addres=133.5.4.129; local_host=ibmku;; |
---|
256 | (*) printf "\n +++ \"$local_host\" unknown"; |
---|
257 | printf "\n please inform S. Raasch!"; |
---|
258 | locat=parameter; exit;; |
---|
259 | esac |
---|
260 | |
---|
261 | |
---|
262 | |
---|
263 | # REMOTE HOST DEFAULTMAESSIG = LOCAL HOST SETZEN |
---|
264 | remote_host=$local_host |
---|
265 | |
---|
266 | |
---|
267 | |
---|
268 | |
---|
269 | # PROZEDUROPTIONEN EINLESEN |
---|
270 | while getopts :c:dDe:g:h:m:n:N:O:q:t:T:u:vX: option |
---|
271 | do |
---|
272 | case $option in |
---|
273 | (c) job_catalog=$OPTARG;; |
---|
274 | (d) delete_dayfile=true;; |
---|
275 | (D) no_submit=true;; |
---|
276 | (e) email_notification=$OPTARG;; |
---|
277 | (g) group_number=$OPTARG;; |
---|
278 | (h) remote_host=$OPTARG;; |
---|
279 | (m) memory=$OPTARG;; |
---|
280 | (n) job_name=$OPTARG;; |
---|
281 | (N) node_usage=$OPTARG;; |
---|
282 | (O) threads_per_task=$OPTARG;; |
---|
283 | (q) no_default_queue=$OPTARG;; |
---|
284 | (t) cputime=$OPTARG;; |
---|
285 | (T) tasks_per_node=$OPTARG;; |
---|
286 | (u) remote_user=$OPTARG;; |
---|
287 | (v) verify=false;; |
---|
288 | (X) numprocs=$OPTARG;; |
---|
289 | (\?) printf "\n +++ Option $OPTARG unknown \n"; |
---|
290 | locat=option; exit;; |
---|
291 | esac |
---|
292 | done |
---|
293 | |
---|
294 | |
---|
295 | # JOBDATEINAMEN ALS NAECHSTES ARGUMENT HOLEN |
---|
296 | shift OPTIND-1; file_to_send=$1 |
---|
297 | |
---|
298 | |
---|
299 | # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN |
---|
300 | if [ "$1" = "?" ] |
---|
301 | then |
---|
302 | (printf "\n *** subjob can be called as follows:\n" |
---|
303 | printf "\n subjob -c.. -d -D -h.. -m.. -q.. -t.. -u.. -v <jobfile>\n" |
---|
304 | printf "\n Description of available options:\n" |
---|
305 | printf "\n Option Description Default-Value" |
---|
306 | printf "\n -c job-input- and output-catalog ~/job_queue" |
---|
307 | printf "\n -d no job-protocol will be created ---" |
---|
308 | printf "\n -D only the job-file will be created ---" |
---|
309 | printf "\n -h execution host, available hosts: $remote_host" |
---|
310 | printf "\n ibm, ibmh, ibmkisti, ibmku, ibms, ibmy, lc...," |
---|
311 | printf "\n lctit, nech, necriam, unics" |
---|
312 | printf "\n -m memory demand per process in MByte ---" |
---|
313 | printf "\n -n jobname <jobdatei>" |
---|
314 | printf "\n -O threads per task (for OpenMP usage) 1" |
---|
315 | printf "\n -q job-queue to be used default" |
---|
316 | printf "\n -t allowed cpu-time in seconds ---" |
---|
317 | printf "\n -T tasks per node (on parallel hosts) ---" |
---|
318 | printf "\n -u username on execution host from .netrc" |
---|
319 | printf "\n -v no prompt for confirmation ---" |
---|
320 | printf "\n -X # of processors (on parallel hosts) 1" |
---|
321 | printf "\n " |
---|
322 | printf "\n The only possible positional parameter is <jobfile>:" |
---|
323 | printf "\n The complete NQS-job must be provided here." |
---|
324 | printf "\n <jobfile>=? creates this outline\n\n") | more |
---|
325 | exit |
---|
326 | fi |
---|
327 | |
---|
328 | |
---|
329 | |
---|
330 | # PRUEFEN, OB JOBDATEI ANGEGEBEN WURDE UND OB SIE AUCH EXISTIERT |
---|
331 | if [[ "$file_to_send" = "" ]] |
---|
332 | then |
---|
333 | printf "\n +++ job-file missing" |
---|
334 | locat=parameter; exit |
---|
335 | else |
---|
336 | if [[ -f $file_to_send ]] |
---|
337 | then |
---|
338 | true |
---|
339 | else |
---|
340 | printf "\n +++ job-file: " |
---|
341 | printf "\n $file_to_send" |
---|
342 | printf "\n does not exist" |
---|
343 | locat=parameter; exit |
---|
344 | fi |
---|
345 | fi |
---|
346 | |
---|
347 | |
---|
348 | |
---|
349 | # FALLS KEIN JOBNAME ANGEGEBEN WURDE, WIRD JOBNAME = JOBDATEINAME |
---|
350 | # GESETZT. VORAUSSETZUNG: JOBDATEINAME BEINHALTET KEINE PFADE |
---|
351 | if [[ $job_name = none ]] |
---|
352 | then |
---|
353 | job_name=$file_to_send |
---|
354 | fi |
---|
355 | if [[ $(echo $job_name | grep -c "/") != 0 ]] |
---|
356 | then |
---|
357 | printf "\n +++ job-file name: " |
---|
358 | printf "\n $job_name" |
---|
359 | printf "\n must not contain \"/\"-characters" |
---|
360 | locat=parameter; exit |
---|
361 | fi |
---|
362 | |
---|
363 | |
---|
364 | |
---|
365 | |
---|
366 | # HOSTSPEZIFISCHE GROESSEN VEREINBAREN BZW. ABBRUCH BEI UNZULAESSIGEM HOST |
---|
367 | # ODER WENN HOST NICHT ANGEGEBEN WURDE |
---|
368 | if [[ $remote_host = none ]] |
---|
369 | then |
---|
370 | printf "\n +++ host missing" |
---|
371 | locat=option; exit |
---|
372 | else |
---|
373 | case $remote_host in |
---|
374 | (ibm) queue=p690_standard; remote_addres=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
375 | (ibmh) queue=no_class; remote_addres=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
376 | (ibmkisti) queue=class.32plus; remote_addres=150.183.146.24; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
377 | (ibmku) queue=s4; remote_addres=133.5.4.129; submcom=/usr/local/bin/llsubmit;; |
---|
378 | (ibms) queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
379 | (ibmy) queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
380 | (lcfimm) remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;; |
---|
381 | (lckyoto) remote_addres=133.3.51.11; submcom=/thin/local/bin/qsub;; |
---|
382 | (lcsgib) queue=smallq; remote_addres=130.73.232.104; submcom=/opt/moab/bin/msub;; |
---|
383 | (lcsgih) queue=smallq; remote_addres=130.75.4.101; submcom=/opt/moab/bin/msub;; |
---|
384 | (lck) remote_addres=165.132.26.61; submcom=/usr/torque/bin/qsub;; |
---|
385 | (lckordi) remote_addres=210.219.61.8; submcom=/usr/torque/bin/qsub;; |
---|
386 | (lctit) queue=S; remote_addres=10.1.6.165; submcom=/opt/pbs/tools/bin/t2sub;; |
---|
387 | (lcxt4) remote_addres=129.177.20.113; submcom=/opt/torque/2.4.9-snap.201005191035/bin/qsub;; |
---|
388 | (lcxt5m) remote_addres=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;; |
---|
389 | (lcyon) remote_addres=165.132.26.68; submcom=/usr/torque/bin/qsub;; |
---|
390 | (nech) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=136.172.44.147; submcom="/usr/local/bin/qsub";; |
---|
391 | (necriam) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=172.16.1.131; submcom="/usr/bin/nqsII/qsub";; |
---|
392 | (vpp) qsubmem=m; qsubtime=t; queue=vpp; remote_addres=130.75.4.130;; |
---|
393 | (unics) qsubmem=d; qsubtime=t; queue=unics; remote_addres=130.75.6.1;; |
---|
394 | (*) printf "\n +++ hostname \"$remote_host\" not allowed"; |
---|
395 | locat=parameter; exit;; |
---|
396 | esac |
---|
397 | fi |
---|
398 | |
---|
399 | |
---|
400 | # EVTL. PRUEFEN, OB ANGEGEBENE QUEUE ZULAESSIG IST |
---|
401 | if [[ $no_default_queue != none ]] |
---|
402 | then |
---|
403 | error=false |
---|
404 | ndq=$no_default_queue |
---|
405 | case $remote_host in |
---|
406 | (ibm) case $ndq in |
---|
407 | (p690_express|p690_standard|p690_long) error=false;; |
---|
408 | (*) error=true;; |
---|
409 | esac;; |
---|
410 | (ibmh) case $ndq in |
---|
411 | (no_class) error=false;; |
---|
412 | (*) error=true;; |
---|
413 | esac;; |
---|
414 | (ibmkisti) case $ndq in |
---|
415 | (class.32plus|class.1-2|class.2-32) error=false;; |
---|
416 | (*) error=true;; |
---|
417 | esac;; |
---|
418 | (ibmku) case $ndq in |
---|
419 | (sdbg1|sdbg2|sdbg4|s4|s16|s32|s32-s) error=false;; |
---|
420 | (*) error=true;; |
---|
421 | esac;; |
---|
422 | (ibms) case $ndq in |
---|
423 | (express|normal|p_express|p_normal|p_normal_1.3|p_normal_1.7|grand) error=false;; |
---|
424 | (*) error=true;; |
---|
425 | esac;; |
---|
426 | (ibmy) case $ndq in |
---|
427 | (parallel) error=false;; |
---|
428 | (*) error=true;; |
---|
429 | esac;; |
---|
430 | (lckyoto) case $ndq in |
---|
431 | (eh|ph) error=false;; |
---|
432 | (*) error=true;; |
---|
433 | esac;; |
---|
434 | (lcsgib|lcsgih) case $ndq in |
---|
435 | (testq|serialq|smallq|mediumq|bigq|workq|dataq|permq|special1q) error=false;; |
---|
436 | (*) error=true;; |
---|
437 | esac;; |
---|
438 | (lctit) case $ndq in |
---|
439 | (G|L128|L256|L512H|S|S96|V) error=false;; |
---|
440 | (*) error=true;; |
---|
441 | esac;; |
---|
442 | (t3eb) case $ndq in |
---|
443 | (berte|p50|p100|p392|forfree|p25himem) error=false;; |
---|
444 | (*) error=true;; |
---|
445 | esac;; |
---|
446 | (necriam) case $ndq in |
---|
447 | (SP|SS|P6) error=false;; |
---|
448 | (*) error=true;; |
---|
449 | esac;; |
---|
450 | (t3eh) case $ndq in |
---|
451 | (para_t3e|em|k|l|lm|comp_t3e|c|p|ht) error=false;; |
---|
452 | (*) error=true;; |
---|
453 | esac;; |
---|
454 | (t3ej2|t3ej5) case $ndq in |
---|
455 | (low|normal|high) error=false;; |
---|
456 | (*) error=true;; |
---|
457 | esac;; |
---|
458 | (t3es) case $ndq in |
---|
459 | (batch|serial-4|pe4|p48|pe16|pe32|pe64|pe128) error=false;; |
---|
460 | (*) error=true;; |
---|
461 | esac;; |
---|
462 | (unics) case $ndq in |
---|
463 | (unics|ht) error=false;; |
---|
464 | (*) error=true;; |
---|
465 | esac;; |
---|
466 | esac |
---|
467 | if [[ $error = true ]] |
---|
468 | then |
---|
469 | printf "\n +++ queue \"$no_default_queue\" on host \"$remote_host\" not allowed" |
---|
470 | locat=parameter; exit |
---|
471 | else |
---|
472 | queue=$no_default_queue |
---|
473 | fi |
---|
474 | fi |
---|
475 | |
---|
476 | |
---|
477 | |
---|
478 | # PRUEFEN DER CPU-ZEIT, ZEIT NACH STUNDEN, MINUTEN UND SEKUNDEN |
---|
479 | # AUFTEILEN |
---|
480 | done=false |
---|
481 | while [[ $done = false ]] |
---|
482 | do |
---|
483 | if (( $cputime <= 0 )) |
---|
484 | then |
---|
485 | printf "\n +++ wrong cpu-time or cpu-time missing" |
---|
486 | printf "\n >>> Please type cpu-time in seconds as INTEGER:" |
---|
487 | printf "\n >>> " |
---|
488 | read cputime 1>/dev/null 2>&1 |
---|
489 | else |
---|
490 | done=true |
---|
491 | fi |
---|
492 | done |
---|
493 | if [[ $remote_host = nech ]] |
---|
494 | then |
---|
495 | if (( tasks_per_node != 0 )) |
---|
496 | then |
---|
497 | (( cputime = cputime * tasks_per_node )) |
---|
498 | elif [[ $numprocs != 0 ]] |
---|
499 | then |
---|
500 | (( cputime = cputime * numprocs )) |
---|
501 | fi |
---|
502 | fi |
---|
503 | (( stunden = cputime / 3600 )) |
---|
504 | (( resttime = cputime - stunden * 3600 )) |
---|
505 | (( minuten = resttime / 60 )) |
---|
506 | (( sekunden = resttime - minuten * 60 )) |
---|
507 | timestring=${stunden}:${minuten}:${sekunden} |
---|
508 | |
---|
509 | |
---|
510 | |
---|
511 | # PRUEFEN DER KERNSPEICHERANFORDERUNG |
---|
512 | done=false |
---|
513 | while [[ $done = false ]] |
---|
514 | do |
---|
515 | if (( memory <= 0 )) |
---|
516 | then |
---|
517 | printf "\n +++ wrong memory demand or memory demand missing" |
---|
518 | printf "\n >>> Please type memory in MByte per process as INTEGER:" |
---|
519 | printf "\n >>> " |
---|
520 | read memory 1>/dev/null 2>&1 |
---|
521 | else |
---|
522 | done=true |
---|
523 | fi |
---|
524 | done |
---|
525 | |
---|
526 | if [[ $remote_host = nech || $remote_host = necriam ]] |
---|
527 | then |
---|
528 | if (( tasks_per_node != 0 )) |
---|
529 | then |
---|
530 | (( Memory = memory * tasks_per_node / 1000 )) |
---|
531 | elif [[ $numprocs != 0 ]] |
---|
532 | then |
---|
533 | (( Memory = memory * numprocs / 1000 )) |
---|
534 | else |
---|
535 | (( Memory = memory / 1000 )) |
---|
536 | fi |
---|
537 | elif [[ $remote_host = lctit ]] |
---|
538 | then |
---|
539 | (( Memory = memory * tasks_per_node / 1000 )) |
---|
540 | fi |
---|
541 | |
---|
542 | |
---|
543 | # SPEICHERBERECHNUNG BEI OPENMP-NUTZUNG |
---|
544 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
545 | then |
---|
546 | (( memory = memory * threads_per_task )) |
---|
547 | fi |
---|
548 | |
---|
549 | |
---|
550 | # BERECHNUNG DER ANZAHL DER ZU VERWENDENDEN KNOTEN |
---|
551 | if (( tasks_per_node != 0 )) |
---|
552 | then |
---|
553 | (( nodes = numprocs / ( tasks_per_node * threads_per_task ) )) |
---|
554 | fi |
---|
555 | |
---|
556 | # Calculate number of processes per node |
---|
557 | (( processes_per_node = tasks_per_node * threads_per_task )) |
---|
558 | |
---|
559 | # Calculate number of MPI tasks |
---|
560 | (( mpi_tasks = numprocs / threads_per_task )) |
---|
561 | |
---|
562 | |
---|
563 | # HEADER-AUSGABE |
---|
564 | if [[ $verify = true ]] |
---|
565 | then |
---|
566 | printf "\n\n" |
---|
567 | printf "#--------------------------------------------------------------# \n" |
---|
568 | spalte1=SUBJOB;spalte2=$(date) |
---|
569 | printf "| $spalte1$spalte2 | \n" |
---|
570 | printf "| | \n" |
---|
571 | printf "| values of parameters/options: | \n" |
---|
572 | spalte1=local_host$punkte; spalte2=$punkte$local_host |
---|
573 | printf "| $spalte1$spalte2 | \n" |
---|
574 | spalte1=remote_host$punkte; spalte2=$punkte$remote_host |
---|
575 | printf "| $spalte1$spalte2 | \n" |
---|
576 | spalte1=queue$punkte; spalte2=$punkte$queue |
---|
577 | printf "| $spalte1$spalte2 | \n" |
---|
578 | spalte1=memory$punkte; spalte2="$punkte$memory mb" |
---|
579 | printf "| $spalte1$spalte2 | \n" |
---|
580 | spalte1=cputime$punkte; spalte2="$punkte$cputime sec" |
---|
581 | printf "| $spalte1$spalte2 | \n" |
---|
582 | spalte1=job_name$punkte; spalte2="$punkte$job_name" |
---|
583 | printf "| $spalte1$spalte2 | \n" |
---|
584 | printf "#--------------------------------------------------------------# \n\n" |
---|
585 | |
---|
586 | |
---|
587 | # KONTROLLABFRAGE, OB ALLES O.K. |
---|
588 | antwort="dummy" |
---|
589 | while [[ $antwort != y && $antwort != Y && $antwort != n && $antwort != N ]] |
---|
590 | do |
---|
591 | read antwort?" >>> continue (y/n) ? " |
---|
592 | done |
---|
593 | if [[ $antwort = n || $antwort = N ]] |
---|
594 | then |
---|
595 | locat=verify; exit |
---|
596 | fi |
---|
597 | printf "\n" |
---|
598 | fi |
---|
599 | |
---|
600 | |
---|
601 | |
---|
602 | # ZUFALLSKENNUNG GENERIEREN UND JOBNAMEN AUF ZIELRECHNER BESTIMMEN |
---|
603 | kennung=$RANDOM |
---|
604 | job_on_remhost=${job_name}_${kennung}_$local_host |
---|
605 | job_to_send=job_to_send_$kennung |
---|
606 | if [[ $delete_dayfile = false ]] |
---|
607 | then |
---|
608 | remote_dayfile=${local_host}_${job_name}_result_$kennung |
---|
609 | local_dayfile=${remote_host}_${job_name} |
---|
610 | else |
---|
611 | remote_dayfile=/dev/null |
---|
612 | fi |
---|
613 | |
---|
614 | |
---|
615 | |
---|
616 | # Generate the batch job scripts (qsub/msub/LoadLeveler) |
---|
617 | if [[ $(echo $remote_host | cut -c1-3) = ibm && $numprocs != 0 ]] |
---|
618 | then |
---|
619 | |
---|
620 | # General LoadLeveler settings |
---|
621 | execute_in_shell="#!/bin/ksh" |
---|
622 | use_shell="# @ shell = /bin/ksh" |
---|
623 | consumable_memory="ConsumableMemory($memory mb)" |
---|
624 | class="# @ class = $queue" |
---|
625 | environment="# @ environment = OMP_NUM_THREADS=$threads_per_task; MP_SHARED_MEMORY=yes" |
---|
626 | network_to_use="# @ network.mpi = sn_all,shared,us" |
---|
627 | data_limit="# @ data_limit = 1.76gb" |
---|
628 | image_size="# @ image_size = 50" |
---|
629 | wall_clock_limit="# @ wall_clock_limit = ${timestring},$timestring" |
---|
630 | |
---|
631 | if [[ $email_notification = none ]] |
---|
632 | then |
---|
633 | notify_user="" |
---|
634 | else |
---|
635 | notify_user="# @ notify_user = $email_notification" |
---|
636 | if [[ $delete_dayfile = true ]] |
---|
637 | then |
---|
638 | notification='# @ notification = never' |
---|
639 | fi |
---|
640 | fi |
---|
641 | |
---|
642 | if [[ $remote_host = ibmh ]] |
---|
643 | then |
---|
644 | data_limit="" |
---|
645 | network_to_use="" |
---|
646 | class="" |
---|
647 | environment="" |
---|
648 | elif [[ $remote_host = ibmkisti ]] |
---|
649 | then |
---|
650 | network_to_use="# @ network.MPI = sn_all,shared,US" |
---|
651 | wall_clock_limit="# @ wall_clock_limit = $timestring" |
---|
652 | if [[ $threads_per_task = 1 ]] |
---|
653 | then |
---|
654 | rset="# @ rset = RSET_MCM_AFFINITY" |
---|
655 | mcm_affinity_options="# @ mcm_affinity_options = mcm_mem_pref mcm_sni_none mcm_distribute" |
---|
656 | fi |
---|
657 | environment="" |
---|
658 | use_shell="" |
---|
659 | data_limit="" |
---|
660 | image_size="" |
---|
661 | elif [[ $remote_host = ibmku ]] |
---|
662 | then |
---|
663 | execute_in_shell="#!/usr/bin/ksh" |
---|
664 | use_shell="# @ shell = /usr/bin/ksh" |
---|
665 | consumable_memory="" |
---|
666 | environment="" |
---|
667 | network_to_use="# @ network.mpi = sn_all,shared,us" |
---|
668 | data_limit="" |
---|
669 | image_size="" |
---|
670 | elif [[ $remote_host = ibms ]] |
---|
671 | then |
---|
672 | network_to_use="# @ network.mpi = csss,shared,us" |
---|
673 | elif [[ $remote_host = ibmy ]] |
---|
674 | then |
---|
675 | consumable_memory="" |
---|
676 | network_to_use="" |
---|
677 | fi |
---|
678 | |
---|
679 | cat > $job_to_send << %%END%% |
---|
680 | $execute_in_shell |
---|
681 | $use_shell |
---|
682 | |
---|
683 | # @ job_type = parallel |
---|
684 | # @ job_name = $job_name |
---|
685 | # @ resources = ConsumableCpus($threads_per_task) $consumable_memory |
---|
686 | # @ output = $remote_dayfile |
---|
687 | # @ error = $remote_dayfile |
---|
688 | $wall_clock_limit |
---|
689 | $image_size |
---|
690 | $class |
---|
691 | $environment |
---|
692 | $network_to_use |
---|
693 | $data_limit |
---|
694 | $rset |
---|
695 | $mcm_affinity_options |
---|
696 | $notification |
---|
697 | $notify_user |
---|
698 | |
---|
699 | %%END%% |
---|
700 | |
---|
701 | if (( nodes > 0 )) |
---|
702 | then |
---|
703 | |
---|
704 | if [[ $remote_host != ibmkisti ]] |
---|
705 | then |
---|
706 | |
---|
707 | cat >> $job_to_send << %%END%% |
---|
708 | # @ node = $nodes |
---|
709 | # @ tasks_per_node = $processes_per_node |
---|
710 | # @ node_usage = $node_usage |
---|
711 | # @ queue |
---|
712 | |
---|
713 | %%END%% |
---|
714 | |
---|
715 | else |
---|
716 | |
---|
717 | cat >> $job_to_send << %%END%% |
---|
718 | # @ total_tasks = $mpi_tasks |
---|
719 | # @ blocking = unlimited |
---|
720 | # @ queue |
---|
721 | |
---|
722 | %%END%% |
---|
723 | |
---|
724 | fi |
---|
725 | |
---|
726 | else |
---|
727 | |
---|
728 | if [[ $remote_host != ibmy ]] |
---|
729 | then |
---|
730 | |
---|
731 | cat >> $job_to_send << %%END%% |
---|
732 | # @ blocking = unlimited |
---|
733 | # @ total_tasks = $numprocs |
---|
734 | # @ node_usage = $node_usage |
---|
735 | # @ queue |
---|
736 | |
---|
737 | %%END%% |
---|
738 | |
---|
739 | else |
---|
740 | |
---|
741 | cat >> $job_to_send << %%END%% |
---|
742 | # @ node = 1 |
---|
743 | # @ total_tasks = $numprocs |
---|
744 | # @ queue |
---|
745 | |
---|
746 | %%END%% |
---|
747 | |
---|
748 | fi |
---|
749 | |
---|
750 | fi |
---|
751 | |
---|
752 | # workaround because of silly job filter on ibmkisti |
---|
753 | if [[ $remote_host = ibmkisti && $threads_per_task != 1 ]] |
---|
754 | then |
---|
755 | echo "export OMP_NUM_THREADS=$threads_per_task" >> $job_to_send |
---|
756 | fi |
---|
757 | |
---|
758 | elif [[ $(echo $remote_host | cut -c1-3) = ibm && $numprocs = 0 ]] |
---|
759 | then |
---|
760 | |
---|
761 | cat > $job_to_send << %%END%% |
---|
762 | #!/bin/ksh |
---|
763 | |
---|
764 | # @ job_type = serial |
---|
765 | # @ node_usage = $node_usage |
---|
766 | # @ job_name = palm |
---|
767 | # @ wall_clock_limit = ${timestring},$timestring |
---|
768 | # @ resources = ConsumableCpus(1) ConsumableMemory(1 gb) |
---|
769 | # @ output = $remote_dayfile |
---|
770 | # @ error = $remote_dayfile |
---|
771 | $class |
---|
772 | $notification |
---|
773 | |
---|
774 | # @ queue |
---|
775 | |
---|
776 | %%END%% |
---|
777 | |
---|
778 | elif [[ $remote_host = lcfimm ]] |
---|
779 | then |
---|
780 | |
---|
781 | if [[ $numprocs != 0 ]] |
---|
782 | then |
---|
783 | cat > $job_to_send << %%END%% |
---|
784 | #!/bin/ksh |
---|
785 | #PBS -N $job_name |
---|
786 | #PBS -A $project_account |
---|
787 | #PBS -l walltime=$timestring |
---|
788 | #PBS -l nodes=${nodes}:ppn=$processes_per_node |
---|
789 | #PBS -l pmem=${memory}mb |
---|
790 | #PBS -m abe |
---|
791 | #PBS -o $remote_dayfile |
---|
792 | #PBS -j oe |
---|
793 | mpd & |
---|
794 | |
---|
795 | %%END%% |
---|
796 | |
---|
797 | else |
---|
798 | cat > $job_to_send << %%END%% |
---|
799 | #!/bin/ksh |
---|
800 | #PBS -N $job_name |
---|
801 | #PBS -A $project_account |
---|
802 | #PBS -l walltime=$timestring |
---|
803 | #PBS -l ncpus=1 |
---|
804 | #PBS -l pmem=${memory}mb |
---|
805 | #PBS -m abe |
---|
806 | #PBS -o $remote_dayfile |
---|
807 | #PBS -j oe |
---|
808 | |
---|
809 | %%END%% |
---|
810 | |
---|
811 | fi |
---|
812 | |
---|
813 | elif [[ $remote_host = lck || $remote_host = lckordi ]] |
---|
814 | then |
---|
815 | |
---|
816 | if [[ $numprocs != 0 ]] |
---|
817 | then |
---|
818 | cat > $job_to_send << %%END%% |
---|
819 | #!/bin/ksh |
---|
820 | #PBS -N $job_name |
---|
821 | #PBS -l walltime=$timestring |
---|
822 | #PBS -l ncpus=$numprocs |
---|
823 | #PBS -l pmem=${memory}mb |
---|
824 | #PBS -o $remote_dayfile |
---|
825 | #PBS -j oe |
---|
826 | |
---|
827 | mpd & |
---|
828 | |
---|
829 | %%END%% |
---|
830 | |
---|
831 | else |
---|
832 | cat > $job_to_send << %%END%% |
---|
833 | #!/bin/ksh |
---|
834 | #PBS -N $job_name |
---|
835 | #PBS -l walltime=$timestring |
---|
836 | #PBS -l ncpus=1 |
---|
837 | #PBS -l pmem=${memory}mb |
---|
838 | #PBS -o $remote_dayfile |
---|
839 | #PBS -j oe |
---|
840 | |
---|
841 | %%END%% |
---|
842 | |
---|
843 | fi |
---|
844 | |
---|
845 | elif [[ $remote_host = lcyon ]] |
---|
846 | then |
---|
847 | |
---|
848 | if [[ $numprocs != 0 ]] |
---|
849 | then |
---|
850 | cat > $job_to_send << %%END%% |
---|
851 | #!/bin/ksh |
---|
852 | #PBS -N $job_name |
---|
853 | #PBS -l walltime=$timestring |
---|
854 | #PBS -l ncpus=$numprocs |
---|
855 | #PBS -l pmem=${memory}mb |
---|
856 | #PBS -o $remote_dayfile |
---|
857 | #PBS -j oe |
---|
858 | |
---|
859 | %%END%% |
---|
860 | |
---|
861 | else |
---|
862 | cat > $job_to_send << %%END%% |
---|
863 | #!/bin/ksh |
---|
864 | #PBS -N $job_name |
---|
865 | #PBS -l walltime=$timestring |
---|
866 | #PBS -l ncpus=1 |
---|
867 | #PBS -l pmem=${memory}mb |
---|
868 | #PBS -o $remote_dayfile |
---|
869 | #PBS -j oe |
---|
870 | |
---|
871 | %%END%% |
---|
872 | |
---|
873 | fi |
---|
874 | |
---|
875 | elif [[ $remote_host = lcsgih || $remote_host = lcsgib ]] |
---|
876 | then |
---|
877 | |
---|
878 | if [[ "$sgi_feature" != "" ]] |
---|
879 | then |
---|
880 | feature_directive="#PBS -l feature=$sgi_feature" |
---|
881 | else |
---|
882 | feature_directive="" |
---|
883 | fi |
---|
884 | |
---|
885 | if [[ $queue = dataq || $queue = permq ]] |
---|
886 | then |
---|
887 | feature_directive="#PBS -l feature=data" |
---|
888 | fi |
---|
889 | |
---|
890 | if [[ $queue = testq || $queue = workq || $queue = dataq || $queue = permq || $queue = serialq || $queue = special1q ]] |
---|
891 | then |
---|
892 | queue_directive="#PBS -q $queue" |
---|
893 | else |
---|
894 | queue_directive="" |
---|
895 | fi |
---|
896 | |
---|
897 | if [[ $email_notification = none ]] |
---|
898 | then |
---|
899 | email_directive="" |
---|
900 | else |
---|
901 | email_directive="#PBS -M $email_notification" |
---|
902 | fi |
---|
903 | |
---|
904 | if [[ $numprocs != 0 ]] |
---|
905 | then |
---|
906 | cat > $job_to_send << %%END%% |
---|
907 | #!/bin/bash |
---|
908 | #PBS -N $job_name |
---|
909 | #PBS -l walltime=$timestring |
---|
910 | #PBS -l nodes=$nodes:ppn=${processes_per_node} |
---|
911 | #PBS -l naccesspolicy=$node_usage |
---|
912 | #PBS -o $remote_dayfile |
---|
913 | #PBS -j oe |
---|
914 | $feature_directive |
---|
915 | $queue_directive |
---|
916 | $email_directive |
---|
917 | |
---|
918 | eval \`/sw/swdist/bin/modulesinit\` |
---|
919 | #. /usr/share/modules/init/bash |
---|
920 | $module_calls |
---|
921 | |
---|
922 | echo ld_library_path=\$LD_LIBRARY_PATH |
---|
923 | |
---|
924 | %%END%% |
---|
925 | |
---|
926 | else |
---|
927 | cat > $job_to_send << %%END%% |
---|
928 | #PBS -S /bin/bash |
---|
929 | #PBS -N $job_name |
---|
930 | #PBS -l walltime=$timestring |
---|
931 | #PBS -l ncpus=1 |
---|
932 | #PBS -o $remote_dayfile |
---|
933 | #PBS -j oe |
---|
934 | $queue_directive |
---|
935 | $email_directive |
---|
936 | |
---|
937 | eval \`/sw/swdist/bin/modulesinit\` |
---|
938 | #. /usr/share/modules/init/bash |
---|
939 | $module_calls |
---|
940 | |
---|
941 | %%END%% |
---|
942 | |
---|
943 | fi |
---|
944 | |
---|
945 | elif [[ $remote_host = lcxt4 ]] |
---|
946 | then |
---|
947 | |
---|
948 | if [[ $numprocs != 0 ]] |
---|
949 | then |
---|
950 | cat > $job_to_send << %%END%% |
---|
951 | #!/bin/ksh |
---|
952 | #PBS -S /bin/ksh |
---|
953 | #PBS -N $job_name |
---|
954 | #PBS -A $project_account |
---|
955 | #PBS -j oe |
---|
956 | #PBS -l walltime=$timestring |
---|
957 | #PBS -l mppwidth=${numprocs} |
---|
958 | #PBS -l mppnppn=${processes_per_node} |
---|
959 | #PBS -m abe |
---|
960 | #PBS -o $remote_dayfile |
---|
961 | $email_directive |
---|
962 | |
---|
963 | . /opt/modules/default/init/ksh |
---|
964 | $module_calls |
---|
965 | |
---|
966 | %%END%% |
---|
967 | |
---|
968 | else |
---|
969 | cat > $job_to_send << %%END%% |
---|
970 | #!/bin/ksh |
---|
971 | #PBS -S /bin/ksh |
---|
972 | #PBS -N $job_name |
---|
973 | #PBS -A $project_account |
---|
974 | #PBS -j oe |
---|
975 | #PBS -l walltime=$timestring |
---|
976 | #PBS -l ncpus=1 |
---|
977 | #PBS -l pmem=${memory}mb |
---|
978 | #PBS -m abe |
---|
979 | $email_directive |
---|
980 | #PBS -o $remote_dayfile |
---|
981 | |
---|
982 | . /opt/modules/default/init/ksh |
---|
983 | $module_calls |
---|
984 | |
---|
985 | %%END%% |
---|
986 | |
---|
987 | fi |
---|
988 | |
---|
989 | elif [[ $remote_host = lckyoto ]] |
---|
990 | then |
---|
991 | |
---|
992 | cat > $job_to_send << %%END%% |
---|
993 | #!/bin/ksh |
---|
994 | # @\$-o $remote_dayfile |
---|
995 | # @\$-eo -oi |
---|
996 | # @\$-lP 16 |
---|
997 | # @\$-lp 1 |
---|
998 | # @\$-lm 28gb -llm unlimited -ls unlimited |
---|
999 | # @\$-q $queue |
---|
1000 | # @\$-Pvn abs_pack |
---|
1001 | ##for intel? @\$-Pvn abs_unpack -Pvs unpack -Pvc unpack |
---|
1002 | #. /thin/local/etc/setprofile/intel-11.0.sh |
---|
1003 | #. /thin/local/etc/setprofile/mvapich2-1.4+intel-11.0.sh |
---|
1004 | . ~/.myprofile |
---|
1005 | #. /home2/t/t51254/palm/current_version/myprofile |
---|
1006 | #. /thin/apps/pgi/mpi.sh |
---|
1007 | # |
---|
1008 | env |
---|
1009 | # |
---|
1010 | set -x |
---|
1011 | |
---|
1012 | %%END%% |
---|
1013 | |
---|
1014 | elif [[ $remote_host = lcxt5m ]] |
---|
1015 | then |
---|
1016 | |
---|
1017 | if [[ $numprocs != 0 ]] |
---|
1018 | then |
---|
1019 | cat > $job_to_send << %%END%% |
---|
1020 | #!/bin/ksh |
---|
1021 | #PBS -S /bin/ksh |
---|
1022 | #PBS -N $job_name |
---|
1023 | #PBS -j oe |
---|
1024 | #PBS -l walltime=$timestring |
---|
1025 | #PBS -l mppwidth=${numprocs} |
---|
1026 | #PBS -l mppnppn=${processes_per_node} |
---|
1027 | #PBS -m abe |
---|
1028 | #PBS -o $remote_dayfile |
---|
1029 | |
---|
1030 | . /opt/modules/default/init/ksh |
---|
1031 | $module_calls |
---|
1032 | |
---|
1033 | %%END%% |
---|
1034 | |
---|
1035 | else |
---|
1036 | cat > $job_to_send << %%END%% |
---|
1037 | #!/bin/ksh |
---|
1038 | #PBS -S /bin/ksh |
---|
1039 | #PBS -N $job_name |
---|
1040 | #PBS -j oe |
---|
1041 | #PBS -l walltime=$timestring |
---|
1042 | #PBS -l ncpus=1 |
---|
1043 | #PBS -l pmem=${memory}mb |
---|
1044 | #PBS -m abe |
---|
1045 | #PBS -o $remote_dayfile |
---|
1046 | |
---|
1047 | . /opt/modules/default/init/ksh |
---|
1048 | $module_calls |
---|
1049 | |
---|
1050 | %%END%% |
---|
1051 | |
---|
1052 | fi |
---|
1053 | |
---|
1054 | elif [[ $remote_host = nech ]] |
---|
1055 | then |
---|
1056 | |
---|
1057 | if (( nodes > 1 )) |
---|
1058 | then |
---|
1059 | cat > $job_to_send << %%END%% |
---|
1060 | #!/bin/ksh |
---|
1061 | #PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime |
---|
1062 | #PBS -l ${qsubmem}=${Memory}gb |
---|
1063 | #PBS -b $nodes |
---|
1064 | #PBS -o $remote_dayfile |
---|
1065 | #PBS -N palm |
---|
1066 | #PBS -j o |
---|
1067 | #PBS -T mpisx |
---|
1068 | |
---|
1069 | %%END%% |
---|
1070 | |
---|
1071 | elif [[ $numprocs != 0 ]] |
---|
1072 | then |
---|
1073 | cat > $job_to_send << %%END%% |
---|
1074 | #!/bin/ksh |
---|
1075 | #PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime |
---|
1076 | #PBS -l ${qsubmem}=${Memory}gb |
---|
1077 | #PBS -o $remote_dayfile |
---|
1078 | #PBS -N palm |
---|
1079 | #PBS -j o |
---|
1080 | |
---|
1081 | %%END%% |
---|
1082 | |
---|
1083 | else |
---|
1084 | cat > $job_to_send << %%END%% |
---|
1085 | #!/bin/ksh |
---|
1086 | #PBS -l ${qsubmem}=${Memory}gb,${qsubtime}=$cputime |
---|
1087 | #PBS -o $remote_dayfile |
---|
1088 | #PBS -j o |
---|
1089 | |
---|
1090 | %%END%% |
---|
1091 | |
---|
1092 | fi |
---|
1093 | |
---|
1094 | elif [[ $remote_host = necriam ]] |
---|
1095 | then |
---|
1096 | |
---|
1097 | if (( nodes > 1 )) |
---|
1098 | then |
---|
1099 | cat > $job_to_send << %%END%% |
---|
1100 | #!/bin/ksh |
---|
1101 | #PBS -b $nodes |
---|
1102 | #PBS -o $remote_dayfile |
---|
1103 | #PBS -N $job_name |
---|
1104 | #PBS -j o |
---|
1105 | #PBS -v MPIPROGINV=YES |
---|
1106 | |
---|
1107 | %%END%% |
---|
1108 | |
---|
1109 | elif [[ $numprocs != 0 ]] |
---|
1110 | then |
---|
1111 | cat > $job_to_send << %%END%% |
---|
1112 | #!/bin/ksh |
---|
1113 | #PBS -q ${queue} |
---|
1114 | #PBS -o $remote_dayfile |
---|
1115 | #PBS -N $job_name |
---|
1116 | #PBS -j o |
---|
1117 | #PBS -v MPIPROGINV=YES |
---|
1118 | |
---|
1119 | %%END%% |
---|
1120 | |
---|
1121 | else |
---|
1122 | cat > $job_to_send << %%END%% |
---|
1123 | #!/bin/ksh |
---|
1124 | #PBS -o $remote_dayfile |
---|
1125 | #PBS -j o |
---|
1126 | |
---|
1127 | %%END%% |
---|
1128 | |
---|
1129 | fi |
---|
1130 | |
---|
1131 | elif [[ $remote_host = lctit ]] |
---|
1132 | then |
---|
1133 | cat > $job_to_send << %%END%% |
---|
1134 | #!/bin/ksh |
---|
1135 | |
---|
1136 | $module_calls |
---|
1137 | |
---|
1138 | %%END%% |
---|
1139 | |
---|
1140 | # OPTIONEN FUER SUBMIT-KOMMANDO ZUSAMMENSTELLEN |
---|
1141 | if [[ $tasks_per_node != $processes_per_node ]] |
---|
1142 | then |
---|
1143 | submcom="$submcom -W group_list=$group_number -N $job_name -l walltime=$timestring -l select=$nodes:ncpus=$processes_per_node:mpiprocs=$tasks_per_node:mem=${Memory}gb -o $remote_dayfile -j oe -q $queue " |
---|
1144 | else |
---|
1145 | submcom="$submcom -W group_list=$group_number -N $job_name -l walltime=$timestring -l select=$nodes:ncpus=$processes_per_node:mpiprocs=$tasks_per_node:mem=${Memory}gb -l place=scatter -o $remote_dayfile -j oe -q $queue " |
---|
1146 | fi |
---|
1147 | |
---|
1148 | else |
---|
1149 | |
---|
1150 | cat > $job_to_send << %%END%% |
---|
1151 | # @\$-q ${queue} |
---|
1152 | # @\$-l${qsubtime} $timestring |
---|
1153 | # @\$-l${qsubmem} ${memory}mb |
---|
1154 | # @\$-o $remote_dayfile |
---|
1155 | # @\$-eo |
---|
1156 | |
---|
1157 | %%END%% |
---|
1158 | |
---|
1159 | fi |
---|
1160 | |
---|
1161 | |
---|
1162 | # BEI RECHNUNG AUF REMOTE-MASCHINEN RUECKTRANSFER DES DAYFILES PER TRAP |
---|
1163 | # BEI EXIT VERANLASSEN |
---|
1164 | # VEKTORRECHNER MUSS EIGENEN JOB STARTEN, DA DORT NOHUP NICHT FUNKTIONIERT |
---|
1165 | # AUF IBM IN SEOUL IST RUECKTRANSFER ZUR ZEIT GENERELL NICHT MOEGLICH |
---|
1166 | if [[ $delete_dayfile = false && $remote_host != $local_host ]] |
---|
1167 | then |
---|
1168 | echo "set +vx" >> $job_to_send |
---|
1169 | echo "trap '" >> $job_to_send |
---|
1170 | echo "set +vx" >> $job_to_send |
---|
1171 | if [[ $(echo $remote_host | cut -c1-3) = ibm || $(echo $remote_host | cut -c1-5) = lcsgi || $(echo $remote_host | cut -c1-3) = nec ]] |
---|
1172 | then |
---|
1173 | if [[ $remote_host = ibmh ]] |
---|
1174 | then |
---|
1175 | return_queue=c1 |
---|
1176 | elif [[ $remote_host = ibmkisti ]] |
---|
1177 | then |
---|
1178 | return_queue=class.1-2 |
---|
1179 | elif [[ $remote_host = ibmku ]] |
---|
1180 | then |
---|
1181 | return_queue=sdbg2 |
---|
1182 | elif [[ $remote_host = ibms ]] |
---|
1183 | then |
---|
1184 | return_queue=p_normal |
---|
1185 | elif [[ $remote_host = ibmy ]] |
---|
1186 | then |
---|
1187 | return_queue=serial |
---|
1188 | elif [[ $remote_host = lcsgih || $remote_host = lcsgib ]] |
---|
1189 | then |
---|
1190 | return_queue=serialq |
---|
1191 | elif [[ $remote_host = necriam ]] |
---|
1192 | then |
---|
1193 | return_queue=SP |
---|
1194 | else |
---|
1195 | return_queue=unknown |
---|
1196 | fi |
---|
1197 | |
---|
1198 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
1199 | then |
---|
1200 | |
---|
1201 | if [[ $remote_host = ibmku ]] |
---|
1202 | then |
---|
1203 | echo "echo \"#!/usr/bin/ksh\" >> scpjob.$kennung" >> $job_to_send |
---|
1204 | echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$kennung" >> $job_to_send |
---|
1205 | else |
---|
1206 | echo "echo \"#!/bin/ksh\" >> scpjob.$kennung" >> $job_to_send |
---|
1207 | fi |
---|
1208 | echo "echo \"# @ job_type = serial\" >> scpjob.$kennung" >> $job_to_send |
---|
1209 | echo "echo \"# @ job_name = transfer\" >> scpjob.$kennung" >> $job_to_send |
---|
1210 | echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$kennung" >> $job_to_send |
---|
1211 | echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$kennung " >> $job_to_send |
---|
1212 | echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung" >> $job_to_send |
---|
1213 | echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung" >> $job_to_send |
---|
1214 | if [[ $host != "ibmh" ]] |
---|
1215 | then |
---|
1216 | echo "echo \"# @ class = $return_queue\" >> scpjob.$kennung" >> $job_to_send |
---|
1217 | fi |
---|
1218 | echo "echo \"# @ image_size = 10\" >> scpjob.$kennung" >> $job_to_send |
---|
1219 | echo "echo \"# @ notification = never\" >> scpjob.$kennung" >> $job_to_send |
---|
1220 | |
---|
1221 | echo "echo \"# @ queue\" >> scpjob.$kennung" >> $job_to_send |
---|
1222 | echo "echo \" \" >> scpjob.$kennung" >> $job_to_send |
---|
1223 | |
---|
1224 | echo "echo \"set -x\" >> scpjob.$kennung" >> $job_to_send |
---|
1225 | echo "echo \"batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \\\"$job_catalog\\\" $local_dayfile\" >> scpjob.$kennung" >> $job_to_send |
---|
1226 | if [[ $remote_host = ibmku ]] |
---|
1227 | then |
---|
1228 | echo "echo \"rm scpjob.$kennung\" >> scpjob.$kennung" >> $job_to_send |
---|
1229 | fi |
---|
1230 | echo "echo \"exit\" >> scpjob.$kennung" >> $job_to_send |
---|
1231 | |
---|
1232 | elif [[ $remote_host = nech ]] |
---|
1233 | then |
---|
1234 | echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send |
---|
1235 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
1236 | echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100" >> $job_to_send |
---|
1237 | echo "#PBS -o last_job_transfer_protocol" >> $job_to_send |
---|
1238 | echo "#PBS -j o" >> $job_to_send |
---|
1239 | echo " " >> $job_to_send |
---|
1240 | echo "set -x" >> $job_to_send |
---|
1241 | echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send |
---|
1242 | echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
1243 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
1244 | echo "%%END%%" >> $job_to_send |
---|
1245 | |
---|
1246 | elif [[ $remote_host = necriam ]] |
---|
1247 | then |
---|
1248 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
1249 | echo "#PBS -q $return_queue" >> $job_to_send |
---|
1250 | echo "#PBS -o last_job_transfer_protocol" >> $job_to_send |
---|
1251 | echo "#PBS -j o" >> $job_to_send |
---|
1252 | echo " " >> $job_to_send |
---|
1253 | echo "set -x" >> $job_to_send |
---|
1254 | echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
1255 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
1256 | echo "%%END%%" >> $job_to_send |
---|
1257 | |
---|
1258 | elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]] |
---|
1259 | then |
---|
1260 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
1261 | echo "#!/bin/bash" >> $job_to_send |
---|
1262 | echo "#PBS -N job_protocol_transfer" >> $job_to_send |
---|
1263 | echo "#PBS -l walltime=00:30:00" >> $job_to_send |
---|
1264 | echo "#PBS -l nodes=1:ppn=1" >> $job_to_send |
---|
1265 | echo "#PBS -l feature=data" >> $job_to_send |
---|
1266 | echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
1267 | echo "#PBS -j oe" >> $job_to_send |
---|
1268 | echo " " >> $job_to_send |
---|
1269 | echo ". /usr/share/modules/init/bash" >> $job_to_send |
---|
1270 | echo "set -x" >> $job_to_send |
---|
1271 | echo "batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
1272 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
1273 | echo "%%END%%" >> $job_to_send |
---|
1274 | |
---|
1275 | else |
---|
1276 | |
---|
1277 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
1278 | echo "# @\\\$-q $return_queue" >> $job_to_send |
---|
1279 | echo "# @\\\$-l${qsubtime} 10" >> $job_to_send |
---|
1280 | echo "# @\\\$-l${qsubmem} 10mb" >> $job_to_send |
---|
1281 | if [[ $remote_host = t3ej2 || $remote_host = t3ej5 || $remote_host = t3es ]] |
---|
1282 | then |
---|
1283 | echo "# @\$-l mpp_p=0" >> $job_to_send |
---|
1284 | fi |
---|
1285 | echo '# @\$-lF 10mb' >> $job_to_send |
---|
1286 | # echo '# @\$-o /dev/null' >> $job_to_send |
---|
1287 | echo '# @\$-o job_queue/last_job_transfer_protocol' >> $job_to_send |
---|
1288 | echo '# @\\\$-eo' >> $job_to_send |
---|
1289 | echo " " >> $job_to_send |
---|
1290 | if [[ $remote_host = t3ej2 || $remote_host = t3ej5 ]] |
---|
1291 | then |
---|
1292 | echo "set +vx" >> $job_to_send |
---|
1293 | echo ". .profile" >> $job_to_send |
---|
1294 | fi |
---|
1295 | echo "set -x" >> $job_to_send |
---|
1296 | echo "batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null" >> $job_to_send |
---|
1297 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
1298 | echo "%%END%%" >> $job_to_send |
---|
1299 | fi |
---|
1300 | |
---|
1301 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
1302 | then |
---|
1303 | echo "llsubmit scpjob.$kennung" >> $job_to_send |
---|
1304 | elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]] |
---|
1305 | then |
---|
1306 | echo "rm -rf \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
1307 | echo "chmod u+x scpjob.$kennung" >> $job_to_send |
---|
1308 | echo "msub scpjob.$kennung" >> $job_to_send |
---|
1309 | elif [[ $remote_host = t3eb || $remote_host = t3eh || $remote_host = t3ej2 || $remote_host = t3ej5 ]] |
---|
1310 | then |
---|
1311 | echo "qsub -J n scpjob.$kennung" >> $job_to_send |
---|
1312 | elif [[ $remote_host = t3es ]] |
---|
1313 | then |
---|
1314 | echo "qsub -J n -s /bin/ksh scpjob.$kennung" >> $job_to_send |
---|
1315 | else |
---|
1316 | echo "qsub scpjob.$kennung" >> $job_to_send |
---|
1317 | fi |
---|
1318 | if [[ $remote_host != ibmku ]] |
---|
1319 | then |
---|
1320 | echo "rm scpjob.$kennung" >> $job_to_send |
---|
1321 | fi |
---|
1322 | if [[ $remote_host = nech ]] |
---|
1323 | then |
---|
1324 | echo "cd -" >> $job_to_send |
---|
1325 | fi |
---|
1326 | else |
---|
1327 | # echo "ftpcopy -d $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
1328 | echo "nohup ftpcopy -d -w 15 $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null &" >> $job_to_send |
---|
1329 | fi |
---|
1330 | echo "set -x" >> $job_to_send |
---|
1331 | echo " ' exit" >> $job_to_send |
---|
1332 | echo "set -x" >> $job_to_send |
---|
1333 | fi |
---|
1334 | |
---|
1335 | |
---|
1336 | |
---|
1337 | # EIGENTLICHE JOB-DATEI AN QSUB-KOMMANDOS ANHAENGEN |
---|
1338 | cat $file_to_send >> $job_to_send |
---|
1339 | |
---|
1340 | if [[ $remote_host = ibm ]] |
---|
1341 | then |
---|
1342 | echo " " >> $job_to_send |
---|
1343 | echo "exit" >> $job_to_send |
---|
1344 | fi |
---|
1345 | |
---|
1346 | # remove job file |
---|
1347 | if [[ $remote_host = lctit || $remote_host = ibmku ]] |
---|
1348 | then |
---|
1349 | echo " " >> $job_to_send |
---|
1350 | echo "rm ~/job_queue/$job_on_remhost" >> $job_to_send |
---|
1351 | fi |
---|
1352 | |
---|
1353 | |
---|
1354 | |
---|
1355 | # USER-NAME AUF ZIELRECHNER AUS .NETRC-DATEI ERMITTELN |
---|
1356 | if [[ -z $remote_user ]] |
---|
1357 | then |
---|
1358 | if [[ $remote_host = t3eb || $remote_host = t3eh || $remote_host = t3ej2 || $remote_host = t3ej5 || $remote_host = t3es || $remote_host = vpp ]] |
---|
1359 | then |
---|
1360 | grep $remote_addres ~/.netrc | read dum dum dum remote_user dum dum |
---|
1361 | fi |
---|
1362 | fi |
---|
1363 | |
---|
1364 | |
---|
1365 | |
---|
1366 | # JOB AUF ZIELRECHNER TRANSFERIEREN BZW. INS JOBVERZEICHNIS KOPIEREN |
---|
1367 | if [[ $no_submit = false ]] |
---|
1368 | then |
---|
1369 | if [[ $remote_host != $local_host ]] |
---|
1370 | then |
---|
1371 | [[ $verify = true ]] && printf "\n >>> transfering job to \"$remote_host\"..." |
---|
1372 | if [[ $remote_host = ibms || $remote_host = ibmy ]] # ssh on ibms cannot handle "~/" |
---|
1373 | then |
---|
1374 | job_catalog_save=$job_catalog |
---|
1375 | job_catalog=job_queue |
---|
1376 | elif [[ $remote_host = nech ]] |
---|
1377 | then |
---|
1378 | job_catalog_save=$job_catalog |
---|
1379 | job_catalog=/hpf/b/${remote_user}/job_queue |
---|
1380 | fi |
---|
1381 | if [[ $local_host = decalpha ]] |
---|
1382 | then |
---|
1383 | # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE |
---|
1384 | # PASSWORT AB |
---|
1385 | /bin/scp $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost |
---|
1386 | elif [[ $remote_host = nech ]] |
---|
1387 | then |
---|
1388 | # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ |
---|
1389 | # TRANSFERIERT WERDEN |
---|
1390 | scp $job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost |
---|
1391 | else |
---|
1392 | scp $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost |
---|
1393 | fi |
---|
1394 | if [[ $? = 1 ]] |
---|
1395 | then |
---|
1396 | locat=scp; exit |
---|
1397 | fi |
---|
1398 | if [[ $remote_host = ibms ]] |
---|
1399 | then |
---|
1400 | job_catalog=$job_catalog_save |
---|
1401 | fi |
---|
1402 | [[ $verify = true ]] && printf "\n >>> finished\n" |
---|
1403 | else |
---|
1404 | eval job_catalog=$job_catalog |
---|
1405 | cp $job_to_send ${job_catalog}/$job_on_remhost |
---|
1406 | fi |
---|
1407 | |
---|
1408 | |
---|
1409 | |
---|
1410 | # NQS- BZW. LOADLEVELER-JOB STARTEN |
---|
1411 | if [[ $remote_host != $local_host ]] |
---|
1412 | then |
---|
1413 | [[ $verify = true ]] && printf "\n >>> submitting job using \"qsub\"...\n" |
---|
1414 | |
---|
1415 | if [[ $(echo $remote_host | cut -c1-5) = lcsgi && $prio = true ]] |
---|
1416 | then |
---|
1417 | printf "\n >>> submit with HLRN qos-feature hiprio...\n" |
---|
1418 | ssh $remote_addres -l $remote_user "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost" |
---|
1419 | elif [[ $remote_host = ibmku ]] |
---|
1420 | then |
---|
1421 | ssh $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost" |
---|
1422 | else |
---|
1423 | ssh $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" |
---|
1424 | fi |
---|
1425 | |
---|
1426 | [[ $verify = true ]] && printf " >>> o.k.\n" |
---|
1427 | else |
---|
1428 | cd $job_catalog |
---|
1429 | if [[ $(echo $local_host | cut -c1-5) = lcsgi || $(echo $local_host | cut -c1-3) = ibm ]] |
---|
1430 | then |
---|
1431 | eval $submcom $job_on_remhost |
---|
1432 | elif [[ $local_host = lcfimm || $local_host = lctit || $localhost = lcxt4 || $localhost = lck || $localhost = lckordi|| $localhost = lcyon ]] |
---|
1433 | then |
---|
1434 | chmod u+x $job_on_remhost |
---|
1435 | echo "$submcom $job_on_remhost" |
---|
1436 | eval $submcom $job_on_remhost |
---|
1437 | elif [[ $local_host = nech ]] |
---|
1438 | then |
---|
1439 | if [[ $queue = default ]] |
---|
1440 | then |
---|
1441 | eval $submcom $job_on_remhost |
---|
1442 | else |
---|
1443 | eval $submcom -q $queue $job_on_remhost |
---|
1444 | fi |
---|
1445 | else |
---|
1446 | qsub $job_on_remhost |
---|
1447 | fi |
---|
1448 | |
---|
1449 | # Jobfile must not be deleted on lctit/ibmku!! This will be done |
---|
1450 | # only at the end of the job. |
---|
1451 | if [[ $local_host != lctit && $local_host != ibmku ]] |
---|
1452 | then |
---|
1453 | rm $job_on_remhost |
---|
1454 | fi |
---|
1455 | cd - > /dev/null |
---|
1456 | fi |
---|
1457 | fi |
---|
1458 | |
---|
1459 | |
---|
1460 | |
---|
1461 | # ABSCHLUSSARBEITEN |
---|
1462 | |
---|
1463 | if [[ $no_submit = false ]] |
---|
1464 | then |
---|
1465 | rm $job_to_send |
---|
1466 | fi |
---|
1467 | [[ $verify = true ]] && printf "\n\n *** SUBJOB finished \n\n" |
---|