source: palm/trunk/SCRIPTS/subjob @ 1255

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

further adjustments for lccrayb, mainly concerning remote job access

  • Property svn:keywords set to Id Rev
File size: 58.0 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# ------------------
[1255]25# further adjustments for lccrayb
[1046]26#
27# Former revisions:
28# -----------------
[169]29# $Id: subjob 1255 2013-11-07 14:43:35Z raasch $
[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;;
[1255]144     (blogin*|bxc*)          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";
[1255]205                             printf "\n      please contact the PALM group at IMUK";
[1]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%%
[1255]785#!/bin/bash
[1224]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
795
796%%END%%
797
798    else
799
800       continue
801
802    fi
803
[1197]804 elif [[ $remote_host = lccrayf ]]
805 then
806
807    if [[ $numprocs != 0 ]]
808    then
809       cat > $job_to_send << %%END%%
810#!/bin/bash -l
811#SBATCH -J $job_name
812#SBATCH -t $timestring
813#SBATCH -N $nodes
814#SBATCH --ntasks-per-node=$processes_per_node
815#SBATCH -p $queue
816#SBATCH -o $remote_dayfile
817#SBATCH -e $remote_dayfile
818
819$init_cmds
820$module_calls
821
822%%END%%
823
824    else
825       cat > $job_to_send << %%END%%
826#!/bin/bash -l
827#SBATCH -J $job_name
828#SBATCH -t $timestring
829#SBATCH -l ncpus=1
830#SBATCH -l pmem=${memory}mb
831#SBATCH -m abe
832#SBATCH -o $remote_dayfile
833#SBATCH -e $remote_dayfile
834
835$init_cmds
836$module_calls
837
838%%END%%
839
840    fi
841
[108]842 elif [[ $remote_host = lcfimm ]]
843 then
844
845    if [[ $numprocs != 0 ]]
846    then
847       cat > $job_to_send << %%END%%
848#!/bin/ksh
849#PBS -N $job_name
[552]850#PBS -A $project_account
[108]851#PBS -l walltime=$timestring
[622]852#PBS -l nodes=${nodes}:ppn=$processes_per_node
[108]853#PBS -l pmem=${memory}mb
854#PBS -m abe
855#PBS -o $remote_dayfile
856#PBS -j oe
857mpd &
858
859%%END%%
860
[168]861    else
862       cat > $job_to_send << %%END%%
863#!/bin/ksh
864#PBS -N $job_name
[552]865#PBS -A $project_account
[168]866#PBS -l walltime=$timestring
867#PBS -l ncpus=1
868#PBS -l pmem=${memory}mb
869#PBS -m abe
870#PBS -o $remote_dayfile
871#PBS -j oe
872
873%%END%%
874
875    fi
876
[1099]877 elif [[ $remote_host = lcflow ]]
878 then
[1202]879    if [ $memory -gt 1800 ]; then
[1099]880      use_himem=""
881    else
882      use_himem="#"
883    fi
884    if [[ $numprocs != 0 ]]
885    then
[1202]886      pe_set="#$ -pe impi41 $numprocs"
[1099]887    else
[1202]888      pe_set="#$ -pe impi41 1"
[1099]889    fi
890    if [[ $queue = default ]]
891    then
892      queue_set=""
893    else
894      queue_set="#$ -q $queue"
895    fi
896    [[ "$disc_space" = "" ]]  &&  disc_space=50
897
898       cat > $job_to_send << %%END%%
899#!/bin/bash
900#$ -S /bin/bash
901#$ -N $job_name
902#$ -cwd
903#$ -l h_rt=$timestring
904#$ -l h_vmem=${memory}M
905#$ -o $remote_dayfile
906#$ -j y
907$pe_set
908#$ -R y
909${use_himem}#$ -l highmem=true
910#$ -l h_fsize=${disc_space}G
911$queue_set
912
913%%END%%
914
[1021]915 elif [[ $remote_host = lck || $remote_host = lckordi || $remote_host = lcsb ]]
[368]916 then
917
918    if [[ $numprocs != 0 ]]
919    then
920       cat > $job_to_send << %%END%%
921#!/bin/ksh
922#PBS -N $job_name
923#PBS -l walltime=$timestring
924#PBS -l ncpus=$numprocs
925#PBS -l pmem=${memory}mb
926#PBS -o $remote_dayfile
[1021]927#PBS -l nodes=$nodes:ppn=${processes_per_node}
[368]928#PBS -j oe
929
930mpd &
931
932%%END%%
933
934    else
935       cat > $job_to_send << %%END%%
936#!/bin/ksh
937#PBS -N $job_name
938#PBS -l walltime=$timestring
939#PBS -l ncpus=1
940#PBS -l pmem=${memory}mb
941#PBS -o $remote_dayfile
942#PBS -j oe
943
944%%END%%
945
946    fi
947
[1040]948 elif [[ $remote_host = lckiaps ]]
949 then
950
951    if [[ $numprocs != 0 ]]
952    then
953       cat > $job_to_send << %%END%%
954#!/bin/ksh
955#PBS -N $job_name
956#PBS -l walltime=$timestring
957#PBS -l select=1:ncpus=$numprocs
958#PBS -l pmem=${memory}mb
959#PBS -q $queue
960#PBS -o $remote_dayfile
961#PBS -j oe
962#PBS -V
963
964%%END%%
965
966    else
967       cat > $job_to_send << %%END%%
968#!/bin/ksh
969#PBS -N $job_name
970#PBS -l walltime=$timestring
971#PBS -l ncpus=1
972#PBS -l pmem=${memory}mb
973#PBS -o $remote_dayfile
974#PBS -j oe
975
976%%END%%
977
978    fi
979
[693]980 elif [[ $remote_host = lcyon ]]
981 then
982
983    if [[ $numprocs != 0 ]]
984    then
985       cat > $job_to_send << %%END%%
986#!/bin/ksh
987#PBS -N $job_name
988#PBS -l walltime=$timestring
989#PBS -l ncpus=$numprocs
990#PBS -l pmem=${memory}mb
991#PBS -o $remote_dayfile
992#PBS -j oe
993
994%%END%%
995
996    else
997       cat > $job_to_send << %%END%%
998#!/bin/ksh
999#PBS -N $job_name
1000#PBS -l walltime=$timestring
1001#PBS -l ncpus=1
1002#PBS -l pmem=${memory}mb
1003#PBS -o $remote_dayfile
1004#PBS -j oe
1005
1006%%END%%
1007
1008    fi
1009
[181]1010 elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
[179]1011 then
1012
[376]1013    if [[ "$sgi_feature" != "" ]]
1014    then
1015       feature_directive="#PBS -l feature=$sgi_feature"
1016    else
1017       feature_directive=""
1018    fi
[799]1019
[416]1020    if [[ $queue = dataq || $queue = permq ]]
[399]1021    then
1022       feature_directive="#PBS -l feature=data"
1023    fi
[376]1024
[789]1025    if [[ $queue = testq  || $queue = mediumq  ||  $queue = bigq  ||  $queue = workq  ||  $queue = dataq  ||  $queue = permq ||  $queue = serialq  ||  $queue = special1q ]]
[191]1026    then
1027       queue_directive="#PBS -q $queue"
1028    else
1029       queue_directive=""
1030    fi
1031
[352]1032    if [[ $email_notification = none ]]
1033    then
1034       email_directive=""
1035    else
1036       email_directive="#PBS -M $email_notification"
1037    fi
1038
[179]1039    if [[ $numprocs != 0 ]]
1040    then
1041       cat > $job_to_send << %%END%%
[181]1042#!/bin/bash
[179]1043#PBS -N $job_name
1044#PBS -l walltime=$timestring
[622]1045#PBS -l nodes=$nodes:ppn=${processes_per_node}
[181]1046#PBS -l naccesspolicy=$node_usage
[179]1047#PBS -o $remote_dayfile
1048#PBS -j oe
[376]1049$feature_directive
[191]1050$queue_directive
[352]1051$email_directive
[179]1052
[622]1053eval \`/sw/swdist/bin/modulesinit\`
1054#. /usr/share/modules/init/bash
[892]1055$init_cmds
[493]1056$module_calls
[374]1057
[181]1058echo ld_library_path=\$LD_LIBRARY_PATH
[179]1059
1060%%END%%
1061
1062    else
1063       cat > $job_to_send << %%END%%
1064#PBS -S /bin/bash
1065#PBS -N $job_name
1066#PBS -l walltime=$timestring
1067#PBS -l ncpus=1
1068#PBS -o $remote_dayfile
[475]1069#PBS -j oe
[400]1070$queue_directive
1071$email_directive
[179]1072
[622]1073eval \`/sw/swdist/bin/modulesinit\`
1074#. /usr/share/modules/init/bash
[892]1075$init_cmds
[493]1076$module_calls
[475]1077
[179]1078%%END%%
1079
1080    fi
1081
[892]1082 elif [[ $remote_host = lcxe6 ]]
[164]1083 then
1084
1085    if [[ $numprocs != 0 ]]
1086    then
1087       cat > $job_to_send << %%END%%
[799]1088#!/bin/ksh
[164]1089#PBS -S /bin/ksh
1090#PBS -N $job_name
[552]1091#PBS -A $project_account
[206]1092#PBS -j oe
[164]1093#PBS -l walltime=$timestring
1094#PBS -l mppwidth=${numprocs}
[622]1095#PBS -l mppnppn=${processes_per_node}
[164]1096#PBS -m abe
1097#PBS -o $remote_dayfile
[492]1098$email_directive
[164]1099
[892]1100$init_cmds
[493]1101$module_calls
[343]1102
[164]1103%%END%%
1104
[108]1105    else
1106       cat > $job_to_send << %%END%%
1107#!/bin/ksh
[168]1108#PBS -S /bin/ksh
[108]1109#PBS -N $job_name
[552]1110#PBS -A $project_account
[206]1111#PBS -j oe
[108]1112#PBS -l walltime=$timestring
1113#PBS -l ncpus=1
1114#PBS -l pmem=${memory}mb
1115#PBS -m abe
[492]1116$email_directive
[108]1117#PBS -o $remote_dayfile
1118
[892]1119$init_cmds
[493]1120$module_calls
[343]1121
[108]1122%%END%%
1123
1124    fi
1125
[440]1126 elif [[ $remote_host = lckyoto ]]
[437]1127 then
1128
[440]1129       cat > $job_to_send << %%END%%
[799]1130#!/bin/ksh
[440]1131# @\$-o $remote_dayfile
1132# @\$-eo -oi
1133# @\$-lP 16
[799]1134# @\$-lp 1
[440]1135# @\$-lm 28gb  -llm unlimited -ls unlimited
1136# @\$-q $queue
1137# @\$-Pvn abs_pack
1138##for intel? @\$-Pvn abs_unpack -Pvs unpack -Pvc unpack
1139#. /thin/local/etc/setprofile/intel-11.0.sh
1140#. /thin/local/etc/setprofile/mvapich2-1.4+intel-11.0.sh
1141. ~/.myprofile
1142#. /home2/t/t51254/palm/current_version/myprofile
1143#. /thin/apps/pgi/mpi.sh
1144#
1145env
1146#
1147set -x
1148
1149%%END%%
1150
1151 elif [[ $remote_host = lcxt5m ]]
1152 then
1153
[437]1154    if [[ $numprocs != 0 ]]
1155    then
1156       cat > $job_to_send << %%END%%
[799]1157#!/bin/ksh
[437]1158#PBS -S /bin/ksh
1159#PBS -N $job_name
1160#PBS -j oe
1161#PBS -l walltime=$timestring
1162#PBS -l mppwidth=${numprocs}
[622]1163#PBS -l mppnppn=${processes_per_node}
[437]1164#PBS -m abe
1165#PBS -o $remote_dayfile
1166
[892]1167$init_cmds
[493]1168$module_calls
[437]1169
1170%%END%%
1171
1172    else
1173       cat > $job_to_send << %%END%%
1174#!/bin/ksh
1175#PBS -S /bin/ksh
1176#PBS -N $job_name
1177#PBS -j oe
1178#PBS -l walltime=$timestring
1179#PBS -l ncpus=1
1180#PBS -l pmem=${memory}mb
1181#PBS -m abe
1182#PBS -o $remote_dayfile
1183
[892]1184$init_cmds
[493]1185$module_calls
[437]1186
1187%%END%%
1188
1189    fi
1190
[1099]1191 elif [[ $remote_host = lckyuh ]]
1192 then
1193    cat > $job_to_send << %%END%%
1194#!/bin/bash
1195#PJM -L "rscgrp=$queue"
1196#PJM -L "node=$nodes"
1197#PJM --mpi "proc=$numprocs"
1198#PJM -L "elapse=$timestring"
1199#PJM -o $remote_dayfile
1200#PJM -j
1201#PJM -X
1202#PJM --no-stging
1203
1204export LANG=en_US.UTF-8
1205%%END%%
1206
[1090]1207 elif [[ $remote_host = lckyut ]]
1208 then
1209    cat > $job_to_send << %%END%%
1210#!/bin/bash
[1099]1211#PJM -L "rscgrp=$queue"
[1090]1212#PJM -L "vnode=$numprocs"
1213#PJM -L "vnode-core=1"
1214#PJM -L "elapse=$timestring"
1215#PJM --mpi proc=$numprocs
1216#PJM -o $remote_dayfile
1217#PJM -j
[1099]1218#PJM -X
1219#PJM --no-stging
[1090]1220
1221export LANG=en_US.UTF-8
1222%%END%%
1223
[1]1224 elif [[ $remote_host = nech ]]
1225 then
1226
1227    if (( nodes > 1 ))
1228    then
1229       cat > $job_to_send << %%END%%
1230#!/bin/ksh
[622]1231#PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime
[1]1232#PBS -l ${qsubmem}=${Memory}gb
1233#PBS -b $nodes
1234#PBS -o $remote_dayfile
1235#PBS -N palm
1236#PBS -j o
1237#PBS -T mpisx
1238
1239%%END%%
1240
1241    elif [[ $numprocs != 0 ]]
1242    then
1243       cat > $job_to_send << %%END%%
1244#!/bin/ksh
[622]1245#PBS -l cpunum_prc=$processes_per_node,cputim_job=$cputime
[1]1246#PBS -l ${qsubmem}=${Memory}gb
1247#PBS -o $remote_dayfile
1248#PBS -N palm
1249#PBS -j o
1250
1251%%END%%
1252
1253    else
1254       cat > $job_to_send << %%END%%
1255#!/bin/ksh
1256#PBS -l ${qsubmem}=${Memory}gb,${qsubtime}=$cputime
1257#PBS -o $remote_dayfile
1258#PBS -j o
1259
1260%%END%%
1261
1262    fi
1263
[251]1264 elif [[ $remote_host = necriam ]]
[35]1265 then
1266
1267    if (( nodes > 1 ))
1268    then
1269       cat > $job_to_send << %%END%%
1270#!/bin/ksh
1271#PBS -b $nodes
1272#PBS -o $remote_dayfile
[253]1273#PBS -N $job_name
[35]1274#PBS -j o
[251]1275#PBS -v MPIPROGINV=YES
[35]1276
1277%%END%%
1278
1279    elif [[ $numprocs != 0 ]]
1280    then
1281       cat > $job_to_send << %%END%%
1282#!/bin/ksh
1283#PBS -q ${queue}
1284#PBS -o $remote_dayfile
[253]1285#PBS -N $job_name
[35]1286#PBS -j o
[251]1287#PBS -v MPIPROGINV=YES
[35]1288
1289%%END%%
1290
1291    else
1292       cat > $job_to_send << %%END%%
1293#!/bin/ksh
1294#PBS -o $remote_dayfile
1295#PBS -j o
1296
1297%%END%%
1298
1299    fi
1300
[1]1301 elif [[ $remote_host = lctit ]]
1302 then
1303    cat > $job_to_send << %%END%%
[635]1304#!/bin/ksh
[892]1305$init_cmds
[678]1306$module_calls
1307
[1]1308%%END%%
1309
1310       # OPTIONEN FUER SUBMIT-KOMMANDO ZUSAMMENSTELLEN
[678]1311    if [[ $tasks_per_node != $processes_per_node ]]
1312    then
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 -o $remote_dayfile -j oe -q $queue "
1314    else
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 -l place=scatter -o $remote_dayfile -j oe -q $queue "
1316    fi
[1]1317
1318 else
1319
1320    cat > $job_to_send << %%END%%
1321# @\$-q ${queue}
1322# @\$-l${qsubtime} $timestring
1323# @\$-l${qsubmem} ${memory}mb
1324# @\$-o $remote_dayfile
1325# @\$-eo
1326
1327%%END%%
1328
1329 fi
1330
1331
1332    # BEI RECHNUNG AUF REMOTE-MASCHINEN RUECKTRANSFER DES DAYFILES PER TRAP
1333    # BEI EXIT VERANLASSEN
1334    # VEKTORRECHNER MUSS EIGENEN JOB STARTEN, DA DORT NOHUP NICHT FUNKTIONIERT
1335    # AUF IBM IN SEOUL IST RUECKTRANSFER ZUR ZEIT GENERELL NICHT MOEGLICH
1336 if [[ $delete_dayfile = false  &&  $remote_host != $local_host ]]
1337 then
1338    echo "set +vx"                              >>  $job_to_send
1339    echo "trap '"                               >>  $job_to_send
1340    echo "set +vx"                              >>  $job_to_send
[1255]1341    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $(echo $remote_host | cut -c1-5) = lcsgi  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* ]]
[1]1342    then
[622]1343       if [[ $remote_host = ibmh ]]
[1]1344       then
1345          return_queue=c1
[693]1346       elif [[ $remote_host = ibmkisti ]]
1347       then
1348          return_queue=class.1-2
[622]1349       elif [[ $remote_host = ibmku ]]
1350       then
1351          return_queue=sdbg2
[1]1352       elif [[ $remote_host = ibms ]]
1353       then
1354          return_queue=p_normal
1355       elif [[ $remote_host = ibmy ]]
1356       then
1357          return_queue=serial
[325]1358       elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
1359       then
[326]1360          return_queue=serialq
[251]1361       elif [[ $remote_host = necriam ]]
[1]1362       then
[253]1363          return_queue=SP
[1255]1364       elif [[ $remote_host = lccrayb ]]
1365       then
1366          return_queue=dataq
[1040]1367       elif [[ $remote_host = lckiaps ]]
1368       then
1369          return_queue=express
[1099]1370       elif [[ $remote_host = lckyuh ]]
1371       then
1372          return_queue=cx-single
[1090]1373       elif [[ $remote_host = lckyut ]]
1374       then
1375          return_queue=cx-single
[1]1376       else
1377          return_queue=unknown
1378       fi
1379
1380       if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
1381       then
1382
[622]1383          if [[ $remote_host = ibmku ]]
1384          then
1385             echo "echo \"#!/usr/bin/ksh\" >> scpjob.$kennung"            >>  $job_to_send
1386             echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$kennung"  >>  $job_to_send
1387          else
1388             echo "echo \"#!/bin/ksh\" >> scpjob.$kennung"                >>  $job_to_send
1389          fi
[1]1390          echo "echo \"# @ job_type = serial\" >> scpjob.$kennung"    >>  $job_to_send
1391          echo "echo \"# @ job_name = transfer\" >> scpjob.$kennung"  >>  $job_to_send
1392          echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$kennung"  >>  $job_to_send
1393          echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$kennung "  >>  $job_to_send
1394          echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
1395          echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
[312]1396          if [[ $host != "ibmh" ]]
1397          then
1398             echo "echo \"# @ class = $return_queue\" >> scpjob.$kennung"  >>  $job_to_send
1399          fi
[1]1400          echo "echo \"# @ image_size = 10\" >> scpjob.$kennung"      >>  $job_to_send
1401          echo "echo \"# @ notification = never\" >> scpjob.$kennung" >>  $job_to_send
1402
1403          echo "echo \"# @ queue\" >> scpjob.$kennung"                >>  $job_to_send
1404          echo "echo \" \" >> scpjob.$kennung"                        >>  $job_to_send
1405
1406          echo "echo \"set -x\" >> scpjob.$kennung"                   >>  $job_to_send
[1094]1407          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]1408          if [[ $remote_host = ibmku ]]
1409          then
1410             echo "echo \"rm  scpjob.$kennung\" >> scpjob.$kennung"   >>  $job_to_send
1411          fi
[1]1412          echo "echo \"exit\" >> scpjob.$kennung"                     >>  $job_to_send
1413
1414       elif [[ $remote_host = nech ]]
1415       then
1416          echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
1417          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1418          echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100"  >>  $job_to_send
1419          echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
1420          echo "#PBS -j o"                         >>  $job_to_send
1421          echo " "                                 >>  $job_to_send
1422          echo "set -x"                            >>  $job_to_send
1423          echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
[1094]1424          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
[1]1425          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1426          echo "%%END%%"                           >>  $job_to_send
1427
[251]1428       elif [[ $remote_host = necriam ]]
[35]1429       then
1430          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1431          echo "#PBS -q $return_queue"             >>  $job_to_send
1432          echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
1433          echo "#PBS -j o"                         >>  $job_to_send
1434          echo " "                                 >>  $job_to_send
1435          echo "set -x"                            >>  $job_to_send
[1094]1436          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
[35]1437          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1438          echo "%%END%%"                           >>  $job_to_send
1439
[1099]1440       elif [[ $remote_host = lckyuh ]]
1441       then
1442          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1443          echo "#!/bin/bash"                       >>  $job_to_send
1444          echo "#PJM -L \"node=1\""                >>  $job_to_send
1445          echo "#PJM -L \"rscgrp=$return_queue\""  >>  $job_to_send
1446          echo "#PJM --no-stging"                  >>  $job_to_send
1447          echo "#PJM -L \"elapse=30:00\""          >>  $job_to_send
1448          echo "#PJM -o \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
1449          echo "#PJM -j"                           >>  $job_to_send
1450          echo " "                                 >>  $job_to_send
1451          echo "export LANG=en_US.UTF-8"           >>  $job_to_send
1452          echo "set -x"                            >>  $job_to_send
1453          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1454          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1455          echo "%%END%%"                           >>  $job_to_send
1456
[1090]1457       elif [[ $remote_host = lckyut ]]
1458       then
1459          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1460          echo "#!/bin/bash"                       >>  $job_to_send
1461          echo "#PJM -L \"vnode=1\""               >>  $job_to_send
1462          echo "#PJM -L \"rscgrp=$return_queue\""  >>  $job_to_send
1463          echo "#PJM --no-stging"                  >>  $job_to_send
1464          echo "#PJM -L \"elapse=30:00\""          >>  $job_to_send
1465          echo "#PJM -o \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
1466          echo "#PJM -j"                           >>  $job_to_send
1467          echo " "                                 >>  $job_to_send
1468          echo "export LANG=en_US.UTF-8"           >>  $job_to_send
1469          echo "set -x"                            >>  $job_to_send
[1094]1470          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
[1090]1471          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1472          echo "%%END%%"                           >>  $job_to_send
1473
[181]1474       elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
1475       then
1476          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1477          echo "#!/bin/bash"                             >>  $job_to_send
1478          echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
[325]1479          echo "#PBS -l walltime=00:30:00"               >>  $job_to_send
[181]1480          echo "#PBS -l nodes=1:ppn=1"                   >>  $job_to_send
[366]1481          echo "#PBS -l feature=data"                    >>  $job_to_send
[181]1482          echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol"      >>  $job_to_send
1483          echo "#PBS -j oe"                        >>  $job_to_send
1484          echo " "                                 >>  $job_to_send
1485          echo ". /usr/share/modules/init/bash"    >>  $job_to_send
1486          echo "set -x"                            >>  $job_to_send
[1094]1487          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
[181]1488          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1489          echo "%%END%%"                           >>  $job_to_send
1490
[1255]1491       elif [[ $remote_host = lccrayb ]]
1492       then
1493          echo "cat > scpjob.$kennung << %%END%%"        >>  $job_to_send
1494          echo "#!/bin/bash"                             >>  $job_to_send
1495          echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
1496          echo "#PBS -l walltime=00:30:00"               >>  $job_to_send
1497          echo "#PBS -l mppwidth=1"                      >>  $job_to_send
1498          echo "#PBS -l mppnppn=1"                       >>  $job_to_send
1499          echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol"      >>  $job_to_send
1500          echo "#PBS -j oe"                              >>  $job_to_send
1501          echo " "                                       >>  $job_to_send
1502          echo "set -x"                                  >>  $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 "%%END%%"                                 >>  $job_to_send
1506
[1099]1507       elif [[ $remote_host = lcflow ]]
1508       then
1509          echo "cat > scpjob.${kennung}.tmp << %%END%%"                  >>  $job_to_send
1510          echo "#!/bin/bash"                                             >>  $job_to_send
1511          echo "SGEPREFIX -S /bin/bash"                                  >>  $job_to_send
1512          echo "SGEPREFIX -N transfer_$job_name"                         >>  $job_to_send
1513          echo "SGEPREFIX -cwd"                                          >>  $job_to_send
1514          echo "SGEPREFIX -l h_rt=01:00:00"                              >>  $job_to_send
[1202]1515          echo "SGEPREFIX -l h_vmem=500M"                                >>  $job_to_send
1516          echo "SGEPREFIX -l excl_flow=false"                            >>  $job_to_send
[1099]1517          echo "SGEPREFIX -j y"                                          >>  $job_to_send
1518          echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$kennung"  >>  $job_to_send 
1519          echo " "                                                       >>  $job_to_send 
1520          echo "set -x"                                                  >>  $job_to_send 
1521          echo "export PALM_BIN=$PALM_BIN" | sed -e 's:'$HOME':$HOME:'   >>  $job_to_send
1522          echo "export PATH=\$PATH:\$PALM_BIN"                           >>  $job_to_send
1523          echo ""                                 >>  $job_to_send         
1524          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1525          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1526          echo "rm -f scpjob.${kennung}"                                 >>  $job_to_send         
1527          echo "%%END%%"                                                 >>  $job_to_send
1528          echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${kennung}.tmp > scpjob.${kennung}" >>  $job_to_send         
1529          echo "rm -f scpjob.${kennung}.tmp"                             >>  $job_to_send         
1530
[1]1531       else
1532
1533          echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
1534          echo "# @\\\$-q $return_queue"           >>  $job_to_send
1535          echo "# @\\\$-l${qsubtime} 10"           >>  $job_to_send
1536          echo "# @\\\$-l${qsubmem} 10mb"          >>  $job_to_send
1537          if [[ $remote_host = t3ej2  ||  $remote_host = t3ej5  ||  $remote_host = t3es ]]
1538          then
1539             echo "# @\$-l mpp_p=0"                >>  $job_to_send
1540          fi
1541          echo '# @\$-lF 10mb'                     >>  $job_to_send
1542#          echo '# @\$-o /dev/null'                 >>  $job_to_send
1543          echo '# @\$-o job_queue/last_job_transfer_protocol'    >>  $job_to_send
1544          echo '# @\\\$-eo'                          >>  $job_to_send
1545          echo " "                                 >>  $job_to_send
1546          if [[ $remote_host = t3ej2  ||  $remote_host = t3ej5 ]]
1547          then
1548             echo "set +vx"                        >>  $job_to_send
1549             echo ". .profile"                     >>  $job_to_send
1550          fi
1551          echo "set -x"                            >>  $job_to_send
[1094]1552          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]1553          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
1554          echo "%%END%%"                           >>  $job_to_send
1555       fi
1556
1557       if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
1558       then
1559          echo "llsubmit  scpjob.$kennung"      >>  $job_to_send
[1255]1560       elif [[ $remote_host = lccrayb ]]
1561       then
1562          echo "qsub -q $return_queue  scpjob.$kennung"               >>  $job_to_send
[181]1563       elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
1564       then
[748]1565          echo "rm -rf \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
1566          echo "chmod  u+x  scpjob.$kennung"                         >>  $job_to_send
1567          echo "msub  scpjob.$kennung"                               >>  $job_to_send
[1]1568       elif [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5 ]]
1569       then
1570          echo "qsub -J n  scpjob.$kennung"     >>  $job_to_send
1571       elif [[ $remote_host = t3es ]]
1572       then
1573          echo "qsub -J n  -s /bin/ksh  scpjob.$kennung"     >>  $job_to_send
[1043]1574       elif [[ $remote_host = lckiaps ]]
1575       then
1576          echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
[1094]1577          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"$submcom ${job_catalog}/scpjob.$kennung\" "  >>  $job_to_send
[1043]1578          echo "rm  ${job_catalog}/scpjob.$kennung"          >>  $job_to_send
[1099]1579       elif [[ $remote_host = lckyu* ]]
[1090]1580       then
[1094]1581          echo "scp $PORTOPT scpjob.$kennung  ${remote_username}@${remote_addres}:job_queue"           >>  $job_to_send
1582          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" "  >>  $job_to_send
[1099]1583       elif [[ $remote_host = lcflow ]]
1584       then
1585          echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
[1202]1586          echo "/usr/bin/ssh ${remote_username}@${remote_addres}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$kennung\" "  >>  $job_to_send
[1]1587       else
[1040]1588          echo "$submcom  scpjob.$kennung"      >>  $job_to_send
[1]1589       fi
[1043]1590       if [[ $remote_host != ibmku  &&  $remote_host != lckiaps ]]
[622]1591       then
1592          echo "rm  scpjob.$kennung"            >>  $job_to_send
1593       fi
[1]1594       if [[ $remote_host = nech ]]
1595       then
1596          echo "cd -"                           >>  $job_to_send
1597       fi
1598    else
1599#       echo "ftpcopy  -d  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
1600       echo "nohup  ftpcopy  -d  -w 15  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null  &"  >>  $job_to_send
1601    fi
1602    echo "set -x"                               >>  $job_to_send
1603    echo "     ' exit"                          >>  $job_to_send
1604    echo "set -x"                               >>  $job_to_send
1605 fi
1606
1607
1608
1609    # EIGENTLICHE JOB-DATEI AN QSUB-KOMMANDOS ANHAENGEN
1610 cat  $file_to_send  >>  $job_to_send
[69]1611
[1]1612 if [[ $remote_host = ibm ]]
1613 then
1614    echo " "         >>  $job_to_send
1615    echo "exit"      >>  $job_to_send
1616 fi
[635]1617
1618    # remove job file
[1099]1619 if [[ $remote_host = lctit  ||  $remote_host = ibmku  ||  $remote_host = lcflow ]]
[69]1620 then
1621    echo " "                               >>  $job_to_send
1622    echo "rm ~/job_queue/$job_on_remhost"  >>  $job_to_send
1623 fi
[1]1624
1625
1626
1627    # USER-NAME AUF ZIELRECHNER AUS .NETRC-DATEI ERMITTELN
1628 if [[ -z $remote_user ]]
1629 then
1630    if [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5  ||  $remote_host = t3es  ||  $remote_host = vpp ]]
1631    then
1632       grep  $remote_addres  ~/.netrc | read dum dum dum remote_user dum dum
1633    fi
1634 fi
1635
1636
1637
1638    # JOB AUF ZIELRECHNER TRANSFERIEREN BZW. INS JOBVERZEICHNIS KOPIEREN
1639 if [[ $no_submit = false ]]
1640 then
1641    if [[ $remote_host != $local_host ]]
1642    then
1643       [[ $verify = true ]]  &&  printf "\n >>> transfering job to \"$remote_host\"..."
[82]1644       if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]    # ssh on ibms cannot handle "~/"
[1]1645       then
[82]1646          job_catalog_save=$job_catalog
1647          job_catalog=job_queue
1648       elif [[ $remote_host = nech ]]
1649       then
1650          job_catalog_save=$job_catalog
1651          job_catalog=/hpf/b/${remote_user}/job_queue
1652       fi
[1096]1653       if [[ $remote_host = nech ]]
[82]1654       then
1655             # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ
1656             # TRANSFERIERT WERDEN
[1094]1657          scp  $PORTOPT  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
[1]1658       else
[1094]1659          scp  $PORTOPT  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
[1]1660       fi
[82]1661       if [[ $? = 1 ]]
1662       then
1663          locat=scp; exit
1664       fi
1665       if [[ $remote_host = ibms ]]
1666       then
1667          job_catalog=$job_catalog_save
1668       fi
[1]1669       [[ $verify = true ]]  &&  printf "\n >>> finished\n"
1670    else
1671       eval  job_catalog=$job_catalog
1672       cp  $job_to_send  ${job_catalog}/$job_on_remhost
1673    fi
1674
1675
1676
1677       # NQS- BZW. LOADLEVELER-JOB STARTEN
1678    if [[ $remote_host != $local_host ]]
1679    then
1680       [[ $verify = true ]]  &&  printf "\n >>> submitting job using \"qsub\"...\n"
[635]1681
1682       if [[ $(echo $remote_host | cut -c1-5) = lcsgi  &&  $prio = true ]]
[1]1683       then
[635]1684          printf "\n >>> submit with HLRN qos-feature hiprio...\n"
[1094]1685          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost"
[635]1686       elif [[ $remote_host = ibmku ]]
1687       then
[1094]1688          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
[1099]1689       elif [[ $remote_host = lcflow ]]
1690       then
[1202]1691          /usr/bin/ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "$init_cmds $module_calls cd $job_catalog; $submcom $job_on_remhost"
[1]1692       else
[1094]1693          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
[82]1694       fi
[1]1695
1696       [[ $verify = true ]]  &&  printf " >>> o.k.\n"
1697    else
1698       cd  $job_catalog
[1224]1699       if [[ $(echo $local_host | cut -c1-5) = lcsgi  ||  $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray ]]
[1]1700       then
1701          eval  $submcom  $job_on_remhost
[1099]1702       elif [[  $local_host = lcfimm  ||  $local_host = lctit  ||  $localhost = lcxe6  ||  $localhost = lck  || $localhost = lckordi ||  $localhost = lcyon || $localhost = lcsb  ||  $localhost = lckyu* ]]
[108]1703       then
[635]1704          chmod  u+x  $job_on_remhost
[108]1705          eval  $submcom  $job_on_remhost
[1]1706       elif [[ $local_host = nech ]]
1707       then
1708          if [[ $queue = default ]]
1709          then
[799]1710             eval  $submcom  $job_on_remhost
[1]1711          else
[799]1712             eval  $submcom  -q $queue  $job_on_remhost
[1]1713          fi
1714       else
1715          qsub  $job_on_remhost
1716       fi
[622]1717
1718          # Jobfile must not be deleted on lctit/ibmku!! This will be done
1719          # only at the end of the job.
[1099]1720       if [[ $local_host != lctit  &&  $local_host != ibmku  &&  $local_host != lcflow ]]
[622]1721       then
1722          rm  $job_on_remhost
1723       fi
[1]1724       cd  -  > /dev/null
1725    fi
1726 fi
1727
1728
1729
1730    # ABSCHLUSSARBEITEN
1731
1732 if [[ $no_submit = false ]]
1733 then
[1099]1734    rm  -f $job_to_send
[1]1735 fi
1736 [[ $verify = true ]]  &&  printf "\n\n *** SUBJOB finished \n\n"
Note: See TracBrowser for help on using the repository browser.