source: palm/trunk/SCRIPTS/subjob @ 1255

Last change on this file since 1255 was 1255, checked in by raasch, 10 years ago

further adjustments for lccrayb, mainly concerning remote job access

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