1 | #!/bin/ksh |
---|
2 | # subjob - Plot-Shellskript Version: @(#)SUBJOB 1.0 |
---|
3 | # $Id: subjob 540 2010-06-15 13:51:16Z heinze $ |
---|
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 | |
---|
120 | |
---|
121 | |
---|
122 | # VARIABLENVEREINBARUNGEN + DEFAULTWERTE |
---|
123 | delete_dayfile=false |
---|
124 | email_notification=none |
---|
125 | group_number=none |
---|
126 | locat=normal |
---|
127 | no_default_queue=none |
---|
128 | no_submit=false |
---|
129 | job_catalog="~/job_queue" |
---|
130 | job_name=none |
---|
131 | local_user=$LOGNAME |
---|
132 | node_usage=shared |
---|
133 | numprocs=0 |
---|
134 | punkte="..........................................................." |
---|
135 | submcom=qsub |
---|
136 | queue=default |
---|
137 | remote_host=none |
---|
138 | remote_user="" |
---|
139 | verify=true |
---|
140 | |
---|
141 | typeset -i cputime=0 memory=0 Memory=0 minuten resttime sekunden stunden |
---|
142 | typeset -i inumprocs nodes=0 tasks_per_node=0 threads_per_task=1 |
---|
143 | typeset -L20 spalte1 |
---|
144 | typeset -R40 spalte2 |
---|
145 | typeset -L60 spalte3 |
---|
146 | |
---|
147 | |
---|
148 | |
---|
149 | # FEHLERBEHANDLUNG |
---|
150 | # BEI EXIT: |
---|
151 | trap 'if [[ $locat != normal ]] |
---|
152 | then |
---|
153 | case $locat in |
---|
154 | (option) printf "\n --> available optios can be displayed" |
---|
155 | printf " by typing:" |
---|
156 | printf "\n \"subjob ?\" \n";; |
---|
157 | (ftpcopy|parameter|scp|verify) printf "\n";; |
---|
158 | (*) printf "\n +++ unknown error" |
---|
159 | printf "\n please inform S. Raasch!\n" |
---|
160 | esac |
---|
161 | [[ -f $job_to_send ]] && rm $job_to_send |
---|
162 | printf "\n\n+++ SUBJOB killed \n\n" |
---|
163 | fi' exit |
---|
164 | |
---|
165 | |
---|
166 | # BEI TERMINAL-BREAK: |
---|
167 | trap '[[ -f $job_to_send ]] && rm $job_to_send |
---|
168 | printf "\n\n+++ SUBJOB killed \n\n" |
---|
169 | exit |
---|
170 | ' 2 |
---|
171 | |
---|
172 | |
---|
173 | |
---|
174 | |
---|
175 | # LOKALEN HOSTNAMEN FESTSTELLEN |
---|
176 | local_host=$(hostname) |
---|
177 | |
---|
178 | |
---|
179 | |
---|
180 | # HOSTSPEZIFISCHE VARIABLEN VEREINBAREN BZW. PRUEFEN, OB LOKALER HOST |
---|
181 | # UEBERHAUPT ZULAESSIG IST |
---|
182 | case $local_host in |
---|
183 | (atmos) local_addres=172.20.25.35; local_host=lcide;; |
---|
184 | (autan) local_addres=130.75.105.57; local_host=lcmuk;; |
---|
185 | (bora) local_addres=130.75.105.103; local_host=lcmuk;; |
---|
186 | (bd1) local_addres=130.73.232.64; local_host=lcsgib;; |
---|
187 | (bd2) local_addres=130.73.232.65; local_host=lcsgib;; |
---|
188 | (bd3) local_addres=130.73.232.66; local_host=lcsgib;; |
---|
189 | (bd4) local_addres=130.73.232.67; local_host=lcsgib;; |
---|
190 | (b01*|bicegate1) local_addres=130.73.232.102; local_host=lcsgib;; |
---|
191 | (bicegate2) local_addres=130.73.232.103; local_host=lcsgib;; |
---|
192 | (breg*-en0|berni*-en0) local_addres=130.73.230.10; local_host=ibmb;; |
---|
193 | (breva) local_addres=130.75.105.98; local_host=lcmuk;; |
---|
194 | (bicegate2) local_addres=130.73.232.103; local_host=lcsgib;; |
---|
195 | (caurus) local_addres=130.75.105.19; local_host=lcmuk;; |
---|
196 | (compute-*.local) local_addres=172.20.4.2; local_host=lcfimm;; |
---|
197 | (cs*) local_addres=136.172.44.131; local_host=nech;; |
---|
198 | (elephanta) local_addres=130.75.105.6; local_host=lcmuk;; |
---|
199 | (fimm.bccs.uib.no) local_addres=172.20.4.2; local_host=lcfimm;; |
---|
200 | (node*) local_addres=165.132.26.61 local_host=lck;; |
---|
201 | (gallego) local_addres=130.75.105.10; local_host=lcmuk;; |
---|
202 | (gfdl5) local_addres=165.132.26.58; local_host=ibmy;; |
---|
203 | (gfdl3.yonsei.ac.kr) local_addres=165.132.26.56; local_host=decalpha;; |
---|
204 | (gregale) local_addres=130.75.105.109; local_host=lcmuk;; |
---|
205 | (hababai) local_addres=130.75.105.108; local_host=lcmuk;; |
---|
206 | (hexagon.bccs.uib.no) local_addres=129.177.20.113; local_host=lcxt4;; |
---|
207 | (hd1) local_addres=130.75.4.104; local_host=lcsgih;; |
---|
208 | (hd2) local_addres=130.75.4.105; local_host=lcsgih;; |
---|
209 | (hd3) local_addres=130.75.4.106; local_host=lcsgih;; |
---|
210 | (hd4) local_addres=130.75.4.107; local_host=lcsgih;; |
---|
211 | (h01*|hicegate1) local_addres=130.75.4.102; local_host=lcsgih;; |
---|
212 | (hicegate2) local_addres=130.75.4.103; local_host=lcsgih;; |
---|
213 | (hx*) local_addres=133.3.51.11; local_host=lckyoto;; |
---|
214 | (blizzard1) local_addres=136.172.40.15; local_host=ibmh;; |
---|
215 | (irifi) local_addres=130.75.105.104; local_host=lcmuk;; |
---|
216 | (sno) local_addres=130.75.105.113; local_host=lcmuk;; |
---|
217 | (levanto) local_addres=130.75.105.45; local_host=lcmuk;; |
---|
218 | (maestro) local_addres=130.75.105.2; local_host=lcmuk;; |
---|
219 | (meteo-login*) local_addres=193.166.211.144;local_host=lcxt5m;; |
---|
220 | (nid*) local_addres=129.177.20.113; local_host=lcxt4;; |
---|
221 | (nobel*) local_addres=150.183.5.101; local_host=ibms;; |
---|
222 | (orkan) local_addres=130.75.105.3; local_host=lcmuk;; |
---|
223 | (ostria) local_addres=130.75.105.106; local_host=lcmuk;; |
---|
224 | (paesano) local_addres=130.75.105.46; local_host=lcmuk;; |
---|
225 | (quanero) local_addres=130.75.105.107; local_host=lcmuk;; |
---|
226 | (scirocco) local_addres=172.20.25.41; local_host=lcmuk;; |
---|
227 | (sun1|sun2) local_addres=130.75.6.1; local_host=unics;; |
---|
228 | (sx-*) local_addres=172.16.1.131; local_host=necriam;; |
---|
229 | (r1*) local_addres=130.75.4.102; local_host=lcsgih;; |
---|
230 | (r2*) local_addres=130.73.232.102; local_host=lcsgib;; |
---|
231 | (tgg*) local_addres=172.17.75.161; local_host=lctit;; |
---|
232 | (vorias) local_addres=172.20.25.43; local_host=lcmuk;; |
---|
233 | (*) printf "\n +++ \"$local_host\" unknown"; |
---|
234 | printf "\n please inform S. Raasch!"; |
---|
235 | locat=parameter; exit;; |
---|
236 | esac |
---|
237 | |
---|
238 | |
---|
239 | |
---|
240 | # REMOTE HOST DEFAULTMAESSIG = LOCAL HOST SETZEN |
---|
241 | remote_host=$local_host |
---|
242 | |
---|
243 | |
---|
244 | |
---|
245 | |
---|
246 | # PROZEDUROPTIONEN EINLESEN |
---|
247 | while getopts :c:dDe:g:h:m:n:N:O:q:t:T:u:vX: option |
---|
248 | do |
---|
249 | case $option in |
---|
250 | (c) job_catalog=$OPTARG;; |
---|
251 | (d) delete_dayfile=true;; |
---|
252 | (D) no_submit=true;; |
---|
253 | (e) email_notification=$OPTARG;; |
---|
254 | (g) group_number=$OPTARG;; |
---|
255 | (h) remote_host=$OPTARG;; |
---|
256 | (m) memory=$OPTARG;; |
---|
257 | (n) job_name=$OPTARG;; |
---|
258 | (N) node_usage=$OPTARG;; |
---|
259 | (O) threads_per_task=$OPTARG;; |
---|
260 | (q) no_default_queue=$OPTARG;; |
---|
261 | (t) cputime=$OPTARG;; |
---|
262 | (T) tasks_per_node=$OPTARG;; |
---|
263 | (u) remote_user=$OPTARG;; |
---|
264 | (v) verify=false;; |
---|
265 | (X) numprocs=$OPTARG;; |
---|
266 | (\?) printf "\n +++ Option $OPTARG unknown \n"; |
---|
267 | locat=option; exit;; |
---|
268 | esac |
---|
269 | done |
---|
270 | |
---|
271 | |
---|
272 | # JOBDATEINAMEN ALS NAECHSTES ARGUMENT HOLEN |
---|
273 | shift OPTIND-1; file_to_send=$1 |
---|
274 | |
---|
275 | |
---|
276 | # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN |
---|
277 | if [ "$1" = "?" ] |
---|
278 | then |
---|
279 | (printf "\n *** subjob can be called as follows:\n" |
---|
280 | printf "\n subjob -c.. -d -D -h.. -m.. -q.. -t.. -u.. -v <jobfile>\n" |
---|
281 | printf "\n Description of available options:\n" |
---|
282 | printf "\n Option Description Default-Value" |
---|
283 | printf "\n -c job-input- and output-catalog ~/job_queue" |
---|
284 | printf "\n -d no job-protocol will be created ---" |
---|
285 | printf "\n -D only the job-file will be created ---" |
---|
286 | printf "\n -h execution host, available hosts: $remote_host" |
---|
287 | printf "\n ibm, ibmb, ibmh, ibms, ibmy, lcmuk," |
---|
288 | printf "\n lctit, nech, necriam, unics" |
---|
289 | printf "\n -m memory demand per process in MByte ---" |
---|
290 | printf "\n -n jobname <jobdatei>" |
---|
291 | printf "\n -O threads per task (for OpenMP usage) 1" |
---|
292 | printf "\n -q job-queue to be used default" |
---|
293 | printf "\n -t allowed cpu-time in seconds ---" |
---|
294 | printf "\n -T tasks per node (on parallel hosts) ---" |
---|
295 | printf "\n -u username on execution host from .netrc" |
---|
296 | printf "\n -v no prompt for confirmation ---" |
---|
297 | printf "\n -X # of processors (on parallel hosts) 1" |
---|
298 | printf "\n " |
---|
299 | printf "\n The only possible positional parameter is <jobfile>:" |
---|
300 | printf "\n The complete NQS-job must be provided here." |
---|
301 | printf "\n <jobfile>=? creates this outline\n\n") | more |
---|
302 | exit |
---|
303 | fi |
---|
304 | |
---|
305 | |
---|
306 | |
---|
307 | # PRUEFEN, OB JOBDATEI ANGEGEBEN WURDE UND OB SIE AUCH EXISTIERT |
---|
308 | if [[ "$file_to_send" = "" ]] |
---|
309 | then |
---|
310 | printf "\n +++ job-file missing" |
---|
311 | locat=parameter; exit |
---|
312 | else |
---|
313 | if [[ -f $file_to_send ]] |
---|
314 | then |
---|
315 | true |
---|
316 | else |
---|
317 | printf "\n +++ job-file: " |
---|
318 | printf "\n $file_to_send" |
---|
319 | printf "\n does not exist" |
---|
320 | locat=parameter; exit |
---|
321 | fi |
---|
322 | fi |
---|
323 | |
---|
324 | |
---|
325 | |
---|
326 | # FALLS KEIN JOBNAME ANGEGEBEN WURDE, WIRD JOBNAME = JOBDATEINAME |
---|
327 | # GESETZT. VORAUSSETZUNG: JOBDATEINAME BEINHALTET KEINE PFADE |
---|
328 | if [[ $job_name = none ]] |
---|
329 | then |
---|
330 | job_name=$file_to_send |
---|
331 | fi |
---|
332 | if [[ $(echo $job_name | grep -c "/") != 0 ]] |
---|
333 | then |
---|
334 | printf "\n +++ job-file name: " |
---|
335 | printf "\n $job_name" |
---|
336 | printf "\n must not contain \"/\"-characters" |
---|
337 | locat=parameter; exit |
---|
338 | fi |
---|
339 | |
---|
340 | |
---|
341 | |
---|
342 | |
---|
343 | # HOSTSPEZIFISCHE GROESSEN VEREINBAREN BZW. ABBRUCH BEI UNZULAESSIGEM HOST |
---|
344 | # ODER WENN HOST NICHT ANGEGEBEN WURDE |
---|
345 | if [[ $remote_host = none ]] |
---|
346 | then |
---|
347 | printf "\n +++ host missing" |
---|
348 | locat=option; exit |
---|
349 | else |
---|
350 | case $remote_host in |
---|
351 | (ibm) queue=p690_standard; remote_addres=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
352 | (ibmb) queue=cpar; remote_addres=130.73.230.10; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
353 | (ibmh) queue=no_class; remote_addres=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
354 | (ibms) queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
355 | (ibmy) queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;; |
---|
356 | (lcfimm) remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;; |
---|
357 | (lckyoto) remote_addres=133.3.51.11; submcom=/thin/local/bin/qsub;; |
---|
358 | (lcsgib) queue=smallq; remote_addres=130.73.232.104; submcom=/opt/moab/bin/msub;; |
---|
359 | (lcsgih) queue=smallq; remote_addres=130.75.4.101; submcom=/opt/moab/bin/msub;; |
---|
360 | (lck) remote_addres=165.132.26.61; submcom=/usr/torque/bin/qsub;; |
---|
361 | (lctit) queue=lctit; remote_addres=172.17.75.161; submcom=/n1ge/TITECH_GRID/tools/bin/n1ge;; |
---|
362 | (lcxt4) remote_addres=129.177.20.113; submcom=/opt/torque/2.3.0/bin/qsub;; |
---|
363 | (lcxt5m) remote_addres=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;; |
---|
364 | (nech) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=136.172.44.147; submcom="/usr/local/bin/qsub";; |
---|
365 | (necriam) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=172.16.1.131; submcom="/usr/bin/nqsII/qsub";; |
---|
366 | (vpp) qsubmem=m; qsubtime=t; queue=vpp; remote_addres=130.75.4.130;; |
---|
367 | (unics) qsubmem=d; qsubtime=t; queue=unics; remote_addres=130.75.6.1;; |
---|
368 | (*) printf "\n +++ hostname \"$remote_host\" not allowed"; |
---|
369 | locat=parameter; exit;; |
---|
370 | esac |
---|
371 | fi |
---|
372 | |
---|
373 | |
---|
374 | # EVTL. PRUEFEN, OB ANGEGEBENE QUEUE ZULAESSIG IST |
---|
375 | if [[ $no_default_queue != none ]] |
---|
376 | then |
---|
377 | error=false |
---|
378 | ndq=$no_default_queue |
---|
379 | case $remote_host in |
---|
380 | (ibm) case $ndq in |
---|
381 | (p690_express|p690_standard|p690_long) error=false;; |
---|
382 | (*) error=true;; |
---|
383 | esac;; |
---|
384 | (ibmb) case $ndq in |
---|
385 | (cdata|cdev|cexp|c1|cshare|csolo|cspec) error=false;; |
---|
386 | (*) error=true;; |
---|
387 | esac;; |
---|
388 | (ibmh) case $ndq in |
---|
389 | (no_class) error=false;; |
---|
390 | (*) error=true;; |
---|
391 | esac;; |
---|
392 | (ibms) case $ndq in |
---|
393 | (express|normal|p_express|p_normal|p_normal_1.3|p_normal_1.7|grand) error=false;; |
---|
394 | (*) error=true;; |
---|
395 | esac;; |
---|
396 | (ibmy) case $ndq in |
---|
397 | (parallel) error=false;; |
---|
398 | (*) error=true;; |
---|
399 | esac;; |
---|
400 | (lckyoto) case $ndq in |
---|
401 | (eh|ph) error=false;; |
---|
402 | (*) error=true;; |
---|
403 | esac;; |
---|
404 | (lcsgib|lcsgih) case $ndq in |
---|
405 | (testq|serialq|smallq|mediumq|bigq|workq|dataq|permq|special1q) error=false;; |
---|
406 | (*) error=true;; |
---|
407 | esac;; |
---|
408 | (lctit) case $ndq in |
---|
409 | (novice|sla1|sla2|sla3|RAM64GB|RAM128GB) error=false;; |
---|
410 | (*) error=true;; |
---|
411 | esac;; |
---|
412 | (t3eb) case $ndq in |
---|
413 | (berte|p50|p100|p392|forfree|p25himem) error=false;; |
---|
414 | (*) error=true;; |
---|
415 | esac;; |
---|
416 | (necriam) case $ndq in |
---|
417 | (SP|SS|P6) error=false;; |
---|
418 | (*) error=true;; |
---|
419 | esac;; |
---|
420 | (t3eh) case $ndq in |
---|
421 | (para_t3e|em|k|l|lm|comp_t3e|c|p|ht) error=false;; |
---|
422 | (*) error=true;; |
---|
423 | esac;; |
---|
424 | (t3ej2|t3ej5) case $ndq in |
---|
425 | (low|normal|high) error=false;; |
---|
426 | (*) error=true;; |
---|
427 | esac;; |
---|
428 | (t3es) case $ndq in |
---|
429 | (batch|serial-4|pe4|p48|pe16|pe32|pe64|pe128) error=false;; |
---|
430 | (*) error=true;; |
---|
431 | esac;; |
---|
432 | (unics) case $ndq in |
---|
433 | (unics|ht) error=false;; |
---|
434 | (*) error=true;; |
---|
435 | esac;; |
---|
436 | esac |
---|
437 | if [[ $error = true ]] |
---|
438 | then |
---|
439 | printf "\n +++ queue \"$no_default_queue\" on host \"$remote_host\" not allowed" |
---|
440 | locat=parameter; exit |
---|
441 | else |
---|
442 | queue=$no_default_queue |
---|
443 | fi |
---|
444 | fi |
---|
445 | |
---|
446 | |
---|
447 | |
---|
448 | # KNOTENNUTZUNG IN ENTWICKLERQUEUE MUSS SHARED SEIN |
---|
449 | if [[ $node_usage != shared && $queue = cdev ]] |
---|
450 | then |
---|
451 | node_usage=shared |
---|
452 | fi |
---|
453 | |
---|
454 | |
---|
455 | |
---|
456 | # PRUEFEN DER CPU-ZEIT, ZEIT NACH STUNDEN, MINUTEN UND SEKUNDEN |
---|
457 | # AUFTEILEN |
---|
458 | done=false |
---|
459 | while [[ $done = false ]] |
---|
460 | do |
---|
461 | if (( $cputime <= 0 )) |
---|
462 | then |
---|
463 | printf "\n +++ wrong cpu-time or cpu-time missing" |
---|
464 | printf "\n >>> Please type cpu-time in seconds as INTEGER:" |
---|
465 | printf "\n >>> " |
---|
466 | read cputime 1>/dev/null 2>&1 |
---|
467 | else |
---|
468 | done=true |
---|
469 | fi |
---|
470 | done |
---|
471 | if [[ $remote_host = nech ]] |
---|
472 | then |
---|
473 | if (( tasks_per_node != 0 )) |
---|
474 | then |
---|
475 | (( cputime = cputime * tasks_per_node )) |
---|
476 | elif [[ $numprocs != 0 ]] |
---|
477 | then |
---|
478 | (( cputime = cputime * numprocs )) |
---|
479 | fi |
---|
480 | fi |
---|
481 | (( stunden = cputime / 3600 )) |
---|
482 | (( resttime = cputime - stunden * 3600 )) |
---|
483 | (( minuten = resttime / 60 )) |
---|
484 | (( sekunden = resttime - minuten * 60 )) |
---|
485 | timestring=${stunden}:${minuten}:${sekunden} |
---|
486 | |
---|
487 | |
---|
488 | |
---|
489 | # PRUEFEN DER KERNSPEICHERANFORDERUNG |
---|
490 | done=false |
---|
491 | while [[ $done = false ]] |
---|
492 | do |
---|
493 | if (( memory <= 0 )) |
---|
494 | then |
---|
495 | printf "\n +++ wrong memory demand or memory demand missing" |
---|
496 | printf "\n >>> Please type memory in MByte per process as INTEGER:" |
---|
497 | printf "\n >>> " |
---|
498 | read memory 1>/dev/null 2>&1 |
---|
499 | else |
---|
500 | done=true |
---|
501 | fi |
---|
502 | done |
---|
503 | |
---|
504 | if [[ $remote_host = nech || $remote_host = necriam ]] |
---|
505 | then |
---|
506 | if (( tasks_per_node != 0 )) |
---|
507 | then |
---|
508 | (( Memory = memory * tasks_per_node / 1000 )) |
---|
509 | elif [[ $numprocs != 0 ]] |
---|
510 | then |
---|
511 | (( Memory = memory * numprocs / 1000 )) |
---|
512 | else |
---|
513 | (( Memory = memory / 1000 )) |
---|
514 | fi |
---|
515 | fi |
---|
516 | |
---|
517 | |
---|
518 | # SPEICHERBERECHNUNG BEI OPENMP-NUTZUNG |
---|
519 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
520 | then |
---|
521 | (( memory = memory * threads_per_task )) |
---|
522 | fi |
---|
523 | |
---|
524 | |
---|
525 | # BERECHNUNG DER ANZAHL DER ZU VERWENDENDEN KNOTEN |
---|
526 | if (( tasks_per_node != 0 )) |
---|
527 | then |
---|
528 | if [[ $(echo $remote_host | cut -c1-5) = lcsgi ]] |
---|
529 | then |
---|
530 | (( nodes = numprocs / tasks_per_node )) |
---|
531 | else |
---|
532 | (( nodes = numprocs / ( tasks_per_node * threads_per_task ) )) |
---|
533 | fi |
---|
534 | fi |
---|
535 | |
---|
536 | |
---|
537 | |
---|
538 | # HEADER-AUSGABE |
---|
539 | if [[ $verify = true ]] |
---|
540 | then |
---|
541 | printf "\n\n" |
---|
542 | printf "#--------------------------------------------------------------# \n" |
---|
543 | spalte1=SUBJOB;spalte2=$(date) |
---|
544 | printf "| $spalte1$spalte2 | \n" |
---|
545 | printf "| | \n" |
---|
546 | printf "| values of parameters/options: | \n" |
---|
547 | spalte1=local_host$punkte; spalte2=$punkte$local_host |
---|
548 | printf "| $spalte1$spalte2 | \n" |
---|
549 | spalte1=remote_host$punkte; spalte2=$punkte$remote_host |
---|
550 | printf "| $spalte1$spalte2 | \n" |
---|
551 | spalte1=queue$punkte; spalte2=$punkte$queue |
---|
552 | printf "| $spalte1$spalte2 | \n" |
---|
553 | spalte1=memory$punkte; spalte2="$punkte$memory mb" |
---|
554 | printf "| $spalte1$spalte2 | \n" |
---|
555 | spalte1=cputime$punkte; spalte2="$punkte$cputime sec" |
---|
556 | printf "| $spalte1$spalte2 | \n" |
---|
557 | spalte1=job_name$punkte; spalte2="$punkte$job_name" |
---|
558 | printf "| $spalte1$spalte2 | \n" |
---|
559 | printf "#--------------------------------------------------------------# \n\n" |
---|
560 | |
---|
561 | |
---|
562 | # KONTROLLABFRAGE, OB ALLES O.K. |
---|
563 | antwort="dummy" |
---|
564 | while [[ $antwort != y && $antwort != Y && $antwort != n && $antwort != N ]] |
---|
565 | do |
---|
566 | read antwort?" >>> continue (y/n) ? " |
---|
567 | done |
---|
568 | if [[ $antwort = n || $antwort = N ]] |
---|
569 | then |
---|
570 | locat=verify; exit |
---|
571 | fi |
---|
572 | printf "\n" |
---|
573 | fi |
---|
574 | |
---|
575 | |
---|
576 | |
---|
577 | # ZUFALLSKENNUNG GENERIEREN UND JOBNAMEN AUF ZIELRECHNER BESTIMMEN |
---|
578 | kennung=$RANDOM |
---|
579 | job_on_remhost=${job_name}_${kennung}_$local_host |
---|
580 | job_to_send=job_to_send_$kennung |
---|
581 | if [[ $delete_dayfile = false ]] |
---|
582 | then |
---|
583 | remote_dayfile=${local_host}_${job_name}_result_$kennung |
---|
584 | local_dayfile=${remote_host}_${job_name} |
---|
585 | else |
---|
586 | remote_dayfile=/dev/null |
---|
587 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
588 | then |
---|
589 | notification='# @ notification = never' |
---|
590 | fi |
---|
591 | fi |
---|
592 | |
---|
593 | |
---|
594 | |
---|
595 | # QSUB- ODER LL-KOMMANDOS BZW. SKRIPTE GENERIEREN |
---|
596 | if [[ $(echo $remote_host | cut -c1-3) = ibm && $numprocs != 0 ]] |
---|
597 | then |
---|
598 | |
---|
599 | if [[ $remote_host = ibmy ]] |
---|
600 | then |
---|
601 | consumable_memory="" |
---|
602 | else |
---|
603 | consumable_memory="ConsumableMemory($memory mb)" |
---|
604 | fi |
---|
605 | |
---|
606 | if [[ $remote_host = ibmh ]] |
---|
607 | then |
---|
608 | data_limit="" |
---|
609 | network_to_use="" |
---|
610 | class="" |
---|
611 | environment="" |
---|
612 | else |
---|
613 | class="# @ class = $queue" |
---|
614 | environment="# @ environment = OMP_NUM_THREADS=$threads_per_task; MP_SHARED_MEMORY=yes" |
---|
615 | if [[ $queue = cdev ]] |
---|
616 | then |
---|
617 | data_limit="# @ data_limit = 1.76gb" |
---|
618 | network_to_use="# @ network.mpi = sn_all,shared,ip" |
---|
619 | else |
---|
620 | if [[ $remote_host = ibms ]] |
---|
621 | then |
---|
622 | network_to_use="# @ network.mpi = csss,shared,us" |
---|
623 | elif [[ $remote_host = ibmy ]] |
---|
624 | then |
---|
625 | network_to_use="" |
---|
626 | else |
---|
627 | network_to_use="# @ network.mpi = sn_all,shared,us" |
---|
628 | data_limit="# @ data_limit = 1.76gb" |
---|
629 | fi |
---|
630 | fi |
---|
631 | fi |
---|
632 | |
---|
633 | cat > $job_to_send << %%END%% |
---|
634 | #!/bin/ksh |
---|
635 | # @ shell = /bin/ksh |
---|
636 | |
---|
637 | # @ job_type = parallel |
---|
638 | # @ job_name = palm |
---|
639 | # @ wall_clock_limit = ${timestring},$timestring |
---|
640 | # @ resources = ConsumableCpus($threads_per_task) $consumable_memory |
---|
641 | # @ output = $remote_dayfile |
---|
642 | # @ error = $remote_dayfile |
---|
643 | # @ image_size = 50 |
---|
644 | $class |
---|
645 | $environment |
---|
646 | $network_to_use |
---|
647 | $data_limit |
---|
648 | $notification |
---|
649 | |
---|
650 | %%END%% |
---|
651 | |
---|
652 | if (( nodes > 0 )) |
---|
653 | then |
---|
654 | |
---|
655 | cat >> $job_to_send << %%END%% |
---|
656 | # @ node = $nodes |
---|
657 | # @ tasks_per_node = $tasks_per_node |
---|
658 | # @ node_usage = $node_usage |
---|
659 | # @ queue |
---|
660 | |
---|
661 | %%END%% |
---|
662 | |
---|
663 | else |
---|
664 | |
---|
665 | if [[ $remote_host != ibmy ]] |
---|
666 | then |
---|
667 | |
---|
668 | cat >> $job_to_send << %%END%% |
---|
669 | # @ blocking = unlimited |
---|
670 | # @ total_tasks = $numprocs |
---|
671 | # @ node_usage = $node_usage |
---|
672 | # @ queue |
---|
673 | |
---|
674 | %%END%% |
---|
675 | |
---|
676 | else |
---|
677 | |
---|
678 | cat >> $job_to_send << %%END%% |
---|
679 | # @ node = 1 |
---|
680 | # @ total_tasks = $numprocs |
---|
681 | # @ queue |
---|
682 | |
---|
683 | %%END%% |
---|
684 | |
---|
685 | fi |
---|
686 | |
---|
687 | fi |
---|
688 | |
---|
689 | elif [[ $(echo $remote_host | cut -c1-3) = ibm && $numprocs = 0 ]] |
---|
690 | then |
---|
691 | |
---|
692 | cat > $job_to_send << %%END%% |
---|
693 | #!/bin/ksh |
---|
694 | |
---|
695 | # @ job_type = serial |
---|
696 | # @ node_usage = $node_usage |
---|
697 | # @ job_name = palm |
---|
698 | # @ wall_clock_limit = ${timestring},$timestring |
---|
699 | # @ resources = ConsumableCpus(1) ConsumableMemory(1 gb) |
---|
700 | # @ output = $remote_dayfile |
---|
701 | # @ error = $remote_dayfile |
---|
702 | $class |
---|
703 | $notification |
---|
704 | |
---|
705 | # @ queue |
---|
706 | |
---|
707 | %%END%% |
---|
708 | |
---|
709 | elif [[ $remote_host = lcfimm ]] |
---|
710 | then |
---|
711 | |
---|
712 | if [[ $numprocs != 0 ]] |
---|
713 | then |
---|
714 | cat > $job_to_send << %%END%% |
---|
715 | #!/bin/ksh |
---|
716 | #PBS -N $job_name |
---|
717 | #PBS -A geofysisk |
---|
718 | #PBS -l walltime=$timestring |
---|
719 | #PBS -l nodes=${nodes}:ppn=$tasks_per_node |
---|
720 | #PBS -l pmem=${memory}mb |
---|
721 | #PBS -m abe |
---|
722 | #PBS -o $remote_dayfile |
---|
723 | #PBS -j oe |
---|
724 | mpd & |
---|
725 | |
---|
726 | %%END%% |
---|
727 | |
---|
728 | else |
---|
729 | cat > $job_to_send << %%END%% |
---|
730 | #!/bin/ksh |
---|
731 | #PBS -N $job_name |
---|
732 | #PBS -A geofysisk |
---|
733 | #PBS -l walltime=$timestring |
---|
734 | #PBS -l ncpus=1 |
---|
735 | #PBS -l pmem=${memory}mb |
---|
736 | #PBS -m abe |
---|
737 | #PBS -o $remote_dayfile |
---|
738 | #PBS -j oe |
---|
739 | |
---|
740 | %%END%% |
---|
741 | |
---|
742 | fi |
---|
743 | |
---|
744 | elif [[ $remote_host = lck ]] |
---|
745 | then |
---|
746 | |
---|
747 | if [[ $numprocs != 0 ]] |
---|
748 | then |
---|
749 | cat > $job_to_send << %%END%% |
---|
750 | #!/bin/ksh |
---|
751 | #PBS -N $job_name |
---|
752 | #PBS -l walltime=$timestring |
---|
753 | #PBS -l ncpus=$numprocs |
---|
754 | #PBS -l pmem=${memory}mb |
---|
755 | #PBS -o $remote_dayfile |
---|
756 | #PBS -j oe |
---|
757 | |
---|
758 | mpd & |
---|
759 | |
---|
760 | %%END%% |
---|
761 | |
---|
762 | else |
---|
763 | cat > $job_to_send << %%END%% |
---|
764 | #!/bin/ksh |
---|
765 | #PBS -N $job_name |
---|
766 | #PBS -l walltime=$timestring |
---|
767 | #PBS -l ncpus=1 |
---|
768 | #PBS -l pmem=${memory}mb |
---|
769 | #PBS -o $remote_dayfile |
---|
770 | #PBS -j oe |
---|
771 | |
---|
772 | %%END%% |
---|
773 | |
---|
774 | fi |
---|
775 | |
---|
776 | elif [[ $remote_host = lcsgih || $remote_host = lcsgib ]] |
---|
777 | then |
---|
778 | |
---|
779 | if [[ "$sgi_feature" != "" ]] |
---|
780 | then |
---|
781 | feature_directive="#PBS -l feature=$sgi_feature" |
---|
782 | else |
---|
783 | feature_directive="" |
---|
784 | fi |
---|
785 | |
---|
786 | if [[ $queue = dataq || $queue = permq ]] |
---|
787 | then |
---|
788 | feature_directive="#PBS -l feature=data" |
---|
789 | fi |
---|
790 | |
---|
791 | if [[ $queue = testq || $queue = workq || $queue = dataq || $queue = permq || $queue = serialq || $queue = special1q ]] |
---|
792 | then |
---|
793 | queue_directive="#PBS -q $queue" |
---|
794 | else |
---|
795 | queue_directive="" |
---|
796 | fi |
---|
797 | |
---|
798 | if [[ $email_notification = none ]] |
---|
799 | then |
---|
800 | email_directive="" |
---|
801 | else |
---|
802 | email_directive="#PBS -M $email_notification" |
---|
803 | fi |
---|
804 | |
---|
805 | if [[ $numprocs != 0 ]] |
---|
806 | then |
---|
807 | cat > $job_to_send << %%END%% |
---|
808 | #!/bin/bash |
---|
809 | #PBS -N $job_name |
---|
810 | #PBS -l walltime=$timestring |
---|
811 | #PBS -l nodes=$nodes:ppn=${tasks_per_node} |
---|
812 | #PBS -l naccesspolicy=$node_usage |
---|
813 | #PBS -o $remote_dayfile |
---|
814 | #PBS -j oe |
---|
815 | $feature_directive |
---|
816 | $queue_directive |
---|
817 | $email_directive |
---|
818 | |
---|
819 | . /usr/share/modules/init/bash |
---|
820 | $module_calls |
---|
821 | |
---|
822 | echo ld_library_path=\$LD_LIBRARY_PATH |
---|
823 | |
---|
824 | %%END%% |
---|
825 | |
---|
826 | else |
---|
827 | cat > $job_to_send << %%END%% |
---|
828 | #PBS -S /bin/bash |
---|
829 | #PBS -N $job_name |
---|
830 | #PBS -l walltime=$timestring |
---|
831 | #PBS -l ncpus=1 |
---|
832 | #PBS -o $remote_dayfile |
---|
833 | #PBS -j oe |
---|
834 | $queue_directive |
---|
835 | $email_directive |
---|
836 | |
---|
837 | . /usr/share/modules/init/bash |
---|
838 | $module_calls |
---|
839 | |
---|
840 | %%END%% |
---|
841 | |
---|
842 | fi |
---|
843 | |
---|
844 | elif [[ $remote_host = lcxt4 ]] |
---|
845 | then |
---|
846 | |
---|
847 | if [[ $numprocs != 0 ]] |
---|
848 | then |
---|
849 | cat > $job_to_send << %%END%% |
---|
850 | #!/bin/ksh |
---|
851 | #PBS -S /bin/ksh |
---|
852 | #PBS -N $job_name |
---|
853 | #PBS -A geofysisk |
---|
854 | #PBS -j oe |
---|
855 | #PBS -l walltime=$timestring |
---|
856 | #PBS -l mppwidth=${numprocs} |
---|
857 | #PBS -l mppnppn=${tasks_per_node} |
---|
858 | #PBS -m abe |
---|
859 | #PBS -o $remote_dayfile |
---|
860 | $email_directive |
---|
861 | |
---|
862 | . /opt/modules/default/init/ksh |
---|
863 | $module_calls |
---|
864 | |
---|
865 | %%END%% |
---|
866 | |
---|
867 | else |
---|
868 | cat > $job_to_send << %%END%% |
---|
869 | #!/bin/ksh |
---|
870 | #PBS -S /bin/ksh |
---|
871 | #PBS -N $job_name |
---|
872 | #PBS -A geofysisk |
---|
873 | #PBS -j oe |
---|
874 | #PBS -l walltime=$timestring |
---|
875 | #PBS -l ncpus=1 |
---|
876 | #PBS -l pmem=${memory}mb |
---|
877 | #PBS -m abe |
---|
878 | $email_directive |
---|
879 | #PBS -o $remote_dayfile |
---|
880 | |
---|
881 | . /opt/modules/default/init/ksh |
---|
882 | $module_calls |
---|
883 | |
---|
884 | %%END%% |
---|
885 | |
---|
886 | fi |
---|
887 | |
---|
888 | elif [[ $remote_host = lckyoto ]] |
---|
889 | then |
---|
890 | |
---|
891 | cat > $job_to_send << %%END%% |
---|
892 | #!/bin/ksh |
---|
893 | # @\$-o $remote_dayfile |
---|
894 | # @\$-eo -oi |
---|
895 | # @\$-lP 16 |
---|
896 | # @\$-lp 1 |
---|
897 | # @\$-lm 28gb -llm unlimited -ls unlimited |
---|
898 | # @\$-q $queue |
---|
899 | # @\$-Pvn abs_pack |
---|
900 | ##for intel? @\$-Pvn abs_unpack -Pvs unpack -Pvc unpack |
---|
901 | #. /thin/local/etc/setprofile/intel-11.0.sh |
---|
902 | #. /thin/local/etc/setprofile/mvapich2-1.4+intel-11.0.sh |
---|
903 | . ~/.myprofile |
---|
904 | #. /home2/t/t51254/palm/current_version/myprofile |
---|
905 | #. /thin/apps/pgi/mpi.sh |
---|
906 | # |
---|
907 | env |
---|
908 | # |
---|
909 | set -x |
---|
910 | |
---|
911 | %%END%% |
---|
912 | |
---|
913 | elif [[ $remote_host = lcxt5m ]] |
---|
914 | then |
---|
915 | |
---|
916 | if [[ $numprocs != 0 ]] |
---|
917 | then |
---|
918 | cat > $job_to_send << %%END%% |
---|
919 | #!/bin/ksh |
---|
920 | #PBS -S /bin/ksh |
---|
921 | #PBS -N $job_name |
---|
922 | #PBS -j oe |
---|
923 | #PBS -l walltime=$timestring |
---|
924 | #PBS -l mppwidth=${numprocs} |
---|
925 | #PBS -l mppnppn=${tasks_per_node} |
---|
926 | #PBS -m abe |
---|
927 | #PBS -o $remote_dayfile |
---|
928 | |
---|
929 | . /opt/modules/default/init/ksh |
---|
930 | $module_calls |
---|
931 | |
---|
932 | %%END%% |
---|
933 | |
---|
934 | else |
---|
935 | cat > $job_to_send << %%END%% |
---|
936 | #!/bin/ksh |
---|
937 | #PBS -S /bin/ksh |
---|
938 | #PBS -N $job_name |
---|
939 | #PBS -j oe |
---|
940 | #PBS -l walltime=$timestring |
---|
941 | #PBS -l ncpus=1 |
---|
942 | #PBS -l pmem=${memory}mb |
---|
943 | #PBS -m abe |
---|
944 | #PBS -o $remote_dayfile |
---|
945 | |
---|
946 | . /opt/modules/default/init/ksh |
---|
947 | $module_calls |
---|
948 | |
---|
949 | %%END%% |
---|
950 | |
---|
951 | fi |
---|
952 | |
---|
953 | elif [[ $remote_host = nech ]] |
---|
954 | then |
---|
955 | |
---|
956 | if (( nodes > 1 )) |
---|
957 | then |
---|
958 | cat > $job_to_send << %%END%% |
---|
959 | #!/bin/ksh |
---|
960 | #PBS -l cpunum_prc=$tasks_per_node,cputim_job=$cputime |
---|
961 | #PBS -l ${qsubmem}=${Memory}gb |
---|
962 | #PBS -b $nodes |
---|
963 | #PBS -o $remote_dayfile |
---|
964 | #PBS -N palm |
---|
965 | #PBS -j o |
---|
966 | #PBS -T mpisx |
---|
967 | |
---|
968 | %%END%% |
---|
969 | |
---|
970 | elif [[ $numprocs != 0 ]] |
---|
971 | then |
---|
972 | cat > $job_to_send << %%END%% |
---|
973 | #!/bin/ksh |
---|
974 | #PBS -l cpunum_prc=$tasks_per_node,cputim_job=$cputime |
---|
975 | #PBS -l ${qsubmem}=${Memory}gb |
---|
976 | #PBS -o $remote_dayfile |
---|
977 | #PBS -N palm |
---|
978 | #PBS -j o |
---|
979 | |
---|
980 | %%END%% |
---|
981 | |
---|
982 | else |
---|
983 | cat > $job_to_send << %%END%% |
---|
984 | #!/bin/ksh |
---|
985 | #PBS -l ${qsubmem}=${Memory}gb,${qsubtime}=$cputime |
---|
986 | #PBS -o $remote_dayfile |
---|
987 | #PBS -j o |
---|
988 | |
---|
989 | %%END%% |
---|
990 | |
---|
991 | fi |
---|
992 | |
---|
993 | elif [[ $remote_host = necriam ]] |
---|
994 | then |
---|
995 | |
---|
996 | if (( nodes > 1 )) |
---|
997 | then |
---|
998 | cat > $job_to_send << %%END%% |
---|
999 | #!/bin/ksh |
---|
1000 | #PBS -b $nodes |
---|
1001 | #PBS -o $remote_dayfile |
---|
1002 | #PBS -N $job_name |
---|
1003 | #PBS -j o |
---|
1004 | #PBS -v MPIPROGINV=YES |
---|
1005 | |
---|
1006 | %%END%% |
---|
1007 | |
---|
1008 | elif [[ $numprocs != 0 ]] |
---|
1009 | then |
---|
1010 | cat > $job_to_send << %%END%% |
---|
1011 | #!/bin/ksh |
---|
1012 | #PBS -q ${queue} |
---|
1013 | #PBS -o $remote_dayfile |
---|
1014 | #PBS -N $job_name |
---|
1015 | #PBS -j o |
---|
1016 | #PBS -v MPIPROGINV=YES |
---|
1017 | |
---|
1018 | %%END%% |
---|
1019 | |
---|
1020 | else |
---|
1021 | cat > $job_to_send << %%END%% |
---|
1022 | #!/bin/ksh |
---|
1023 | #PBS -o $remote_dayfile |
---|
1024 | #PBS -j o |
---|
1025 | |
---|
1026 | %%END%% |
---|
1027 | |
---|
1028 | fi |
---|
1029 | |
---|
1030 | elif [[ $remote_host = lctit ]] |
---|
1031 | then |
---|
1032 | cat > $job_to_send << %%END%% |
---|
1033 | #!/bin/bash |
---|
1034 | #$ -S /bin/bash |
---|
1035 | cd $job_catalog |
---|
1036 | export PATH=$PALM_BIN:\$PATH |
---|
1037 | echo \$PATH |
---|
1038 | |
---|
1039 | %%END%% |
---|
1040 | |
---|
1041 | # OPTIONEN FUER SUBMIT-KOMMANDO ZUSAMMENSTELLEN |
---|
1042 | # submcom="$submcom -N $job_name -sgeout $remote_dayfile -q default" |
---|
1043 | submcom="$submcom -g $group_number -N $job_name -rt 4320 -sgeout $remote_dayfile -q $node_usage " |
---|
1044 | |
---|
1045 | else |
---|
1046 | |
---|
1047 | cat > $job_to_send << %%END%% |
---|
1048 | # @\$-q ${queue} |
---|
1049 | # @\$-l${qsubtime} $timestring |
---|
1050 | # @\$-l${qsubmem} ${memory}mb |
---|
1051 | # @\$-o $remote_dayfile |
---|
1052 | # @\$-eo |
---|
1053 | |
---|
1054 | %%END%% |
---|
1055 | |
---|
1056 | fi |
---|
1057 | |
---|
1058 | |
---|
1059 | # BEI RECHNUNG AUF REMOTE-MASCHINEN RUECKTRANSFER DES DAYFILES PER TRAP |
---|
1060 | # BEI EXIT VERANLASSEN |
---|
1061 | # VEKTORRECHNER MUSS EIGENEN JOB STARTEN, DA DORT NOHUP NICHT FUNKTIONIERT |
---|
1062 | # AUF IBM IN SEOUL IST RUECKTRANSFER ZUR ZEIT GENERELL NICHT MOEGLICH |
---|
1063 | if [[ $delete_dayfile = false && $remote_host != $local_host ]] |
---|
1064 | then |
---|
1065 | echo "set +vx" >> $job_to_send |
---|
1066 | echo "trap '" >> $job_to_send |
---|
1067 | echo "set +vx" >> $job_to_send |
---|
1068 | if [[ $(echo $remote_host | cut -c1-3) = ibm || $(echo $remote_host | cut -c1-5) = lcsgi || $(echo $remote_host | cut -c1-3) = nec || $remote_host = lctit ]] |
---|
1069 | then |
---|
1070 | if [[ $remote_host = ibmb || $remote_host = ibmh ]] |
---|
1071 | then |
---|
1072 | return_queue=c1 |
---|
1073 | elif [[ $remote_host = ibms ]] |
---|
1074 | then |
---|
1075 | return_queue=p_normal |
---|
1076 | elif [[ $remote_host = ibmy ]] |
---|
1077 | then |
---|
1078 | return_queue=serial |
---|
1079 | elif [[ $remote_host = lcsgih || $remote_host = lcsgib ]] |
---|
1080 | then |
---|
1081 | return_queue=serialq |
---|
1082 | elif [[ $remote_host = lctit ]] |
---|
1083 | then |
---|
1084 | return_queue=sla3 |
---|
1085 | elif [[ $remote_host = necriam ]] |
---|
1086 | then |
---|
1087 | return_queue=SP |
---|
1088 | else |
---|
1089 | return_queue=unknown |
---|
1090 | fi |
---|
1091 | |
---|
1092 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
1093 | then |
---|
1094 | |
---|
1095 | echo "echo \"#!/bin/ksh\" >> scpjob.$kennung" >> $job_to_send |
---|
1096 | echo "echo \"# @ job_type = serial\" >> scpjob.$kennung" >> $job_to_send |
---|
1097 | echo "echo \"# @ job_name = transfer\" >> scpjob.$kennung" >> $job_to_send |
---|
1098 | echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$kennung" >> $job_to_send |
---|
1099 | echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$kennung " >> $job_to_send |
---|
1100 | echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung" >> $job_to_send |
---|
1101 | echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung" >> $job_to_send |
---|
1102 | if [[ $host != "ibmh" ]] |
---|
1103 | then |
---|
1104 | echo "echo \"# @ class = $return_queue\" >> scpjob.$kennung" >> $job_to_send |
---|
1105 | fi |
---|
1106 | echo "echo \"# @ image_size = 10\" >> scpjob.$kennung" >> $job_to_send |
---|
1107 | echo "echo \"# @ notification = never\" >> scpjob.$kennung" >> $job_to_send |
---|
1108 | |
---|
1109 | echo "echo \"# @ queue\" >> scpjob.$kennung" >> $job_to_send |
---|
1110 | echo "echo \" \" >> scpjob.$kennung" >> $job_to_send |
---|
1111 | |
---|
1112 | echo "echo \"set -x\" >> scpjob.$kennung" >> $job_to_send |
---|
1113 | 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 |
---|
1114 | echo "echo \"exit\" >> scpjob.$kennung" >> $job_to_send |
---|
1115 | |
---|
1116 | elif [[ $remote_host = nech ]] |
---|
1117 | then |
---|
1118 | echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send |
---|
1119 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
1120 | echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100" >> $job_to_send |
---|
1121 | echo "#PBS -o last_job_transfer_protocol" >> $job_to_send |
---|
1122 | echo "#PBS -j o" >> $job_to_send |
---|
1123 | echo " " >> $job_to_send |
---|
1124 | echo "set -x" >> $job_to_send |
---|
1125 | echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send |
---|
1126 | echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
1127 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
1128 | echo "%%END%%" >> $job_to_send |
---|
1129 | |
---|
1130 | elif [[ $remote_host = necriam ]] |
---|
1131 | then |
---|
1132 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
1133 | echo "#PBS -q $return_queue" >> $job_to_send |
---|
1134 | echo "#PBS -o last_job_transfer_protocol" >> $job_to_send |
---|
1135 | echo "#PBS -j o" >> $job_to_send |
---|
1136 | echo " " >> $job_to_send |
---|
1137 | echo "set -x" >> $job_to_send |
---|
1138 | echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
1139 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
1140 | echo "%%END%%" >> $job_to_send |
---|
1141 | |
---|
1142 | elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]] |
---|
1143 | then |
---|
1144 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
1145 | echo "#!/bin/bash" >> $job_to_send |
---|
1146 | echo "#PBS -N job_protocol_transfer" >> $job_to_send |
---|
1147 | echo "#PBS -l walltime=00:30:00" >> $job_to_send |
---|
1148 | echo "#PBS -l nodes=1:ppn=1" >> $job_to_send |
---|
1149 | echo "#PBS -l feature=data" >> $job_to_send |
---|
1150 | echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol" >> $job_to_send |
---|
1151 | echo "#PBS -j oe" >> $job_to_send |
---|
1152 | echo " " >> $job_to_send |
---|
1153 | echo ". /usr/share/modules/init/bash" >> $job_to_send |
---|
1154 | echo "set -x" >> $job_to_send |
---|
1155 | echo "batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
1156 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
1157 | echo "%%END%%" >> $job_to_send |
---|
1158 | |
---|
1159 | elif [[ $remote_host = lctit ]] |
---|
1160 | then |
---|
1161 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
1162 | echo "set -x" >> $job_to_send |
---|
1163 | echo "PATH=\$PATH:$job_catalog/../pub" >> $job_to_send |
---|
1164 | echo "cd $job_catalog" >> $job_to_send |
---|
1165 | echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
1166 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
1167 | echo "%%END%%" >> $job_to_send |
---|
1168 | |
---|
1169 | else |
---|
1170 | |
---|
1171 | echo "cat > scpjob.$kennung << %%END%%" >> $job_to_send |
---|
1172 | echo "# @\\\$-q $return_queue" >> $job_to_send |
---|
1173 | echo "# @\\\$-l${qsubtime} 10" >> $job_to_send |
---|
1174 | echo "# @\\\$-l${qsubmem} 10mb" >> $job_to_send |
---|
1175 | if [[ $remote_host = t3ej2 || $remote_host = t3ej5 || $remote_host = t3es ]] |
---|
1176 | then |
---|
1177 | echo "# @\$-l mpp_p=0" >> $job_to_send |
---|
1178 | fi |
---|
1179 | echo '# @\$-lF 10mb' >> $job_to_send |
---|
1180 | # echo '# @\$-o /dev/null' >> $job_to_send |
---|
1181 | echo '# @\$-o job_queue/last_job_transfer_protocol' >> $job_to_send |
---|
1182 | echo '# @\\\$-eo' >> $job_to_send |
---|
1183 | echo " " >> $job_to_send |
---|
1184 | if [[ $remote_host = t3ej2 || $remote_host = t3ej5 ]] |
---|
1185 | then |
---|
1186 | echo "set +vx" >> $job_to_send |
---|
1187 | echo ". .profile" >> $job_to_send |
---|
1188 | fi |
---|
1189 | echo "set -x" >> $job_to_send |
---|
1190 | echo "batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null" >> $job_to_send |
---|
1191 | echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send |
---|
1192 | echo "%%END%%" >> $job_to_send |
---|
1193 | fi |
---|
1194 | |
---|
1195 | if [[ $(echo $remote_host | cut -c1-3) = ibm ]] |
---|
1196 | then |
---|
1197 | echo "llsubmit scpjob.$kennung" >> $job_to_send |
---|
1198 | elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]] |
---|
1199 | then |
---|
1200 | echo "chmod u+x scpjob.$kennung" >> $job_to_send |
---|
1201 | echo "msub scpjob.$kennung" >> $job_to_send |
---|
1202 | elif [[ $remote_host = lctit ]] |
---|
1203 | then |
---|
1204 | echo "chmod u+x scpjob.$kennung" >> $job_to_send |
---|
1205 | echo "rm -rf ${job_catalog}/last_job_transfer_protocol" >> $job_to_send |
---|
1206 | echo "n1ge -N jobtransfer -q $return_queue -sgeout ${job_catalog}/last_job_transfer_protocol scpjob.$kennung" >> $job_to_send |
---|
1207 | echo "sleep 10" >> $job_to_send |
---|
1208 | elif [[ $remote_host = t3eb || $remote_host = t3eh || $remote_host = t3ej2 || $remote_host = t3ej5 ]] |
---|
1209 | then |
---|
1210 | echo "qsub -J n scpjob.$kennung" >> $job_to_send |
---|
1211 | elif [[ $remote_host = t3es ]] |
---|
1212 | then |
---|
1213 | echo "qsub -J n -s /bin/ksh scpjob.$kennung" >> $job_to_send |
---|
1214 | else |
---|
1215 | echo "qsub scpjob.$kennung" >> $job_to_send |
---|
1216 | fi |
---|
1217 | echo "rm scpjob.$kennung" >> $job_to_send |
---|
1218 | if [[ $remote_host = nech ]] |
---|
1219 | then |
---|
1220 | echo "cd -" >> $job_to_send |
---|
1221 | fi |
---|
1222 | else |
---|
1223 | # echo "ftpcopy -d $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send |
---|
1224 | echo "nohup ftpcopy -d -w 15 $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null &" >> $job_to_send |
---|
1225 | fi |
---|
1226 | echo "set -x" >> $job_to_send |
---|
1227 | echo " ' exit" >> $job_to_send |
---|
1228 | echo "set -x" >> $job_to_send |
---|
1229 | fi |
---|
1230 | |
---|
1231 | |
---|
1232 | |
---|
1233 | # EIGENTLICHE JOB-DATEI AN QSUB-KOMMANDOS ANHAENGEN |
---|
1234 | cat $file_to_send >> $job_to_send |
---|
1235 | |
---|
1236 | if [[ $remote_host = ibm ]] |
---|
1237 | then |
---|
1238 | echo " " >> $job_to_send |
---|
1239 | echo "exit" >> $job_to_send |
---|
1240 | fi |
---|
1241 | if [[ $remote_host = lctit ]] |
---|
1242 | then |
---|
1243 | echo " " >> $job_to_send |
---|
1244 | echo "rm ~/job_queue/$job_on_remhost" >> $job_to_send |
---|
1245 | fi |
---|
1246 | |
---|
1247 | |
---|
1248 | |
---|
1249 | # USER-NAME AUF ZIELRECHNER AUS .NETRC-DATEI ERMITTELN |
---|
1250 | if [[ -z $remote_user ]] |
---|
1251 | then |
---|
1252 | if [[ $remote_host = t3eb || $remote_host = t3eh || $remote_host = t3ej2 || $remote_host = t3ej5 || $remote_host = t3es || $remote_host = vpp ]] |
---|
1253 | then |
---|
1254 | grep $remote_addres ~/.netrc | read dum dum dum remote_user dum dum |
---|
1255 | fi |
---|
1256 | fi |
---|
1257 | |
---|
1258 | |
---|
1259 | |
---|
1260 | # JOB AUF ZIELRECHNER TRANSFERIEREN BZW. INS JOBVERZEICHNIS KOPIEREN |
---|
1261 | if [[ $no_submit = false ]] |
---|
1262 | then |
---|
1263 | if [[ $remote_host != $local_host ]] |
---|
1264 | then |
---|
1265 | [[ $verify = true ]] && printf "\n >>> transfering job to \"$remote_host\"..." |
---|
1266 | if [[ $remote_host = ibms || $remote_host = ibmy ]] # ssh on ibms cannot handle "~/" |
---|
1267 | then |
---|
1268 | job_catalog_save=$job_catalog |
---|
1269 | job_catalog=job_queue |
---|
1270 | elif [[ $remote_host = nech ]] |
---|
1271 | then |
---|
1272 | job_catalog_save=$job_catalog |
---|
1273 | job_catalog=/hpf/b/${remote_user}/job_queue |
---|
1274 | fi |
---|
1275 | if [[ $local_host = decalpha ]] |
---|
1276 | then |
---|
1277 | # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE |
---|
1278 | # PASSWORT AB |
---|
1279 | /bin/scp $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost |
---|
1280 | elif [[ $remote_host = nech ]] |
---|
1281 | then |
---|
1282 | # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ |
---|
1283 | # TRANSFERIERT WERDEN |
---|
1284 | scp $job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost |
---|
1285 | else |
---|
1286 | scp $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost |
---|
1287 | fi |
---|
1288 | if [[ $? = 1 ]] |
---|
1289 | then |
---|
1290 | locat=scp; exit |
---|
1291 | fi |
---|
1292 | if [[ $remote_host = ibms ]] |
---|
1293 | then |
---|
1294 | job_catalog=$job_catalog_save |
---|
1295 | fi |
---|
1296 | [[ $verify = true ]] && printf "\n >>> finished\n" |
---|
1297 | else |
---|
1298 | eval job_catalog=$job_catalog |
---|
1299 | cp $job_to_send ${job_catalog}/$job_on_remhost |
---|
1300 | fi |
---|
1301 | |
---|
1302 | |
---|
1303 | |
---|
1304 | # NQS- BZW. LOADLEVELER-JOB STARTEN |
---|
1305 | if [[ $remote_host != $local_host ]] |
---|
1306 | then |
---|
1307 | [[ $verify = true ]] && printf "\n >>> submitting job using \"qsub\"...\n" |
---|
1308 | if [[ $remote_host != lctit ]] |
---|
1309 | then |
---|
1310 | if [[ $(echo $remote_host | cut -c1-5) = lcsgi && $prio = true ]] |
---|
1311 | then |
---|
1312 | printf "\n >>> submit with HLRN qos-feature hiprio...\n" |
---|
1313 | ssh $remote_addres -l $remote_user "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost" |
---|
1314 | else |
---|
1315 | ssh $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" |
---|
1316 | fi |
---|
1317 | else |
---|
1318 | # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS |
---|
1319 | # MIT SSH, DESHALB AUFRUF PER PIPE |
---|
1320 | # UEBERGANGSWEISE CHECK, OB N1GE ENVIRONMENT WIRKLICH VERFUEGBAR |
---|
1321 | print "cd $job_catalog; chmod u+x $job_on_remhost" | ssh $remote_addres -l $remote_user > /dev/null 2>&1 |
---|
1322 | echo "first try" > send_protocol |
---|
1323 | while [[ $(cat send_protocol | grep -c "Forwarding to N1GE") = 0 ]] |
---|
1324 | do |
---|
1325 | if [[ $(cat send_protocol | grep -c "first try") = 1 ]] |
---|
1326 | then |
---|
1327 | printf "\n trying to submit job to TIT cluster..." |
---|
1328 | else |
---|
1329 | printf "\n +++ failed ... trying to submit again ..." |
---|
1330 | fi |
---|
1331 | print "cd $job_catalog; $submcom $job_on_remhost" | ssh $remote_addres -l $remote_user > send_protocol 2>&1 |
---|
1332 | cat send_protocol |
---|
1333 | done |
---|
1334 | sleep 10 |
---|
1335 | print "cd $job_catalog; rm $job_on_remhost" | ssh $remote_addres -l $remote_user > /dev/null 2>&1 |
---|
1336 | echo "$submcom $job_on_remhost" |
---|
1337 | rm send_protocol |
---|
1338 | fi |
---|
1339 | |
---|
1340 | [[ $verify = true ]] && printf " >>> o.k.\n" |
---|
1341 | else |
---|
1342 | cd $job_catalog |
---|
1343 | if [[ $(echo $local_host | cut -c1-5) = lcsgi || $(echo $local_host | cut -c1-3) = ibm ]] |
---|
1344 | then |
---|
1345 | eval $submcom $job_on_remhost |
---|
1346 | elif [[ $local_host = lcfimm || $local_host = lctit || $localhost = lcxt4 || $localhost = lck ]] |
---|
1347 | then |
---|
1348 | eval $submcom $job_on_remhost |
---|
1349 | echo "$submcom $job_on_remhost" |
---|
1350 | chmod u+x $job_on_remhost |
---|
1351 | |
---|
1352 | elif [[ $(echo $local_host | cut -c1-5) = lcsgi ]] |
---|
1353 | then |
---|
1354 | eval $submcom $job_on_remhost |
---|
1355 | elif [[ $local_host = nech ]] |
---|
1356 | then |
---|
1357 | if [[ $queue = default ]] |
---|
1358 | then |
---|
1359 | eval $submcom $job_on_remhost |
---|
1360 | else |
---|
1361 | eval $submcom -q $queue $job_on_remhost |
---|
1362 | fi |
---|
1363 | else |
---|
1364 | qsub $job_on_remhost |
---|
1365 | fi |
---|
1366 | # JOBFILE DARF AUF LCTIT NICHT GELOESCHT WERDEN!! GESCHIEHT ERST AM JOBENDE |
---|
1367 | [[ $local_host != lctit ]] && rm $job_on_remhost |
---|
1368 | cd - > /dev/null |
---|
1369 | fi |
---|
1370 | fi |
---|
1371 | |
---|
1372 | |
---|
1373 | |
---|
1374 | # ABSCHLUSSARBEITEN |
---|
1375 | |
---|
1376 | if [[ $no_submit = false ]] |
---|
1377 | then |
---|
1378 | rm $job_to_send |
---|
1379 | fi |
---|
1380 | [[ $verify = true ]] && printf "\n\n *** SUBJOB finished \n\n" |
---|