source: palm/trunk/SCRIPTS/subjob @ 1224

Last change on this file since 1224 was 1224, checked in by raasch, 11 years ago

First adjustments for HLRN-III system (lccrayb).
Dummy interface added to avoid compiler warnings.

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