source: palm/trunk/SCRIPTS/subjob @ 1263

Last change on this file since 1263 was 1263, checked in by fricke, 10 years ago

last commit documented

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