source: palm/trunk/SCRIPTS/subjob @ 1256

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

last commit documented

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