source: palm/trunk/SCRIPTS/subjob @ 1235

Last change on this file since 1235 was 1235, checked in by keck, 11 years ago

added new configuration file for cuhk

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