source: palm/trunk/SCRIPTS/subjob @ 1266

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

adjustment for lccrayb (use msub instead of qsub)

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