source: palm/trunk/SCRIPTS/subjob @ 1273

Last change on this file since 1273 was 1267, checked in by heinze, 10 years ago

last commit documented

  • Property svn:keywords set to Id Rev
File size: 58.5 KB
Line 
1#!/bin/ksh
2
3# subjob - script for automatic generation and submission of batch-job files
4#          for various batch queuing systems
5
6#--------------------------------------------------------------------------------#
7# This file is part of PALM.
8#
9# PALM is free software: you can redistribute it and/or modify it under the terms
10# of the GNU General Public License as published by the Free Software Foundation,
11# either version 3 of the License, or (at your option) any later version.
12#
13# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
14# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License along with
18# PALM. If not, see <http://www.gnu.org/licenses/>.
19#
20# Copyright 1997-2012  Leibniz University Hannover
21#--------------------------------------------------------------------------------#
22#
23# Current revisions:
24# ------------------
25# further adjustments for lccrayb (use msub instead of qsub)
26#
27# Former revisions:
28# -----------------
29# $Id: subjob 1267 2013-12-11 12:08:28Z witha $
30#
31# 1266 2013-12-11 12:07:34Z heinze
32# further adjustments for lccrayb (use msub instead of qsub)
33#
34# 1264 2013-12-09 12:46:09Z fricke
35# Bugfix: Using number of nodes instead of number of processors (lccrayb)
36#
37# 1262 2013-12-09 10:57:20Z fricke
38# further adjustments for lccrayb
39#
40# 1260 2013-12-04 12:48:04Z raasch
41# jaboticaba admitted
42#
43# 1255 2013-11-07 14:43:35Z raasch
44# further adjustments for lccrayb
45#
46# 1224 2013-09-16 07:27:23Z raasch
47# first adjustments for lccrayb
48#
49# 1202 2013-07-10 16:22:07Z witha
50# adjustments for Forwind cluster (lcflow)
51#
52# 1199 2013-07-05 14:52:22Z raasch
53# adjustments for CSC Helsinki (lccrayf)
54#
55# use of cluster/express queue enabled (ibmh)
56# vinessa added (imuk)
57#
58# 1103 2013-02-20 02:15:53Z raasch
59# bash compatibility adjustments (usage of OPTIND, output formatting with printf
60# instead typeset -L/R),
61# further adjustments for lckyuh
62#
63# 2013-02-10 01:47:43Z raasch
64# adjustments for Kyushu-Univeristy computing center (lckyuh - hayaka)
65# and for Forwind cluster (lcflow)
66#
67# 1094 2013-02-03 01:52:12Z raasch
68# new option -P for explicit setting of ssh/scp port,
69# decalpha parts (yonsei) removed
70#
71# 2013-02-02 07:06:13Z raasch
72# adjustments for Kyushu-University computing center (lckyut - tatara)
73# old changelog messages removed
74#
75# 1046 2012-11-09 14:38:45Z maronga
76# code put under GPL (PALM 3.9)
77#
78# 08/07/94 - Siggi - first version finished
79# 29/06/94 - Siggi - script development started
80#--------------------------------------------------------------------------------#
81# subjob - script for automatic generation and submission of batch-job files
82#          for various batch queuing systems
83#--------------------------------------------------------------------------------#
84
85
86    # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
87 delete_dayfile=false
88 email_notification=none
89 group_number=none
90 locat=normal
91 no_default_queue=none
92 no_submit=false
93 job_catalog="~/job_queue"
94 job_name=none
95 local_user=$LOGNAME
96 node_usage=shared
97 numprocs=0
98 punkte="..........................................................."
99 submcom=qsub
100 queue=default
101 remote_host=none
102 remote_user=""
103 verify=true
104
105 typeset  -i   cputime=memory=Memory=0  minuten  resttime  sekunden  stunden
106 typeset  -i   inumprocs  mpi_tasks=nodes=processes_per_node=0 tasks_per_node=threads_per_task=1
107
108
109
110    # FEHLERBEHANDLUNG
111    # BEI EXIT:
112 trap 'if [[ $locat != normal ]]
113       then
114          case  $locat  in
115             (option)  printf "\n  --> available optios can be displayed"
116                       printf " by typing:"
117                       printf "\n      \"subjob ?\" \n";;
118             (ftpcopy|parameter|scp|verify)  printf "\n";;
119             (*)       printf "\n  +++ unknown error"
120                       printf "\n      please inform S. Raasch!\n"
121          esac
122          [[ -f $job_to_send ]]  &&  rm  $job_to_send
123          printf "\n\n+++ SUBJOB killed \n\n"
124       fi' exit
125
126
127    # BEI TERMINAL-BREAK:
128 trap '[[ -f $job_to_send ]]  &&  rm  $job_to_send
129       printf "\n\n+++ SUBJOB killed \n\n"
130       exit
131      ' 2
132
133
134
135
136    # LOKALEN HOSTNAMEN FESTSTELLEN
137 local_host=$(hostname)
138
139
140
141    # HOSTSPEZIFISCHE VARIABLEN VEREINBAREN BZW. PRUEFEN, OB LOKALER HOST
142    # UEBERHAUPT ZULAESSIG IST
143    # Note: One of the entries for "lck" or "lckordi" always has to be
144    # comment out, because the hostname (node*) is same for both machines
145 case  $local_host  in
146     (ambiel-lx)             local_addres=134.106.74.48;  local_host=lcfor;;
147     (atmos)                 local_addres=172.20.25.35;   local_host=lcide;;
148     (austru)                local_addres=130.75.105.128; local_host=lcmuk;;
149     (autan)                 local_addres=130.75.105.57;  local_host=lcmuk;;
150     (bora)                  local_addres=130.75.105.103; local_host=lcmuk;;
151     (bd1)                   local_addres=130.73.232.64;  local_host=lcsgib;;
152     (bd2)                   local_addres=130.73.232.65;  local_host=lcsgib;;
153     (bd3)                   local_addres=130.73.232.66;  local_host=lcsgib;;
154     (bd4)                   local_addres=130.73.232.67;  local_host=lcsgib;;
155     (b01*|bicegate1)        local_addres=130.73.232.102; local_host=lcsgib;;
156     (b04*)                  local_addres=133.5.4.33;     local_host=lckyuh;;
157     (bicegate2)             local_addres=130.73.232.103; local_host=lcsgib;;
158     (blizzard1)             local_addres=136.172.40.15;  local_host=ibmh;;
159     (blogin*|bxc*)          local_addres=130.73.233.1;   local_host=lccrayb;;
160     (breva)                 local_addres=130.75.105.98;  local_host=lcmuk;;
161     (buran)                 local_addres=130.75.105.58;  local_host=lcmuk;;
162     (caurus)                local_addres=130.75.105.19;  local_host=lcmuk;;
163     (climate*)              local_addres=165.132.26.68;  local_host=lcyon;;
164     (clogin*)               local_addres=86.50.166.21;   local_host=lccrayf;;
165     (compute-*.local)       local_addres=172.20.4.2;     local_host=lcfimm;;
166     (cs*)                   local_addres=136.172.44.131; local_host=nech;;
167     (elephanta)             local_addres=130.75.105.6;   local_host=lcmuk;;
168     (fimm.bccs.uib.no)      local_addres=172.20.4.2;     local_host=lcfimm;;
169     (flow01)                local_addres=10.141.255.71;  local_host=lcflow;;
170     (flow02)                local_addres=10.141.255.72;  local_host=lcflow;;
171     (node*)                 local_addres=165.132.26.61   local_host=lck;;
172   #  (node*)                 local_addres=210.219.61.8    local_host=lckordi;;
173     (gaia*)                 local_addres=150.183.146.24; local_host=ibmkisti;;
174     (gallego)               local_addres=130.75.105.10;  local_host=lcmuk;;
175     (gfdl5)                 local_addres=165.132.26.58;  local_host=ibmy;;
176     (gregale)               local_addres=130.75.105.109; local_host=lcmuk;;
177     (hababai)               local_addres=130.75.105.108; local_host=lcmuk;;
178     (hayaka*)               local_addres=133.5.4.33;     local_host=lckyuh;;
179     (hexagon.bccs.uib.no)   local_addres=129.177.20.113; local_host=lcxe6;;
180     (hd1)                   local_addres=130.75.4.104;   local_host=lcsgih;;
181     (hd2)                   local_addres=130.75.4.105;   local_host=lcsgih;;
182     (hd3)                   local_addres=130.75.4.106;   local_host=lcsgih;;
183     (hd4)                   local_addres=130.75.4.107;   local_host=lcsgih;;
184     (hicegate0)             local_addres=130.75.4.101;   local_host=lcsgih;;
185     (h01*|hicegate1)        local_addres=130.75.4.102;   local_host=lcsgih;;
186     (hicegate2)             local_addres=130.75.4.103;   local_host=lcsgih;;
187     (hx*)                   local_addres=133.3.51.11;    local_host=lckyoto;;
188     (inferno)               local_addres=130.75.105.5;   local_host=lcmuk;;
189     (irifi)                 local_addres=130.75.105.104; local_host=lcmuk;;
190     (jaboticaba)            local_addres=150.163.25.181; local_host=lcbr;;
191     (sno)                   local_addres=130.75.105.113; local_host=lcmuk;;
192     (levanto)               local_addres=130.75.105.45;  local_host=lcmuk;;
193     (login*)                local_addres=118.128.66.223; local_host=lckiaps;;
194     (maestro)               local_addres=130.75.105.2;   local_host=lcmuk;;
195     (meller)                local_addres=134.106.74.155; local_host=lcfor;;
196     (meteo-login*)          local_addres=193.166.211.144;local_host=lcxt5m;;
197     (hexagon*)              local_addres=129.177.20.113; local_host=lcxe6;;
198     (nobel*)                local_addres=150.183.5.101;  local_host=ibms;;
199     (orkan)                 local_addres=130.75.105.3;   local_host=lcmuk;;
200     (ostria)                local_addres=130.75.105.106; local_host=lcmuk;;
201     (paesano)               local_addres=130.75.105.46;  local_host=lcmuk;;
202     (pcj*)                  local_addres=172.31.120.1;   local_host=lckyut;;
203     (pingui)                local_addres=134.106.74.118; local_host=lcfor;;
204     (quanero)               local_addres=130.75.105.107; local_host=lcmuk;;
205     (rte*)                  local_addres=133.5.185.60;   local_host=lcrte;;
206     (r1*)                   local_addres=130.75.4.102;   local_host=lcsgih;;
207     (r2*)                   local_addres=130.73.232.102; local_host=lcsgib;;
208     (scirocco)              local_addres=172.20.25.41;   local_host=lcmuk;;
209     (shiokaze-lx)           local_addres=134.106.74.123; local_host=lcfor;;
210     (sisu-login*)           local_addres=86.50.166.21;   local_host=lccrayf;;
211     (solano)                local_addres=130.75.105.110; local_host=lcmuk;;
212     (sugoka*)               local_addres=172.31.120.1;   local_host=lckyut;;
213     (sun1|sun2)             local_addres=130.75.6.1;     local_host=unics;;
214     (sx-*)                  local_addres=172.16.1.131;   local_host=necriam;;
215     (t2a*)                  local_addres=10.1.6.165;     local_host=lctit;;
216     (urban*)                local_addres=147.46.30.151   local_host=lcsb;;
217     (vinessa)               local_addres=130.75.105.112; local_host=lcmuk;;
218     (vorias)                local_addres=172.20.25.43;   local_host=lcmuk;;
219     (*.cc.kyushu-u.ac.jp)   local_addres=133.5.4.129;    local_host=ibmku;;
220     (*)                     printf "\n  +++ \"$local_host\" unknown";
221                             printf "\n      please contact the PALM group at IMUK";
222                             locat=parameter; exit;;
223 esac
224
225
226
227    # REMOTE HOST DEFAULTMAESSIG = LOCAL HOST SETZEN
228 remote_host=$local_host
229
230
231
232
233    # PROZEDUROPTIONEN EINLESEN
234 while  getopts  :c:dDe:g:h:m:n:N:O:P:q:t:T:u:vX:  option
235 do
236   case  $option  in
237       (c)   job_catalog=$OPTARG;;
238       (d)   delete_dayfile=true;;
239       (D)   no_submit=true;;
240       (e)   email_notification=$OPTARG;;
241       (g)   group_number=$OPTARG;;
242       (h)   remote_host=$OPTARG;;
243       (m)   memory=$OPTARG;;
244       (n)   job_name=$OPTARG;;
245       (N)   node_usage=$OPTARG;;
246       (O)   threads_per_task=$OPTARG;;
247       (P)   scp_port=$OPTARG;;
248       (q)   no_default_queue=$OPTARG;;
249       (t)   cputime=$OPTARG;;
250       (T)   tasks_per_node=$OPTARG;;
251       (u)   remote_user=$OPTARG;;
252       (v)   verify=false;;
253       (X)   numprocs=$OPTARG;;
254       (\?)  printf "\n  +++ Option $OPTARG unknown \n";
255             locat=option; exit;;
256   esac
257 done
258
259
260    # JOBDATEINAMEN ALS NAECHSTES ARGUMENT HOLEN
261 (( to_shift = $OPTIND - 1 ))
262 shift $to_shift; file_to_send=$1
263
264
265    # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN
266 if [ "$1" = "?" ]
267 then
268   (printf "\n  *** subjob can be called as follows:\n"
269    printf "\n      subjob -c.. -d -D -h.. -m.. -q.. -t.. -u.. -v  <jobfile>\n"
270    printf "\n      Description of available options:\n"
271    printf "\n      Option  Description                         Default-Value"
272    printf "\n        -c    job-input- and output-catalog       ~/job_queue"
273    printf "\n        -d    no job-protocol will be created     ---"
274    printf "\n        -D    only the job-file will be created   ---"
275    printf "\n        -h    execution host, available hosts:    $remote_host"
276    printf "\n              ibm, ibmh, ibmkisti, ibmku, ibms, ibmy, lc...,"
277    printf "\n              lckiaps, lctit, nech, necriam, unics"
278    printf "\n        -m    memory demand per process in MByte  ---"
279    printf "\n        -n    jobname                             <jobdatei>"
280    printf "\n        -O    threads per task (for OpenMP usage) 1"
281    printf "\n        -P    ssh/scp port                        default port"
282    printf "\n        -q    job-queue to be used                default"
283    printf "\n        -t    allowed cpu-time in seconds         ---"
284    printf "\n        -T    tasks per node (on parallel hosts)  ---"
285    printf "\n        -u    username on execution host          from .netrc"
286    printf "\n        -v    no prompt for confirmation          ---"
287    printf "\n        -X    # of processors (on parallel hosts) 1"
288    printf "\n "
289    printf "\n      The only possible positional parameter is <jobfile>:"
290    printf "\n      The complete NQS-job must be provided here."
291    printf "\n      <jobfile>=? creates this outline\n\n") | more
292    exit
293 fi
294
295
296
297    # PRUEFEN, OB JOBDATEI ANGEGEBEN WURDE UND OB SIE AUCH EXISTIERT
298 if [[ "$file_to_send" = "" ]]
299 then
300    printf "\n  +++ job-file missing"
301    locat=parameter; exit
302 else
303    if [[ -f $file_to_send ]]
304    then
305       true
306    else
307       printf "\n  +++ job-file: "
308       printf "\n           $file_to_send"
309       printf "\n      does not exist"
310       locat=parameter; exit
311    fi
312 fi
313
314
315
316    # FALLS KEIN JOBNAME ANGEGEBEN WURDE, WIRD JOBNAME = JOBDATEINAME
317    # GESETZT. VORAUSSETZUNG: JOBDATEINAME BEINHALTET KEINE PFADE
318 if [[ $job_name = none ]]
319 then
320    job_name=$file_to_send
321 fi
322 if [[ $(echo $job_name | grep -c "/") != 0 ]]
323 then
324    printf "\n  +++ job-file name: "
325    printf "\n           $job_name"
326    printf "\n      must not contain \"/\"-characters"
327    locat=parameter; exit
328 fi
329
330
331
332
333    # HOSTSPEZIFISCHE GROESSEN VEREINBAREN BZW. ABBRUCH BEI UNZULAESSIGEM HOST
334    # ODER WENN HOST NICHT ANGEGEBEN WURDE
335 if [[ $remote_host = none ]]
336 then
337    printf "\n  +++ host missing"
338    locat=option; exit
339 else
340    case  $remote_host  in
341        (ibm)     queue=p690_standard; remote_addres=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
342        (ibmh)    queue=cluster; remote_addres=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
343        (ibmkisti) queue=class.32plus; remote_addres=150.183.146.24; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
344        (ibmku)   queue=s4; remote_addres=133.5.4.129; submcom=/usr/local/bin/llsubmit;;
345        (ibms)    queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
346        (ibmy)    queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
347        (lccrayb) queue=testq; remote_addres=130.73.233.1; submcom=/opt/moab/7.2.6/bin/msub;;
348        (lccrayf) queue=small; remote_addres=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;;
349        (lcfimm)  remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;;
350        (lcflow)  remote_addres=10.140.1.71; submcom=/cm/shared/apps/sge/6.2u5p2/bin/lx26-amd64/qsub;;
351        (lckyoto) remote_addres=133.3.51.11; submcom=/thin/local/bin/qsub;;
352        (lcsgib)  queue=smallq; remote_addres=130.73.232.104; submcom=/opt/moab/bin/msub;;
353        (lcsgih)  queue=smallq; remote_addres=130.75.4.101; submcom=/opt/moab/bin/msub;;
354        (lck)     remote_addres=165.132.26.61; submcom=/usr/torque/bin/qsub;;
355        (lckiaps) remote_addres=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;;
356        (lckordi) remote_addres=210.219.61.8; submcom=/usr/torque/bin/qsub;;
357        (lckyuh)  remote_addres=133.5.4.33; submcom=/usr/bin/pjsub;;
358        (lckyut)  remote_addres=133.5.4.37; submcom=/usr/bin/pjsub;;
359        (lcsb)    remote_addres=147.46.30.151; submcom=/usr/torque/bin/qsub;;
360        (lctit)   queue=S; remote_addres=10.1.6.165; submcom=/opt/pbs/tools/bin/t2sub;;
361        (lcxe6)   remote_addres=129.177.20.113; submcom=/opt/torque/2.5.10/bin/qsub;;
362        (lcxt5m)  remote_addres=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;;
363        (lcyon)   remote_addres=165.132.26.68; submcom=/usr/torque/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        (ibmh)   case  $ndq  in
385                     (cluster|express)  error=false;;
386                     (*)                                     error=true;;
387                 esac;;
388        (ibmkisti)   case  $ndq  in
389                     (class.32plus|class.1-2|class.2-32)  error=false;;
390                     (*)                                     error=true;;
391                 esac;;
392        (ibmku)  case  $ndq  in
393                     (sdbg1|sdbg2|sdbg4|s4|s16|s32|s32-s)    error=false;;
394                     (*)                                     error=true;;
395                 esac;;
396        (ibms)   case  $ndq  in
397                     (express|normal|p_express|p_normal|p_normal_1.3|p_normal_1.7|grand)     error=false;;
398                     (*)                                     error=true;;
399                 esac;;
400        (ibmy)   case  $ndq  in
401                     (parallel)                              error=false;;
402                     (*)                                     error=true;;
403                 esac;;
404        (lccrayb) case  $ndq  in
405                     (mpp1q|mpp1testq|testq)                 error=false;;
406                     (*)                                     error=true;;
407                 esac;;
408        (lccrayf) case  $ndq  in
409                     (usup|test*|small|large)                error=false;;
410                     (*)                                     error=true;;
411                 esac;;
412        (lcflow) case  $ndq  in
413                     (cfd_lom_long.q|cfd_him_long.q|cfd_lom_serl.q|cfd_lom_shrt.q|cfd_him_shrt.q)  error=false;;
414                     (*)                                     error=true;;
415                 esac;;
416        (lckiaps) case  $ndq  in
417                     (express|normal)                        error=false;;
418                     (*)                                     error=true;;
419                 esac;;
420        (lckyoto) case  $ndq  in
421                     (eh|ph)                                 error=false;;
422                     (*)                                     error=true;;
423                 esac;;
424        (lckyuh) case  $ndq  in
425                     (fx-dbg|fx-single|fx-small|fx-middle|fx-large)  error=false;;
426                     (*)                                     error=true;;
427                 esac;;
428        (lckyut) case  $ndq  in
429                     (cx-dbg|cx-single|cx-small|cx-middle|cx-large)  error=false;;
430                     (*)                                     error=true;;
431                 esac;;
432        (lcsgib|lcsgih)   case  $ndq  in
433                     (testq|serialq|smallq|mediumq|bigq|workq|dataq|permq|special1q)       error=false;;
434                     (*)                                     error=true;;
435                 esac;;
436        (lctit)  case  $ndq  in
437                     (G|L128|L256|L512H|S|S96|V)             error=false;;
438                     (*)                                     error=true;;
439                 esac;;
440        (t3eb)   case  $ndq  in
441                     (berte|p50|p100|p392|forfree|p25himem)  error=false;;
442                     (*)    error=true;;
443                 esac;;
444        (necriam) case  $ndq  in
445                     (SP|SS|P6)  error=false;;
446                     (*)    error=true;;
447                 esac;;
448        (t3eh)   case  $ndq  in
449                     (para_t3e|em|k|l|lm|comp_t3e|c|p|ht)  error=false;;
450                     (*)    error=true;;
451                 esac;;
452        (t3ej2|t3ej5)  case  $ndq  in
453                     (low|normal|high)  error=false;;
454                     (*)    error=true;;
455                 esac;;
456        (t3es)  case  $ndq  in
457                     (batch|serial-4|pe4|p48|pe16|pe32|pe64|pe128)  error=false;;
458                     (*)    error=true;;
459                 esac;;
460        (unics)  case  $ndq  in
461                     (unics|ht)  error=false;;
462                     (*)         error=true;;
463                 esac;;
464    esac
465    if [[ $error = true ]]
466    then
467       printf "\n  +++ queue \"$no_default_queue\" on host \"$remote_host\" not allowed"
468       locat=parameter; exit
469    else
470       queue=$no_default_queue
471    fi
472 fi
473
474
475
476    # PRUEFEN DER CPU-ZEIT, ZEIT NACH STUNDEN, MINUTEN UND SEKUNDEN
477    # AUFTEILEN
478 done=false
479 while [[ $done = false ]]
480 do
481    if (( $cputime <= 0 ))
482    then
483       printf "\n  +++ wrong cpu-time or cpu-time missing"
484       printf "\n  >>> Please type cpu-time in seconds as INTEGER:"
485       printf "\n  >>> "
486       read  cputime  1>/dev/null  2>&1
487    else
488       done=true
489    fi
490 done
491 if [[ $remote_host = nech ]]
492 then
493    if (( tasks_per_node != 0 ))
494    then
495       (( cputime = cputime * tasks_per_node ))
496    elif [[ $numprocs != 0 ]]
497    then
498       (( cputime = cputime * numprocs ))
499    fi
500 fi
501 (( stunden  = cputime / 3600 ))
502 (( resttime = cputime - stunden * 3600 ))
503 (( minuten  = resttime / 60 ))
504 (( sekunden = resttime - minuten * 60 ))
505 timestring=${stunden}:${minuten}:${sekunden}
506
507
508
509    # PRUEFEN DER KERNSPEICHERANFORDERUNG
510 done=false
511 while [[ $done = false ]]
512 do
513    if (( memory <= 0 ))
514    then
515       printf "\n  +++ wrong memory demand or memory demand missing"
516       printf "\n  >>> Please type memory in  MByte per process  as INTEGER:"
517       printf "\n  >>> "
518       read  memory  1>/dev/null  2>&1
519    else
520       done=true
521    fi
522 done
523
524 if [[ $remote_host = nech  ||  $remote_host = necriam ]]
525 then
526    if (( tasks_per_node != 0 ))
527    then
528       (( Memory = memory * tasks_per_node / 1000 ))
529    elif [[ $numprocs != 0 ]]
530    then
531       (( Memory = memory * numprocs / 1000 ))
532    else
533       (( Memory = memory / 1000 ))
534    fi
535 elif [[ $remote_host = lctit ]]
536 then
537    (( Memory = memory * tasks_per_node / 1000 ))
538 fi
539
540
541    # SPEICHERBERECHNUNG BEI OPENMP-NUTZUNG
542 if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
543 then
544    (( memory = memory * threads_per_task ))
545 fi
546
547
548    # BERECHNUNG DER ANZAHL DER ZU VERWENDENDEN KNOTEN
549 if (( tasks_per_node != 0 ))
550 then
551    (( nodes = numprocs / ( tasks_per_node * threads_per_task ) ))
552 fi
553
554
555    # Calculate number of processes per node
556 (( processes_per_node = tasks_per_node * threads_per_task ))
557
558
559    # Calculate number of MPI tasks
560 (( mpi_tasks = numprocs / threads_per_task ))
561
562
563    # Set port number option for calls of ssh/scp, subjob and batch_scp scripts
564 if [[ "$scp_port" != "" ]]
565 then
566    PORTOPT="-P $scp_port"
567    SSH_PORTOPT="-p $scp_port"
568 fi
569
570
571    # HEADER-AUSGABE
572 if [[ $verify = true ]]
573 then
574    printf "\n\n"
575    printf "#--------------------------------------------------------------# \n"
576    spalte1=SUBJOB;spalte2=$(date)
577    printf "| %-20s%40s | \n" "$spalte1" "$spalte2"
578    printf "|                                                              | \n"
579    printf "| values of parameters/options:                                | \n"
580    spalte1=$(echo local_host$punkte | cut -c-20)
581    spalte2=$punkte$local_host
582    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
583    spalte1=$(echo remote_host$punkte | cut -c-20)
584    spalte2=$punkte$remote_host
585    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
586    spalte1=$(echo queue$punkte | cut -c-20)
587    spalte2=$punkte$queue
588    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
589    spalte1=$(echo memory$punkte | cut -c-20)
590    spalte2="$punkte$memory mb"
591    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
592    spalte1=$(echo cputime$punkte | cut -c-20)
593    spalte2="$punkte$cputime sec"
594    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
595    spalte1=$(echo job_name$punkte | cut -c-20)
596    spalte2="$punkte$job_name"
597    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
598    printf "#--------------------------------------------------------------# \n\n"
599
600
601       # KONTROLLABFRAGE, OB ALLES O.K.
602    antwort="dummy"
603    while [[ $antwort != y  &&  $antwort != Y  &&  $antwort != n  &&  $antwort != N ]]
604    do
605       read antwort?" >>> continue (y/n) ? "
606    done
607    if [[ $antwort = n  ||  $antwort = N ]]
608    then
609       locat=verify; exit
610    fi
611    printf "\n"
612 fi
613
614
615
616    # ZUFALLSKENNUNG GENERIEREN UND JOBNAMEN AUF ZIELRECHNER BESTIMMEN
617 kennung=$RANDOM
618 job_on_remhost=${job_name}_${kennung}_$local_host
619 job_to_send=job_to_send_$kennung
620 if [[ $delete_dayfile = false ]]
621 then
622    remote_dayfile=${local_host}_${job_name}_result_$kennung
623    local_dayfile=${remote_host}_${job_name}
624 else
625    remote_dayfile=/dev/null
626 fi
627
628
629
630    # Generate the batch job scripts (qsub/msub/LoadLeveler)
631 if [[ $(echo $remote_host | cut -c1-3) = ibm  &&  $numprocs != 0 ]]
632 then
633
634       # General LoadLeveler settings
635    execute_in_shell="#!/bin/ksh"
636    use_shell="# @ shell = /bin/ksh"
637    consumable_memory="ConsumableMemory($memory mb)"
638    class="# @ class = $queue"
639    environment="# @ environment = OMP_NUM_THREADS=$threads_per_task; MP_SHARED_MEMORY=yes"
640    network_to_use="# @ network.mpi = sn_all,shared,us"
641    data_limit="# @ data_limit = 1.76gb"
642    image_size="# @ image_size = 50"
643    wall_clock_limit="# @ wall_clock_limit = ${timestring},$timestring"
644
645    if [[ $email_notification = none ]]
646    then
647       notify_user=""
648    else
649       notify_user="# @ notify_user = $email_notification"
650       if [[ $delete_dayfile = true ]]
651       then
652          notification='# @ notification = never'
653       fi
654    fi
655
656    if [[ $remote_host = ibmh ]]
657    then
658       data_limit=""
659       network_to_use=""
660       class="# @ class = $queue"
661       environment=""
662       rset="# @ rset = RSET_MCM_AFFINITY"
663       task_affinity="# @ task_affinity = core(1)"
664    elif [[ $remote_host = ibmkisti ]]
665    then
666       network_to_use="# @ network.MPI = sn_all,shared,US"
667       wall_clock_limit="# @ wall_clock_limit = $timestring"
668       if [[ $threads_per_task = 1 ]]
669       then
670          rset="# @ rset = RSET_MCM_AFFINITY"
671          mcm_affinity_options="# @ mcm_affinity_options = mcm_mem_pref mcm_sni_none mcm_distribute"
672       fi
673       environment=""
674       use_shell=""
675       data_limit=""
676       image_size=""
677    elif [[ $remote_host = ibmku ]]
678    then
679       execute_in_shell="#!/usr/bin/ksh"
680       use_shell="# @ shell = /usr/bin/ksh"
681       consumable_memory=""
682       environment=""
683       network_to_use="# @ network.mpi = sn_all,shared,us"
684       data_limit=""
685       image_size=""
686    elif [[ $remote_host = ibms ]]
687    then
688       network_to_use="# @ network.mpi = csss,shared,us"
689    elif [[ $remote_host = ibmy ]]
690    then
691       consumable_memory=""
692       network_to_use=""
693    fi
694
695    cat > $job_to_send << %%END%%
696$execute_in_shell
697$use_shell
698
699# @ job_type = parallel
700# @ job_name = $job_name
701# @ resources = ConsumableCpus($threads_per_task) $consumable_memory
702# @ output = $remote_dayfile
703# @ error = $remote_dayfile
704$wall_clock_limit
705$image_size
706$class
707$environment
708$network_to_use
709$data_limit
710$rset
711$mcm_affinity_options
712$task_affinity
713$notification
714$notify_user
715
716%%END%%
717
718    if (( nodes > 0 ))
719    then
720
721       if [[ $remote_host != ibmkisti ]]
722       then
723
724          cat >> $job_to_send << %%END%%
725# @ node = $nodes
726# @ tasks_per_node = $processes_per_node
727# @ node_usage = $node_usage
728# @ queue
729
730%%END%%
731
732       else
733
734          cat >> $job_to_send << %%END%%
735# @ total_tasks = $mpi_tasks
736# @ blocking = unlimited
737# @ queue
738
739%%END%%
740
741       fi
742
743    else
744
745       if [[ $remote_host != ibmy ]]
746       then
747
748          cat >> $job_to_send << %%END%%
749# @ blocking = unlimited
750# @ total_tasks = $numprocs
751# @ node_usage = $node_usage
752# @ queue
753
754%%END%%
755
756       else
757
758          cat >> $job_to_send << %%END%%
759# @ node = 1
760# @ total_tasks = $numprocs
761# @ queue
762
763%%END%%
764
765       fi
766
767    fi
768
769       # workaround because of silly job filter on ibmkisti
770    if [[ $remote_host = ibmkisti  &&  $threads_per_task != 1 ]]
771    then
772       echo  "export OMP_NUM_THREADS=$threads_per_task"  >>  $job_to_send
773    fi
774
775 elif [[ $(echo $remote_host | cut -c1-3) = ibm  &&  $numprocs = 0 ]]
776 then
777
778    cat > $job_to_send << %%END%%
779#!/bin/ksh
780
781# @ job_type = serial
782# @ node_usage = $node_usage
783# @ job_name = palm
784# @ wall_clock_limit = ${timestring},$timestring
785# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)
786# @ output = $remote_dayfile
787# @ error = $remote_dayfile
788$class
789$notification
790
791# @ queue
792
793%%END%%
794
795 elif [[ $remote_host = lccrayb ]]
796 then
797
798    if [[ $numprocs != 0 ]]
799    then
800       cat > $job_to_send << %%END%%
801#!/bin/bash
802#PBS -N $job_name
803#PBS -l walltime=$timestring
804#PBS -l nodes=$nodes:ppn=$processes_per_node
805#PBS -o $remote_dayfile
806#PBS -j oe
807#PBS -q $queue
808
809$module_calls
810
811%%END%%
812
813    else
814
815       continue
816
817    fi
818
819 elif [[ $remote_host = lccrayf ]]
820 then
821
822    if [[ $numprocs != 0 ]]
823    then
824       cat > $job_to_send << %%END%%
825#!/bin/bash -l
826#SBATCH -J $job_name
827#SBATCH -t $timestring
828#SBATCH -N $nodes
829#SBATCH --ntasks-per-node=$processes_per_node
830#SBATCH -p $queue
831#SBATCH -o $remote_dayfile
832#SBATCH -e $remote_dayfile
833
834$init_cmds
835$module_calls
836
837%%END%%
838
839    else
840       cat > $job_to_send << %%END%%
841#!/bin/bash -l
842#SBATCH -J $job_name
843#SBATCH -t $timestring
844#SBATCH -l ncpus=1
845#SBATCH -l pmem=${memory}mb
846#SBATCH -m abe
847#SBATCH -o $remote_dayfile
848#SBATCH -e $remote_dayfile
849
850$init_cmds
851$module_calls
852
853%%END%%
854
855    fi
856
857 elif [[ $remote_host = lcfimm ]]
858 then
859
860    if [[ $numprocs != 0 ]]
861    then
862       cat > $job_to_send << %%END%%
863#!/bin/ksh
864#PBS -N $job_name
865#PBS -A $project_account
866#PBS -l walltime=$timestring
867#PBS -l nodes=${nodes}:ppn=$processes_per_node
868#PBS -l pmem=${memory}mb
869#PBS -m abe
870#PBS -o $remote_dayfile
871#PBS -j oe
872mpd &
873
874%%END%%
875
876    else
877       cat > $job_to_send << %%END%%
878#!/bin/ksh
879#PBS -N $job_name
880#PBS -A $project_account
881#PBS -l walltime=$timestring
882#PBS -l ncpus=1
883#PBS -l pmem=${memory}mb
884#PBS -m abe
885#PBS -o $remote_dayfile
886#PBS -j oe
887
888%%END%%
889
890    fi
891
892 elif [[ $remote_host = lcflow ]]
893 then
894    if [ $memory -gt 1800 ]; then
895      use_himem=""
896    else
897      use_himem="#"
898    fi
899    if [[ $numprocs != 0 ]]
900    then
901      pe_set="#$ -pe impi41 $numprocs"
902    else
903      pe_set="#$ -pe impi41 1"
904    fi
905    if [[ $queue = default ]]
906    then
907      queue_set=""
908    else
909      queue_set="#$ -q $queue"
910    fi
911    [[ "$disc_space" = "" ]]  &&  disc_space=50
912
913       cat > $job_to_send << %%END%%
914#!/bin/bash
915#$ -S /bin/bash
916#$ -N $job_name
917#$ -cwd
918#$ -l h_rt=$timestring
919#$ -l h_vmem=${memory}M
920#$ -o $remote_dayfile
921#$ -j y
922$pe_set
923#$ -R y
924${use_himem}#$ -l highmem=true
925#$ -l h_fsize=${disc_space}G
926$queue_set
927
928%%END%%
929
930 elif [[ $remote_host = lck || $remote_host = lckordi || $remote_host = lcsb ]]
931 then
932
933    if [[ $numprocs != 0 ]]
934    then
935       cat > $job_to_send << %%END%%
936#!/bin/ksh
937#PBS -N $job_name
938#PBS -l walltime=$timestring
939#PBS -l ncpus=$numprocs
940#PBS -l pmem=${memory}mb
941#PBS -o $remote_dayfile
942#PBS -l nodes=$nodes:ppn=${processes_per_node}
943#PBS -j oe
944
945mpd &
946
947%%END%%
948
949    else
950       cat > $job_to_send << %%END%%
951#!/bin/ksh
952#PBS -N $job_name
953#PBS -l walltime=$timestring
954#PBS -l ncpus=1
955#PBS -l pmem=${memory}mb
956#PBS -o $remote_dayfile
957#PBS -j oe
958
959%%END%%
960
961    fi
962
963 elif [[ $remote_host = lckiaps ]]
964 then
965
966    if [[ $numprocs != 0 ]]
967    then
968       cat > $job_to_send << %%END%%
969#!/bin/ksh
970#PBS -N $job_name
971#PBS -l walltime=$timestring
972#PBS -l select=1:ncpus=$numprocs
973#PBS -l pmem=${memory}mb
974#PBS -q $queue
975#PBS -o $remote_dayfile
976#PBS -j oe
977#PBS -V
978
979%%END%%
980
981    else
982       cat > $job_to_send << %%END%%
983#!/bin/ksh
984#PBS -N $job_name
985#PBS -l walltime=$timestring
986#PBS -l ncpus=1
987#PBS -l pmem=${memory}mb
988#PBS -o $remote_dayfile
989#PBS -j oe
990
991%%END%%
992
993    fi
994
995 elif [[ $remote_host = lcyon ]]
996 then
997
998    if [[ $numprocs != 0 ]]
999    then
1000       cat > $job_to_send << %%END%%
1001#!/bin/ksh
1002#PBS -N $job_name
1003#PBS -l walltime=$timestring
1004#PBS -l ncpus=$numprocs
1005#PBS -l pmem=${memory}mb
1006#PBS -o $remote_dayfile
1007#PBS -j oe
1008
1009%%END%%
1010
1011    else
1012       cat > $job_to_send << %%END%%
1013#!/bin/ksh
1014#PBS -N $job_name
1015#PBS -l walltime=$timestring
1016#PBS -l ncpus=1
1017#PBS -l pmem=${memory}mb
1018#PBS -o $remote_dayfile
1019#PBS -j oe
1020
1021%%END%%
1022
1023    fi
1024
1025 elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
1026 then
1027
1028    if [[ "$sgi_feature" != "" ]]
1029    then
1030       feature_directive="#PBS -l feature=$sgi_feature"
1031    else
1032       feature_directive=""
1033    fi
1034
1035    if [[ $queue = dataq || $queue = permq ]]
1036    then
1037       feature_directive="#PBS -l feature=data"
1038    fi
1039
1040    if [[ $queue = testq  || $queue = mediumq  ||  $queue = bigq  ||  $queue = workq  ||  $queue = dataq  ||  $queue = permq ||  $queue = serialq  ||  $queue = special1q ]]
1041    then
1042       queue_directive="#PBS -q $queue"
1043    else
1044       queue_directive=""
1045    fi
1046
1047    if [[ $email_notification = none ]]
1048    then
1049       email_directive=""
1050    else
1051       email_directive="#PBS -M $email_notification"
1052    fi
1053
1054    if [[ $numprocs != 0 ]]
1055    then
1056       cat > $job_to_send << %%END%%
1057#!/bin/bash
1058#PBS -N $job_name
1059#PBS -l walltime=$timestring
1060#PBS -l nodes=$nodes:ppn=${processes_per_node}
1061#PBS -l naccesspolicy=$node_usage
1062#PBS -o $remote_dayfile
1063#PBS -j oe
1064$feature_directive
1065$queue_directive
1066$email_directive
1067
1068eval \`/sw/swdist/bin/modulesinit\`
1069#. /usr/share/modules/init/bash
1070$init_cmds
1071$module_calls
1072
1073echo ld_library_path=\$LD_LIBRARY_PATH
1074
1075%%END%%
1076
1077    else
1078       cat > $job_to_send << %%END%%
1079#PBS -S /bin/bash
1080#PBS -N $job_name
1081#PBS -l walltime=$timestring
1082#PBS -l ncpus=1
1083#PBS -o $remote_dayfile
1084#PBS -j oe
1085$queue_directive
1086$email_directive
1087
1088eval \`/sw/swdist/bin/modulesinit\`
1089#. /usr/share/modules/init/bash
1090$init_cmds
1091$module_calls
1092
1093%%END%%
1094
1095    fi
1096
1097 elif [[ $remote_host = lcxe6 ]]
1098 then
1099
1100    if [[ $numprocs != 0 ]]
1101    then
1102       cat > $job_to_send << %%END%%
1103#!/bin/ksh
1104#PBS -S /bin/ksh
1105#PBS -N $job_name
1106#PBS -A $project_account
1107#PBS -j oe
1108#PBS -l walltime=$timestring
1109#PBS -l mppwidth=${numprocs}
1110#PBS -l mppnppn=${processes_per_node}
1111#PBS -m abe
1112#PBS -o $remote_dayfile
1113$email_directive
1114
1115$init_cmds
1116$module_calls
1117
1118%%END%%
1119
1120    else
1121       cat > $job_to_send << %%END%%
1122#!/bin/ksh
1123#PBS -S /bin/ksh
1124#PBS -N $job_name
1125#PBS -A $project_account
1126#PBS -j oe
1127#PBS -l walltime=$timestring
1128#PBS -l ncpus=1
1129#PBS -l pmem=${memory}mb
1130#PBS -m abe
1131$email_directive
1132#PBS -o $remote_dayfile
1133
1134$init_cmds
1135$module_calls
1136
1137%%END%%
1138
1139    fi
1140
1141 elif [[ $remote_host = lckyoto ]]
1142 then
1143
1144       cat > $job_to_send << %%END%%
1145#!/bin/ksh
1146# @\$-o $remote_dayfile
1147# @\$-eo -oi
1148# @\$-lP 16
1149# @\$-lp 1
1150# @\$-lm 28gb  -llm unlimited -ls unlimited
1151# @\$-q $queue
1152# @\$-Pvn abs_pack
1153##for intel? @\$-Pvn abs_unpack -Pvs unpack -Pvc unpack
1154#. /thin/local/etc/setprofile/intel-11.0.sh
1155#. /thin/local/etc/setprofile/mvapich2-1.4+intel-11.0.sh
1156. ~/.myprofile
1157#. /home2/t/t51254/palm/current_version/myprofile
1158#. /thin/apps/pgi/mpi.sh
1159#
1160env
1161#
1162set -x
1163
1164%%END%%
1165
1166 elif [[ $remote_host = lcxt5m ]]
1167 then
1168
1169    if [[ $numprocs != 0 ]]
1170    then
1171       cat > $job_to_send << %%END%%
1172#!/bin/ksh
1173#PBS -S /bin/ksh
1174#PBS -N $job_name
1175#PBS -j oe
1176#PBS -l walltime=$timestring
1177#PBS -l mppwidth=${numprocs}
1178#PBS -l mppnppn=${processes_per_node}
1179#PBS -m abe
1180#PBS -o $remote_dayfile
1181
1182$init_cmds
1183$module_calls
1184
1185%%END%%
1186
1187    else
1188       cat > $job_to_send << %%END%%
1189#!/bin/ksh
1190#PBS -S /bin/ksh
1191#PBS -N $job_name
1192#PBS -j oe
1193#PBS -l walltime=$timestring
1194#PBS -l ncpus=1
1195#PBS -l pmem=${memory}mb
1196#PBS -m abe
1197#PBS -o $remote_dayfile
1198
1199$init_cmds
1200$module_calls
1201
1202%%END%%
1203
1204    fi
1205
1206 elif [[ $remote_host = lckyuh ]]
1207 then
1208    cat > $job_to_send << %%END%%
1209#!/bin/bash
1210#PJM -L "rscgrp=$queue"
1211#PJM -L "node=$nodes"
1212#PJM --mpi "proc=$numprocs"
1213#PJM -L "elapse=$timestring"
1214#PJM -o $remote_dayfile
1215#PJM -j
1216#PJM -X
1217#PJM --no-stging
1218
1219export LANG=en_US.UTF-8
1220%%END%%
1221
1222 elif [[ $remote_host = lckyut ]]
1223 then
1224    cat > $job_to_send << %%END%%
1225#!/bin/bash
1226#PJM -L "rscgrp=$queue"
1227#PJM -L "vnode=$numprocs"
1228#PJM -L "vnode-core=1"
1229#PJM -L "elapse=$timestring"
1230#PJM --mpi proc=$numprocs
1231#PJM -o $remote_dayfile
1232#PJM -j
1233#PJM -X
1234#PJM --no-stging
1235
1236export LANG=en_US.UTF-8
1237%%END%%
1238
1239 elif [[ $remote_host = nech ]]
1240 then
1241
1242    if (( nodes > 1 ))
1243    then
1244       cat > $job_to_send << %%END%%
1245#!/bin/ksh
1246#PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime
1247#PBS -l ${qsubmem}=${Memory}gb
1248#PBS -b $nodes
1249#PBS -o $remote_dayfile
1250#PBS -N palm
1251#PBS -j o
1252#PBS -T mpisx
1253
1254%%END%%
1255
1256    elif [[ $numprocs != 0 ]]
1257    then
1258       cat > $job_to_send << %%END%%
1259#!/bin/ksh
1260#PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime
1261#PBS -l ${qsubmem}=${Memory}gb
1262#PBS -o $remote_dayfile
1263#PBS -N palm
1264#PBS -j o
1265
1266%%END%%
1267
1268    else
1269       cat > $job_to_send << %%END%%
1270#!/bin/ksh
1271#PBS -l ${qsubmem}=${Memory}gb,${qsubtime}=$cputime
1272#PBS -o $remote_dayfile
1273#PBS -j o
1274
1275%%END%%
1276
1277    fi
1278
1279 elif [[ $remote_host = necriam ]]
1280 then
1281
1282    if (( nodes > 1 ))
1283    then
1284       cat > $job_to_send << %%END%%
1285#!/bin/ksh
1286#PBS -b $nodes
1287#PBS -o $remote_dayfile
1288#PBS -N $job_name
1289#PBS -j o
1290#PBS -v MPIPROGINV=YES
1291
1292%%END%%
1293
1294    elif [[ $numprocs != 0 ]]
1295    then
1296       cat > $job_to_send << %%END%%
1297#!/bin/ksh
1298#PBS -q ${queue}
1299#PBS -o $remote_dayfile
1300#PBS -N $job_name
1301#PBS -j o
1302#PBS -v MPIPROGINV=YES
1303
1304%%END%%
1305
1306    else
1307       cat > $job_to_send << %%END%%
1308#!/bin/ksh
1309#PBS -o $remote_dayfile
1310#PBS -j o
1311
1312%%END%%
1313
1314    fi
1315
1316 elif [[ $remote_host = lctit ]]
1317 then
1318    cat > $job_to_send << %%END%%
1319#!/bin/ksh
1320$init_cmds
1321$module_calls
1322
1323%%END%%
1324
1325       # OPTIONEN FUER SUBMIT-KOMMANDO ZUSAMMENSTELLEN
1326    if [[ $tasks_per_node != $processes_per_node ]]
1327    then
1328       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 "
1329    else
1330       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 "
1331    fi
1332
1333 else
1334
1335    cat > $job_to_send << %%END%%
1336# @\$-q ${queue}
1337# @\$-l${qsubtime} $timestring
1338# @\$-l${qsubmem} ${memory}mb
1339# @\$-o $remote_dayfile
1340# @\$-eo
1341
1342%%END%%
1343
1344 fi
1345
1346
1347    # BEI RECHNUNG AUF REMOTE-MASCHINEN RUECKTRANSFER DES DAYFILES PER TRAP
1348    # BEI EXIT VERANLASSEN
1349    # VEKTORRECHNER MUSS EIGENEN JOB STARTEN, DA DORT NOHUP NICHT FUNKTIONIERT
1350    # AUF IBM IN SEOUL IST RUECKTRANSFER ZUR ZEIT GENERELL NICHT MOEGLICH
1351 if [[ $delete_dayfile = false  &&  $remote_host != $local_host ]]
1352 then
1353    echo "set +vx"                              >>  $job_to_send
1354    echo "trap '"                               >>  $job_to_send
1355    echo "set +vx"                              >>  $job_to_send
1356    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $(echo $remote_host | cut -c1-5) = lcsgi  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* ]]
1357    then
1358       if [[ $remote_host = ibmh ]]
1359       then
1360          return_queue=c1
1361       elif [[ $remote_host = ibmkisti ]]
1362       then
1363          return_queue=class.1-2
1364       elif [[ $remote_host = ibmku ]]
1365       then
1366          return_queue=sdbg2
1367       elif [[ $remote_host = ibms ]]
1368       then
1369          return_queue=p_normal
1370       elif [[ $remote_host = ibmy ]]
1371       then
1372          return_queue=serial
1373       elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
1374       then
1375          return_queue=serialq
1376       elif [[ $remote_host = necriam ]]
1377       then
1378          return_queue=SP
1379       elif [[ $remote_host = lccrayb ]]
1380       then
1381          return_queue=dataq
1382       elif [[ $remote_host = lckiaps ]]
1383       then
1384          return_queue=express
1385       elif [[ $remote_host = lckyuh ]]
1386       then
1387          return_queue=cx-single
1388       elif [[ $remote_host = lckyut ]]
1389       then
1390          return_queue=cx-single
1391       else
1392          return_queue=unknown
1393       fi
1394
1395       if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
1396       then
1397
1398          if [[ $remote_host = ibmku ]]
1399          then
1400             echo "echo \"#!/usr/bin/ksh\" >> scpjob.$kennung"            >>  $job_to_send
1401             echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$kennung"  >>  $job_to_send
1402          else
1403             echo "echo \"#!/bin/ksh\" >> scpjob.$kennung"                >>  $job_to_send
1404          fi
1405          echo "echo \"# @ job_type = serial\" >> scpjob.$kennung"    >>  $job_to_send
1406          echo "echo \"# @ job_name = transfer\" >> scpjob.$kennung"  >>  $job_to_send
1407          echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$kennung"  >>  $job_to_send
1408          echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$kennung "  >>  $job_to_send
1409          echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
1410          echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
1411          if [[ $host != "ibmh" ]]
1412          then
1413             echo "echo \"# @ class = $return_queue\" >> scpjob.$kennung"  >>  $job_to_send
1414          fi
1415          echo "echo \"# @ image_size = 10\" >> scpjob.$kennung"      >>  $job_to_send
1416          echo "echo \"# @ notification = never\" >> scpjob.$kennung" >>  $job_to_send
1417
1418          echo "echo \"# @ queue\" >> scpjob.$kennung"                >>  $job_to_send
1419          echo "echo \" \" >> scpjob.$kennung"                        >>  $job_to_send
1420
1421          echo "echo \"set -x\" >> scpjob.$kennung"                   >>  $job_to_send
1422          echo "echo \"batch_scp  $PORTOPT  -d  -w 10  -u $local_user  $local_addres  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$kennung"  >>  $job_to_send
1423          if [[ $remote_host = ibmku ]]
1424          then
1425             echo "echo \"rm  scpjob.$kennung\" >> scpjob.$kennung"   >>  $job_to_send
1426          fi
1427          echo "echo \"exit\" >> scpjob.$kennung"                     >>  $job_to_send
1428
1429       elif [[ $remote_host = nech ]]
1430       then
1431          echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
1432          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1433          echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100"  >>  $job_to_send
1434          echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
1435          echo "#PBS -j o"                         >>  $job_to_send
1436          echo " "                                 >>  $job_to_send
1437          echo "set -x"                            >>  $job_to_send
1438          echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
1439          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1440          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1441          echo "%%END%%"                           >>  $job_to_send
1442
1443       elif [[ $remote_host = necriam ]]
1444       then
1445          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1446          echo "#PBS -q $return_queue"             >>  $job_to_send
1447          echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
1448          echo "#PBS -j o"                         >>  $job_to_send
1449          echo " "                                 >>  $job_to_send
1450          echo "set -x"                            >>  $job_to_send
1451          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1452          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1453          echo "%%END%%"                           >>  $job_to_send
1454
1455       elif [[ $remote_host = lckyuh ]]
1456       then
1457          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1458          echo "#!/bin/bash"                       >>  $job_to_send
1459          echo "#PJM -L \"node=1\""                >>  $job_to_send
1460          echo "#PJM -L \"rscgrp=$return_queue\""  >>  $job_to_send
1461          echo "#PJM --no-stging"                  >>  $job_to_send
1462          echo "#PJM -L \"elapse=30:00\""          >>  $job_to_send
1463          echo "#PJM -o \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
1464          echo "#PJM -j"                           >>  $job_to_send
1465          echo " "                                 >>  $job_to_send
1466          echo "export LANG=en_US.UTF-8"           >>  $job_to_send
1467          echo "set -x"                            >>  $job_to_send
1468          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1469          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1470          echo "%%END%%"                           >>  $job_to_send
1471
1472       elif [[ $remote_host = lckyut ]]
1473       then
1474          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1475          echo "#!/bin/bash"                       >>  $job_to_send
1476          echo "#PJM -L \"vnode=1\""               >>  $job_to_send
1477          echo "#PJM -L \"rscgrp=$return_queue\""  >>  $job_to_send
1478          echo "#PJM --no-stging"                  >>  $job_to_send
1479          echo "#PJM -L \"elapse=30:00\""          >>  $job_to_send
1480          echo "#PJM -o \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
1481          echo "#PJM -j"                           >>  $job_to_send
1482          echo " "                                 >>  $job_to_send
1483          echo "export LANG=en_US.UTF-8"           >>  $job_to_send
1484          echo "set -x"                            >>  $job_to_send
1485          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1486          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1487          echo "%%END%%"                           >>  $job_to_send
1488
1489       elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
1490       then
1491          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1492          echo "#!/bin/bash"                             >>  $job_to_send
1493          echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
1494          echo "#PBS -l walltime=00:30:00"               >>  $job_to_send
1495          echo "#PBS -l nodes=1:ppn=1"                   >>  $job_to_send
1496          echo "#PBS -l feature=data"                    >>  $job_to_send
1497          echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol"      >>  $job_to_send
1498          echo "#PBS -j oe"                        >>  $job_to_send
1499          echo " "                                 >>  $job_to_send
1500          echo ". /usr/share/modules/init/bash"    >>  $job_to_send
1501          echo "set -x"                            >>  $job_to_send
1502          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1503          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1504          echo "%%END%%"                           >>  $job_to_send
1505
1506       elif [[ $remote_host = lccrayb ]]
1507       then
1508          echo "cat > scpjob.$kennung << %%END%%"        >>  $job_to_send
1509          echo "#!/bin/bash"                             >>  $job_to_send
1510          echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
1511          echo "#PBS -l walltime=00:30:00"               >>  $job_to_send
1512          echo "#PBS -l nodes=1:ppn=1"                   >>  $job_to_send
1513          echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol"      >>  $job_to_send
1514          echo "#PBS -j oe"                              >>  $job_to_send
1515          echo " "                                       >>  $job_to_send
1516          echo "set -x"                                  >>  $job_to_send
1517          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1518          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1519          echo "%%END%%"                                 >>  $job_to_send
1520
1521       elif [[ $remote_host = lcflow ]]
1522       then
1523          echo "cat > scpjob.${kennung}.tmp << %%END%%"                  >>  $job_to_send
1524          echo "#!/bin/bash"                                             >>  $job_to_send
1525          echo "SGEPREFIX -S /bin/bash"                                  >>  $job_to_send
1526          echo "SGEPREFIX -N transfer_$job_name"                         >>  $job_to_send
1527          echo "SGEPREFIX -cwd"                                          >>  $job_to_send
1528          echo "SGEPREFIX -l h_rt=01:00:00"                              >>  $job_to_send
1529          echo "SGEPREFIX -l h_vmem=500M"                                >>  $job_to_send
1530          echo "SGEPREFIX -l excl_flow=false"                            >>  $job_to_send
1531          echo "SGEPREFIX -j y"                                          >>  $job_to_send
1532          echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$kennung"  >>  $job_to_send 
1533          echo " "                                                       >>  $job_to_send 
1534          echo "set -x"                                                  >>  $job_to_send 
1535          echo "export PALM_BIN=$PALM_BIN" | sed -e 's:'$HOME':$HOME:'   >>  $job_to_send
1536          echo "export PATH=\$PATH:\$PALM_BIN"                           >>  $job_to_send
1537          echo ""                                 >>  $job_to_send         
1538          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1539          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1540          echo "rm -f scpjob.${kennung}"                                 >>  $job_to_send         
1541          echo "%%END%%"                                                 >>  $job_to_send
1542          echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${kennung}.tmp > scpjob.${kennung}" >>  $job_to_send         
1543          echo "rm -f scpjob.${kennung}.tmp"                             >>  $job_to_send         
1544
1545       else
1546
1547          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1548          echo "# @\\\$-q $return_queue"           >>  $job_to_send
1549          echo "# @\\\$-l${qsubtime} 10"           >>  $job_to_send
1550          echo "# @\\\$-l${qsubmem} 10mb"          >>  $job_to_send
1551          if [[ $remote_host = t3ej2  ||  $remote_host = t3ej5  ||  $remote_host = t3es ]]
1552          then
1553             echo "# @\$-l mpp_p=0"                >>  $job_to_send
1554          fi
1555          echo '# @\$-lF 10mb'                     >>  $job_to_send
1556#          echo '# @\$-o /dev/null'                 >>  $job_to_send
1557          echo '# @\$-o job_queue/last_job_transfer_protocol'    >>  $job_to_send
1558          echo '# @\\\$-eo'                          >>  $job_to_send
1559          echo " "                                 >>  $job_to_send
1560          if [[ $remote_host = t3ej2  ||  $remote_host = t3ej5 ]]
1561          then
1562             echo "set +vx"                        >>  $job_to_send
1563             echo ". .profile"                     >>  $job_to_send
1564          fi
1565          echo "set -x"                            >>  $job_to_send
1566          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null"  >>  $job_to_send
1567          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1568          echo "%%END%%"                           >>  $job_to_send
1569       fi
1570
1571       if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
1572       then
1573          echo "llsubmit  scpjob.$kennung"      >>  $job_to_send
1574       elif [[ $remote_host = lccrayb ]]
1575       then
1576          echo "msub -q $return_queue  scpjob.$kennung"               >>  $job_to_send
1577       elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
1578       then
1579          echo "rm -rf \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
1580          echo "chmod  u+x  scpjob.$kennung"                         >>  $job_to_send
1581          echo "msub  scpjob.$kennung"                               >>  $job_to_send
1582       elif [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5 ]]
1583       then
1584          echo "qsub -J n  scpjob.$kennung"     >>  $job_to_send
1585       elif [[ $remote_host = t3es ]]
1586       then
1587          echo "qsub -J n  -s /bin/ksh  scpjob.$kennung"     >>  $job_to_send
1588       elif [[ $remote_host = lckiaps ]]
1589       then
1590          echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
1591          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"$submcom ${job_catalog}/scpjob.$kennung\" "  >>  $job_to_send
1592          echo "rm  ${job_catalog}/scpjob.$kennung"          >>  $job_to_send
1593       elif [[ $remote_host = lckyu* ]]
1594       then
1595          echo "scp $PORTOPT scpjob.$kennung  ${remote_username}@${remote_addres}:job_queue"           >>  $job_to_send
1596          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" "  >>  $job_to_send
1597       elif [[ $remote_host = lcflow ]]
1598       then
1599          echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
1600          echo "/usr/bin/ssh ${remote_username}@${remote_addres}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$kennung\" "  >>  $job_to_send
1601       else
1602          echo "$submcom  scpjob.$kennung"      >>  $job_to_send
1603       fi
1604       if [[ $remote_host != ibmku  &&  $remote_host != lckiaps ]]
1605       then
1606          echo "rm  scpjob.$kennung"            >>  $job_to_send
1607       fi
1608       if [[ $remote_host = nech ]]
1609       then
1610          echo "cd -"                           >>  $job_to_send
1611       fi
1612    else
1613#       echo "ftpcopy  -d  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1614       echo "nohup  ftpcopy  -d  -w 15  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null  &"  >>  $job_to_send
1615    fi
1616    echo "set -x"                               >>  $job_to_send
1617    echo "     ' exit"                          >>  $job_to_send
1618    echo "set -x"                               >>  $job_to_send
1619 fi
1620
1621
1622
1623    # EIGENTLICHE JOB-DATEI AN QSUB-KOMMANDOS ANHAENGEN
1624 cat  $file_to_send  >>  $job_to_send
1625
1626 if [[ $remote_host = ibm ]]
1627 then
1628    echo " "         >>  $job_to_send
1629    echo "exit"      >>  $job_to_send
1630 fi
1631
1632    # remove job file
1633 if [[ $remote_host = lctit  ||  $remote_host = ibmku  ||  $remote_host = lcflow ]]
1634 then
1635    echo " "                               >>  $job_to_send
1636    echo "rm ~/job_queue/$job_on_remhost"  >>  $job_to_send
1637 fi
1638
1639
1640
1641    # USER-NAME AUF ZIELRECHNER AUS .NETRC-DATEI ERMITTELN
1642 if [[ -z $remote_user ]]
1643 then
1644    if [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5  ||  $remote_host = t3es  ||  $remote_host = vpp ]]
1645    then
1646       grep  $remote_addres  ~/.netrc | read dum dum dum remote_user dum dum
1647    fi
1648 fi
1649
1650
1651
1652    # JOB AUF ZIELRECHNER TRANSFERIEREN BZW. INS JOBVERZEICHNIS KOPIEREN
1653 if [[ $no_submit = false ]]
1654 then
1655    if [[ $remote_host != $local_host ]]
1656    then
1657       [[ $verify = true ]]  &&  printf "\n >>> transfering job to \"$remote_host\"..."
1658       if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]    # ssh on ibms cannot handle "~/"
1659       then
1660          job_catalog_save=$job_catalog
1661          job_catalog=job_queue
1662       elif [[ $remote_host = nech ]]
1663       then
1664          job_catalog_save=$job_catalog
1665          job_catalog=/hpf/b/${remote_user}/job_queue
1666       fi
1667       if [[ $remote_host = nech ]]
1668       then
1669             # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ
1670             # TRANSFERIERT WERDEN
1671          scp  $PORTOPT  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
1672       else
1673          scp  $PORTOPT  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
1674       fi
1675       if [[ $? = 1 ]]
1676       then
1677          locat=scp; exit
1678       fi
1679       if [[ $remote_host = ibms ]]
1680       then
1681          job_catalog=$job_catalog_save
1682       fi
1683       [[ $verify = true ]]  &&  printf "\n >>> finished\n"
1684    else
1685       eval  job_catalog=$job_catalog
1686       cp  $job_to_send  ${job_catalog}/$job_on_remhost
1687    fi
1688
1689
1690
1691       # NQS- BZW. LOADLEVELER-JOB STARTEN
1692    if [[ $remote_host != $local_host ]]
1693    then
1694       [[ $verify = true ]]  &&  printf "\n >>> submitting job using \"qsub\"...\n"
1695
1696       if [[ $(echo $remote_host | cut -c1-5) = lcsgi  &&  $prio = true ]]
1697       then
1698          printf "\n >>> submit with HLRN qos-feature hiprio...\n"
1699          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost"
1700       elif [[ $remote_host = ibmku ]]
1701       then
1702          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
1703       elif [[ $remote_host = lcflow ]]
1704       then
1705          /usr/bin/ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "$init_cmds $module_calls cd $job_catalog; $submcom $job_on_remhost"
1706       else
1707          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
1708       fi
1709
1710       [[ $verify = true ]]  &&  printf " >>> o.k.\n"
1711    else
1712       cd  $job_catalog
1713       if [[ $(echo $local_host | cut -c1-5) = lcsgi  ||  $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray ]]
1714       then
1715          eval  $submcom  $job_on_remhost
1716       elif [[  $local_host = lcfimm  ||  $local_host = lctit  ||  $localhost = lcxe6  ||  $localhost = lck  || $localhost = lckordi ||  $localhost = lcyon || $localhost = lcsb  ||  $localhost = lckyu* ]]
1717       then
1718          chmod  u+x  $job_on_remhost
1719          eval  $submcom  $job_on_remhost
1720       elif [[ $local_host = nech ]]
1721       then
1722          if [[ $queue = default ]]
1723          then
1724             eval  $submcom  $job_on_remhost
1725          else
1726             eval  $submcom  -q $queue  $job_on_remhost
1727          fi
1728       else
1729          qsub  $job_on_remhost
1730       fi
1731
1732          # Jobfile must not be deleted on lctit/ibmku!! This will be done
1733          # only at the end of the job.
1734       if [[ $local_host != lctit  &&  $local_host != ibmku  &&  $local_host != lcflow ]]
1735       then
1736          rm  $job_on_remhost
1737       fi
1738       cd  -  > /dev/null
1739    fi
1740 fi
1741
1742
1743
1744    # ABSCHLUSSARBEITEN
1745
1746 if [[ $no_submit = false ]]
1747 then
1748    rm  -f $job_to_send
1749 fi
1750 [[ $verify = true ]]  &&  printf "\n\n *** SUBJOB finished \n\n"
Note: See TracBrowser for help on using the repository browser.